Skip to main content

CLI commands

You can start sessions, pipe content, resume conversations, and manage updates with these commands: If you mistype a subcommand, Claude Code suggests the closest match and exits without starting a session. For example, claude udpate prints Did you mean claude update?. As of v2.1.199, claude --dangerously-skip-permissions daemon <subcommand> runs the daemon subcommand. Earlier versions treated daemon <subcommand> as the prompt for a new interactive session, so the subcommand never ran when the flag came first, a common setup when claude is aliased to include the flag. Only a leading --dangerously-skip-permissions or --allow-dangerously-skip-permissions routes to daemon this way; any other leading flag still starts an interactive session.

CLI flags

Customize Claude Code’s behavior with these command-line flags. claude --help does not list every flag, so a flag’s absence from --help does not mean it is unavailable.

System prompt flags

Claude Code provides four flags for customizing the system prompt. All four work in both interactive and non-interactive modes. --system-prompt and --system-prompt-file are mutually exclusive. The append flags can be combined with either replacement flag. Choose based on whether Claude Code’s default identity still fits your task. Use an append flag when Claude should remain a coding assistant that also follows your extra rules: per-invocation instructions, output formatting, or domain context for a -p script. Appending preserves the default tool guidance, safety instructions, and coding conventions, so you only supply what differs. Use a replacement flag when the surface, identity, or permission model differs from Claude Code’s, like a non-coding agent in a pipeline that no human watches. Replacing drops all of the default prompt, including tool guidance and safety instructions, so you take responsibility for whatever your task still needs. These flags apply only to the current invocation. For persistent personas you can switch between and share across a project, use output styles. For project conventions Claude should always follow, use CLAUDE.md. The Agent SDK guide on system prompts covers the same decision in more depth.

See also