What this is
The CLI supports non-interactive journey creation, machine-readable JSON output, bounded standard input, and stable exit-code categories. Use these modes for scripts, CI-like tasks, and coding-agent workflows.Non-interactive init
Non-interactive custory init requires:
--workspace <name|slug|id>--journey <recommended|title>- one source:
--website <url>,--brief <file>, or--stdin
JSON output
Use--json when another process will read the result:
--json, the command writes one JSON document to stdout. Progress and diagnostics go to stderr.
That separation lets scripts parse stdout without losing useful human diagnostics.
Stable top-level fields
Successfulinit --json output includes stable top-level fields like:
schemaVersion, status, sessionId, workspace, journey, personaIds, warnings, and verifiedAt as the stable top-level contract for successful init output. Custory may add fields over time. Automation should ignore unknown fields.
Error output uses this envelope:
error.code first, then use retryable to decide whether retrying is reasonable.
Standard input rules
Use--stdin for text input from another command:
init, standard input is bounded UTF-8 text. Very large input is rejected with INPUT_TOO_LARGE.
For direct tool calls, --stdin must contain a JSON object.
Input limits
All text input must be valid UTF-8.
Exit codes
Safe retries
If a create run is interrupted, prefer:Run a bounded Custory agent task
Usecustory agent run when you want Custory’s agent to work inside a workspace or journey scope.
Workspace-scoped example:
custory agent run requires a goal through --goal, --file, or --stdin, and requires either --workspace or --journey.