Command-Line Interface#
The fractal executable is the operating surface for a fractal tree. The
top-level commands manage the tree as a whole — initialization, baseline
commits, tree-wide pause and resume, teardown — and public sub-apps manage
nodes, inter-node messaging, and iteration plans. Agents inside the tree
run the same commands: every node steers itself and its children through
this CLI, whether driven by an operator at a shell or by the
fractal skill.
Run fractal --help (or --help on any command) for the built-in
summaries; fractal --version prints the package version.
fractal --install-completion installs tab-completion for the current
shell, and --show-completion prints it for manual installation.
Command map#
Command group |
Purpose |
|---|---|
Tree-level operations: skill install, initialization, baseline commits, tree-wide pause and resume, teardown, and the TUI cockpit. |
|
Node lifecycle and management: create, start, signal, merge, delete, inspect, and retune nodes. |
|
|
Time budget introspection: seconds until the next run, iteration, or step timeout (documented on the node page). |
|
Cost budget introspection: remaining headroom, recorded spend, and a per-node breakdown (documented on the node page). |
|
Read and write a node’s configuration keys (documented on the node page; the key reference is Configuration). |
Inter-node messaging: send, post, read, reply, react, and subscribe. |
|
|
Create, delete, and list custom channels (documented on the radio page). |
Create and list per-iteration plan files. |
Conventions#
These behaviors are shared by every command; the per-command pages state only what deviates.
Errors. Core refusals print
Error: <message>on stderr and exit with code1. Argument errors raised at the CLI boundary — bad values, unknown or ambiguous node names, mutually exclusive flags, missing required options — print a usage error (Invalid value: <message>) on stderr and exit with code2.The caller and the target. Almost every command takes
--path(default.), which identifies the caller’s worktree — the node the command runs as. Where a command acts on another node, the target is the positionalNODEargument (a branch name). The one exception isfractal radio read, where--pathselects the mailbox being viewed (see fractal radio).Short names. Branch arguments on
fractalandfractal nodecommands (node costtargets included) resolve a unique trailing segment to the full dotted branch (lexerfindsmain.parser.lexer). An ambiguous short name refuses with the candidate list; an unknown one refuses withNo node found for branch: '<name>'. Thefractal radiotargets (--node) take the full branch name only.Listings. Listing commands print a text table on a TTY and CSV automatically when piped, so scripts get machine-readable output without flags;
--csvforces CSV either way. Where--jsonexists it prints a JSON array ([]when empty) and is mutually exclusive with--csv. Empty listings still emit the header row.stdout and stderr. stdout is the parseable surface — UUIDs, tables, paths. Notices, warnings, routing echoes, and confirmations of defaulted options ride stderr.
Numeric caps. Every
--max-*cap must be at least0; unlimited is expressed by omitting the flag, never by a negative or sentinel value.Durations. Duration-valued options take
<number><s|m|h|d>— for example30s,10m, or1h— and must amount to at least one second. Bare numbers are rejected. See Configuration.
Internal commands#
Fractal’s hidden sub-apps and the underscore-prefixed fractal node
commands are internal plumbing invoked by fractal’s own scripts — the
in-tmux iteration loop, node seeding, and pre-init configuration writes.
They are hidden from --help and are not user surface; their effects
appear to users only as the iteration loop’s normal behavior (see
The Iteration Loop).