Skip to manual content
Orchard Manual
Browse the manual

Orchard · 0.1.0 source manual

Output and scripting

Choose explicit JSON for scripts and check command-specific exceptions.

Choose an output mode

--json is a global flag and takes priority over --no-color. Without it, Orchard uses rich output on a terminal and plain output when stdout is redirected. --no-color or the presence of NO_COLOR selects plain output.

or --store ./ourcana.json --json members
or --store ./ourcana.json --no-color who
NO_COLOR=1 or --store ./ourcana.json history

Plain output is for reading, not a stable column format. Use JSON rather than parsing aligned tables or relative time phrases.

Pipe JSON deliberately

These examples use the separately installed jq tool:

or --store ./ourcana.json --json members | jq -r '.[].name'
or --store ./ourcana.json --json who | jq -r '.[].members[]'
or --store ./ourcana.json --json info | jq '.counts'

For reliable shell scripts, check Orchard's exit status before consuming output, or use your shell's pipeline failure handling. Treat output as private: it may contain member details, journal content, paths or system identifiers.

JSON shapes differ by command

CommandsResult
who, history, membersArrays of command-specific projections
memberFull serialized member record
tags, journalArrays of serialized model records
infoSystem, counts, format, version and store path
switchSwitched display names and event time
exportWritten path under exported, not the export itself
importSource, source format, new member and front counts
remote, whoami, connectConfiguration or identity/feature reports
estateGate URL and identity results, including per-row errors
online lsEntry metadata with decrypted component arrays
online catParsed JSON payload or a JSON string
online rmPruning report, after any interactive confirmation

Model records use camelCase keys such as entryDate; command reports often use snake_case such as start_time. There is no single schema shared by every command. Local front and journal times are Unix milliseconds. Online entry timestamps use microseconds; token expiry and gate paid-through values use Unix seconds.

Exceptions and errors

or pair --forget --json succeeds silently; do not expect a JSON object. Help and version are plain text even with --json. online rm --json still prompts unless --yes is supplied, which makes stdout unsuitable for a JSON parser during confirmation. Use the destructive flag only when its target and scope are intentional.

Errors go to stderr and are not JSON envelopes. The top-level runtime error prefix currently contains an ANSI color escape even with --no-color or redirected output; that flag controls normal output formatting, not every diagnostic. See exit codes.

Search the manual

Search pages and sections. Nothing is sent to a server.