Search the documentation
5 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
…| | `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…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…| | `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…
Plugins reference
Claude Code CLI · in the page
plugins-reference
…| | `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…
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 `-…