smithers CLI ships with the smithers-orchestrator package. It provides commands to run workflows, resume paused runs, manage approvals, inspect state, and revert to previous snapshots.
Commands
run
Execute a workflow from a.tsx file.
| Option | Description |
|---|---|
--input JSON | Input data as a JSON string. Parsed and passed to runWorkflow. |
--run-id ID | Provide a specific run ID. Must not already exist (use resume for existing runs). |
--max-concurrency N | Maximum parallel tasks. Default: 4. |
--root PATH | Root directory for the tool sandbox. Default: the workflow file’s directory. |
--log-dir PATH | Directory for NDJSON event logs. Relative to root. Default: .smithers/executions/<runId>/logs. |
--no-log | Disable event log file output entirely. |
--allow-network | Allow the built-in bash tool to make network requests. Note: This flag only applies to Smithers’ built-in tools. CLI agent wrappers (ClaudeCodeAgent, CodexAgent, GeminiAgent) manage their own sandboxing independently — use the agent’s own sandbox options (e.g. sandbox: "read-only" for CodexAgent) to control their network access. |
--max-output-bytes N | Maximum bytes a single tool call can return. Default: 200000. |
--tool-timeout-ms N | Maximum wall-clock time per tool call in milliseconds. Default: 60000. |
RunResult as JSON to stdout and exits with the appropriate exit code.
resume
Resume a paused or crashed run. Smithers reloads persisted state from SQLite and continues from the last checkpoint.run (except --input, which is loaded from the database).
Example:
approve
Grant approval for a task that hasneedsApproval set. The workflow must be in waiting-approval status.
| Option | Description |
|---|---|
--iteration N | Ralph iteration number. Default: 0. |
--note TEXT | Optional note to attach to the approval record. |
--decided-by TEXT | Name or identifier of the person approving. |
deny
Deny approval for a task. The task will be marked as failed (or skipped ifcontinueOnFail is set on the task).
| Option | Description |
|---|---|
--iteration N | Ralph iteration number. Default: 0. |
--note TEXT | Optional note explaining the denial. |
--decided-by TEXT | Name or identifier of the person denying. |
status
Print the current status of a run as JSON.frames
List the render frames for a run. Frames capture the workflow tree’s state at each render cycle.| Option | Description |
|---|---|
--tail N | Number of most recent frames to return. Default: 20. |
--compact | Omit the full XML tree and show only task states, frame number, and mounted task IDs. Much smaller output for large workflows. |
list
List all runs stored in the workflow’s database.| Option | Description |
|---|---|
--limit N | Maximum number of runs to return. Default: 50. |
--status STATUS | Filter by status: running, finished, failed, cancelled, waiting-approval. |
graph
Render the workflow tree without executing, and print theGraphSnapshot as JSON. Uses renderFrame internally.
| Option | Description |
|---|---|
--run-id ID | Run ID to use in the context. Default: "graph". If an existing run ID is provided, its persisted input and outputs are loaded. |
--input JSON | Input data as JSON. Overrides the persisted input if both are provided. |
revert
Revert the workspace to a previous task attempt’s filesystem state using JJ (Jujutsu). See Revert for full details.| Option | Description |
|---|---|
--attempt N | Attempt number to revert to. Default: 1. |
--iteration N | Ralph iteration number. Default: 0. |
0 on success, 1 on failure.
cancel
Cancel a running or waiting-approval workflow. Marks all in-progress attempts as cancelled and sets the run status to"cancelled".
2 (cancelled).
version
Print the package version and exit.help
Print usage information and exit.Global Options
These options apply torun and resume commands:
| Option | Description | Default |
|---|---|---|
--root PATH | Root directory for the tool sandbox. All filesystem tools are confined to this directory. | Workflow file’s parent directory |
--log-dir PATH | Directory for NDJSON event log files. Relative paths are resolved from --root. | .smithers/executions/<runId>/logs |
--no-log | Disable writing event log files. Events are still persisted to the SQLite database. | Logging enabled |
--allow-network | Allow the built-in bash tool to make outbound network requests. Does not affect CLI agent wrappers — see CLI Agents for agent-specific sandbox settings. | Disabled |
--max-output-bytes N | Maximum bytes returned from a single tool call. | 200000 |
--tool-timeout-ms N | Maximum time in milliseconds for a single tool call. | 60000 |
--max-concurrency N | Maximum number of tasks running in parallel. | 4 |
--input JSON | Input data as a JSON string (for run only). | {} |
--run-id ID | Explicit run identifier. | Auto-generated |
--version, -v | Print version and exit. | — |
--help, -h | Print help and exit. | — |
Exit Codes
| Code | Status | Description |
|---|---|---|
0 | finished | The workflow completed successfully. |
1 | failed | The workflow failed (task failure or engine error). |
2 | cancelled | The workflow was cancelled. |
3 | waiting-approval | The workflow is paused waiting for human approval. |
4 | invalid input | Invalid arguments, missing required flags, malformed JSON, or unknown command. |
Workflow File
Every command (except--version and --help) takes a <workflow.tsx> path as its first positional argument. This file must have a default export that is a SmithersWorkflow object, typically created by calling smithers(...).
Typical Workflow
A common pattern is to run a workflow, wait for approval, and then resume:Related
- runWorkflow — Programmatic API equivalent.
- Events — Understanding the NDJSON event logs.
- Revert — Detailed revert documentation.
- Approvals — How the approval system works.