Command Surface
Root Resolution
CLI resolves the ChainBot root in this order:CHAINBOT_CONFIG_DIRenvironment variable if set and non-empty~/.chainbotas the default fallback
CHAINBOT_CONFIG_DIR must point to a complete ChainBot root, not a single config file.
Output Modes
status Contract
status is a non-executing snapshot. It does not trigger workflow execution, trigger collection, runtime recovery, or incomplete-run state changes.
Default text output includes: Root, Workflows, Triggers, and Summary.
status --json returns:
serve.state values:
idle: no valid lease row, or coordination database does not existactive: lease row exists, is not expired, and owner is alivestale: lease row exists but should not block a newserve
validate Contract
validate checks:
- Root layout and
chainbot.tomlcontract - All workflow package manifests
- All trigger package manifests
- All plugin package manifests
run Contract
- Executes the uniquely inferred top-level workflow.
- Returns a usage error if multiple workflows exist and a unique top-level workflow cannot be determined.
- Does not require a trigger to be present.
trigger Mutations
chainbot trigger enable and chainbot trigger disable write directly to the trigger package’s config.toml enabled field.
Changes take effect on the next status, validate, serve, or run.
observe Contract
Provides read-only aggregation of:
run_summariesworkflow_runtime_logstrigger_event_records
--limit <n>: window of most recent records--trigger-id <id>: filter to a specific trigger--run-id <id>: filter to a specific run
Error Navigation
CLI errors always provide the next action:- Unsupported command: suggest the nearest known command and guide to
chainbot help - Missing root: guide to set
CHAINBOT_CONFIG_DIRor verify~/.chainbotpoints to a valid root - Missing
chainbot.toml: check that the root path is correct and the file exists - Invalid config: return a validation error with file path, line/column, and source snippet