Commands
cradle has three commands: run, which launches an agent, schedule, which manages cron-driven runs, and doctor, which checks your setup.
Usage
How cradle run works
The agent runs in your working directory by default — the agent folder is a parameter (default .), not a place cradle changes into. A global alias can set an optional startup cwd for named runs; a scheduled task's cwd takes precedence. --dry-run prints the effective cwd and the composed command.
Everything after -- is forwarded verbatim to pi. Use it for pi's own flags, like --resume or -p "prompt", without cradle trying to interpret them.
--dry-run prints the generated-extension write plan and the composed command without spawning anything — and without requiring pi, nono, or sbx to be installed. For an sbx-backend run it also prints the sbx create/sbx policy/provision setup commands, in the order cradle run would run them, before the final sbx exec argv. Use it to see exactly what a run would do before it does it.
Per-agent runtime state — generated extensions and session history — lives under ~/.cradle/agents/<name>-<hash>/, outside the agent folder itself. That keeps the folder clean and committable: nothing a run writes ends up in your agent's source tree.
Herdr and Moshi
On macOS and Linux, cradle run automatically loads your installed Herdr and Moshi Pi hooks when their daemon sockets exist. Run agents normally inside Herdr; no per-agent extension copies or extra -e arguments are required. Other personal Pi extensions remain disabled.
Cradle reads herdr-agent-state.ts and moshi-hooks.ts from ~/.pi/agent/extensions/ (PI_CODING_AGENT_DIR overrides the Pi directory). Herdr requires its pane environment and HERDR_SOCKET_PATH; Moshi follows MOSHI_SOCKET_PATH or its platform socket location. Install Herdr's Pi integration with herdr integration install pi, and install Moshi's Pi hook through moshi-hook.
Nono receives connect-only access to the exact socket files. The generated profile records those grants, and --dry-run shows the loaded hooks and Herdr detection hint. Scheduled runs exclude these integrations. With sbx, only the host wrapper identification applies; host hooks and sockets do not cross the microVM boundary.
Flags
--offline--sandbox) unless --no-sandbox is also passed.--allow-host <host>--offline.--no-sandboxpi directly, without a sandbox wrapper. Useful for debugging. Combined with --offline/--allow-host, cradle warns the policy has no effect and runs with no network isolation.--sandboxsandbox/ file enables one or the folder opts out.--sandbox-backend <nono|sbx>--sandbox): nono (host OS policy) or sbx (Docker Sandboxes microVM).--dry-run--verbosenono's --silent flag to show its capabilities banner (nono backend only).-- <args>-- to pi verbatim.See Sandbox for how --offline, --allow-host, --no-sandbox, --sandbox-backend, and a folder's own sandbox/nono.json/sandbox/sbx.json interact, and Agent Folders for what cradle reads out of the folder before it runs.
Doctor
cradle doctor checks pi (required), and nono/sbx/mise plus your platform's timer backend — launchctl on macOS, systemctl on Linux — (recommended — each on your PATH, with version). cradle run reads the agent folder and launches pi in your current working directory (or the alias's configured cwd) — sandboxed inside nono or sbx when the folder declares sandbox/nono.json/sandbox/sbx.json, bare (with a warning) otherwise.