Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

16 pages for --print.

Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.

Manage multiple agents with agent view Claude Code CLI · in the page agent-view …, not a `-p` value. Claude Code rejects `--bg` combined with `-p` or `--print` before any session is created, because `--print` never starts the interactive session that `claude agents` attaches to.… CLI reference Claude Code CLI · in the page cli-reference …ined subagents](/docs/en/sub-agents#choose-the-subagent-scope). With `--print`, the value can instead be the path to a JSON file holding the object; the file form requires Claude Code v2.1.281 or late… Desktop application Claude Code CLI · in the page desktop …apply. | | `--verbose` | [Verbose view mode](#switch-view-modes) | | `--print`, `--output-format` | Not available. Desktop is interactive only. | | `ANTHROPIC_MODEL` env var | Model picker in the row… Claude Desktop on Linux (beta) Claude Code CLI · in the page desktop-linux …s.claude.ai/claude-desktop/apt/stable/dists/stable/main/binary-$(dpkg --print-architecture)/Packages" | grep '^Filename: pool/main/c/claude-desktop/claude-desktop_' | sort -V | tail -n 1 | cut -d' ' -… Error reference Claude Code CLI · in the page errors …ogin](/docs/en/troubleshoot-install#auto-update-failed) | | `--bg and --print conflict` | [Command-line errors](#conflict-between-bg-and-print) | | `Couldn't tell whether --bg is a flag or text here,… Glossary Claude Code CLI · in the page glossary …prompt and exits without an interactive prompt, invoked with `-p` or `--print`. Used for CI, scripts, and piping. The run is still saved as a resumable session unless you pass `--no-session-persistenc… Run Claude Code programmatically Claude Code CLI · in the page headless …ion](/docs/en/agent-sdk/overview). ## Basic usage Add the `-p` (or `--print`) flag to any `claude` command to run it non-interactively. Not every [CLI option](/docs/en/cli-reference) combines with `… Model configuration Claude Code CLI · in the page model-config …ort` or `/effort` runs at the cap instead. If you start a plain-text `--print` run with `--effort` above the cap, a warning on stderr names the requested and applied levels. In interactive sessions, w… Authorization Model Context Protocol · in the page docs/2026-07-28/tools/inspector/authorization …back port to it, or complete the login in a web Inspector instead: > `--print-handoff` (below) prints a `portForwardCmd` for the web Inspector's > ports. > [!NOTE] > > Redirect URIs must match your r… CLI client Model Context Protocol · in the page docs/2026-07-28/tools/inspector/cli …pector/authorization) for the full flow, the web-to-CLI handoff, and `--print-handoff`. ## Recipes ### Verify a server in CI ```bash theme={null} set -euo pipefail # Fail the build if the server c… Configuration and flags Model Context Protocol · in the page docs/2026-07-28/tools/inspector/configuration …`--relogin`, `--no-revoke`, `--wait-for-auth`, `--list-stored-auth`, `--print-handoff` | ## Environment variables Environment variables split the same way as flags: two are read by the launcher itse… Web client Model Context Protocol · in the page docs/2026-07-28/tools/inspector/web …7ed) ## Deep links A driver (a script, a CI harness, or the CLI's [`--print-handoff`](/docs/2026-07-28/tools/inspector/authorization#handing-off-from-the-web-client-to-the-cli)) can reach a *connect… Authorization Model Context Protocol · in the page docs/draft/tools/inspector/authorization …back port to it, or complete the login in a web Inspector instead: > `--print-handoff` (below) prints a `portForwardCmd` for the web Inspector's > ports. > [!NOTE] > > Redirect URIs must match your r… CLI client Model Context Protocol · in the page docs/draft/tools/inspector/cli …pector/authorization) for the full flow, the web-to-CLI handoff, and `--print-handoff`. ## Recipes ### Verify a server in CI ```bash theme={null} set -euo pipefail # Fail the build if the server c… Configuration and flags Model Context Protocol · in the page docs/draft/tools/inspector/configuration …`--relogin`, `--no-revoke`, `--wait-for-auth`, `--list-stored-auth`, `--print-handoff` | ## Environment variables Environment variables split the same way as flags: two are read by the launcher itse… Web client Model Context Protocol · in the page docs/draft/tools/inspector/web …7ed) ## Deep links A driver (a script, a CI harness, or the CLI's [`--print-handoff`](/docs/draft/tools/inspector/authorization#handing-off-from-the-web-client-to-the-cli)) can reach a *connected* I…
Feedback