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 historyPlain 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
| Commands | Result |
|---|---|
who, history, members | Arrays of command-specific projections |
member | Full serialized member record |
tags, journal | Arrays of serialized model records |
info | System, counts, format, version and store path |
switch | Switched display names and event time |
export | Written path under exported, not the export itself |
import | Source, source format, new member and front counts |
remote, whoami, connect | Configuration or identity/feature reports |
estate | Gate URL and identity results, including per-row errors |
online ls | Entry metadata with decrypted component arrays |
online cat | Parsed JSON payload or a JSON string |
online rm | Pruning 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.