Installation
Thesirenspec CLI is installed automatically when you add the package:
sirenspec command is available on your PATH.
You can also check the installed version:
sirenspec init
Scaffold a new workflow interactively. Prompts for a template and provider, then writes a workflow.yaml and .env.example in the target directory. The generated workflow passes sirenspec validate immediately.
Exit codes:
Example session:
sirenspec run
Execute a workflow and display the results. By default, node execution is rendered with Rich formatting to the terminal (streaming per-node view). Use --trace or --output json to output the full JSON execution trace instead.
Options:
Exit codes:
Examples:
--trace or --output json, the CLI renders each completed node as a Rich panel:
type: swrm), the output shows a dedicated parallel execution block:
2/3 succeeded, 1 failed). Failed agents display their error message in a red-bordered panel.
JSON Trace Format:
When --trace, --output json, or --trace-file is used, the full execution trace is written as JSON:
sirenspec explain
Print a human-readable execution plan for a workflow without making any LLM calls.
Options:
Exit codes:
Examples:
sirenspec test
Discover and run YAML test fixtures. Each fixture file (*.test.yaml) contains a workflow definition plus a set of assertions that are validated during execution.
Options:
Exit codes:
Examples:
sirenspec validate
Validate a workflow YAML file without executing it or making any API calls.
Exit codes:
Examples:
- YAML syntax (including duplicate key detection).
- Required fields (
version,agents,nodes). - Agent fields (
model,system). - Node fields (
agent,writes). - Edge references — all
fromandtovalues must refer to existing nodes. - Node agent references — all
agentvalues must refer to existing agents.
inputs, for_each, swarm_size):
Errors raise
WorkflowLintError and fail validation; warnings are printed without blocking. The same linter runs inside load_workflow() before any LLM call is made.
Provider credentials and when: expressions are not evaluated during validation.
sirenspec render
Render a workflow as a diagram without executing it or making any API calls.
Options:
Exit codes:
Examples:
mermaid target produces a graph TD flowchart. Unconditional edges are plain arrows; conditional edges are labeled with their when: expression.