C·01Terminal & Shell
verified 2026-07-10
claude -p "summarize this" # print mode: respond and exit
claude -p --output-format stream-json --verbose | jq
claude -p --output-format json # single JSON result
The agent as a Unix process — pipe it, wrap it, compose it. Formats: text (default), json, stream-json. --output-format only works with --print. Introduced in the first print-mode workshops (Aug 2025); syntax unchanged since.
changed 2026-07-10
claude --model opus | sonnet | haiku # historical ladder
claude --model fable # current top alias
Aliases still resolve, but the ladder moved: fable (Claude Fable 5) now tops it. Any hardcoded model name is a dated sidebar, not doctrine — a rule this guide applies to itself, and this entry is its proof.
verified 2026-07-10
h() { claude --model haiku "$@"; }
alias opus='ENABLE_BACKGROUND_TASKS=1 claude --model opus'
popus(){ opus "$(pbpaste) --- $@"; } # original workshop version
{ cat "$1"; echo "$2"; } | claude --print
All wrappers still defined in the live shell (funclist, funcwhere, funced too). Drift note: the live popus now composes dopus — clipboard-seeded prompts run permission-skipped. Audit your wrappers — they evolve when you aren't looking.
risky · verified 2026-07-10
claude --dangerously-skip-permissions # YOLO mode
claude --allow-dangerously-skip-permissions # newer: opt-in, not default-on
Both exist today. The second is the current recommendation when you must go this route: it enables bypassing without turning it on by default, and the CLI itself says "recommended only for sandboxes with no internet access." The framing stands: an explicitly risky mode requiring isolation and external verification — never a convenience default.
verified 2026-07-10
--allowedTools "Bash(bun init:*)" # also: --allowed-tools
--append-system-prompt "..."
--settings
--setting-sources ""
All four present and current. --setting-sources "" remains the nested-agent hook-recursion guard. --disallowedTools now exists as the deny-side counterpart.
verified 2026-07-10
codex exec "..." # non-interactive Codex (alias: codex e)
zsh -lc 'echo ZDOTDIR=...' # shell-discovery probes
whence -a
Codex's print-mode equivalent, verified against the installed CLI. The zsh discovery probes are plain shell and don't rot.