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

4 pages for --init-only.

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

CLI reference Claude Code CLI · in the page cli-reference …| | `--init-only` | Run [Setup](/docs/en/hooks#setup) and `SessionStart` hooks, then exit without sta… Hooks reference Claude Code CLI · in the page hooks …sion begins or resumes | | `Setup` | When you start Claude Code with `--init-only`, or with `--init` or `--maintenance` in `-p` mode. For one-time preparation in CI or scripts | | `UserPromptSubmit` |… Automate actions with hooks Claude Code CLI · in the page hooks-guide …sion begins or resumes | | `Setup` | When you start Claude Code with `--init-only`, or with `--init` or `--maintenance` in `-p` mode. For one-time preparation in CI or scripts | | `UserPromptSubmit` |… Test self-hosted environments end to end Claude Code CLI · in the page self-hosted-environments-testing …, such as `--resume`, `--continue`, `--teleport`, `--session-id`, or `--init-only`. `--cloud` is rejected with a session ID or URL, and in non-interactive runs when it carries a description. A bare `-…
Feedback