What are all the command-line switches/flags/options available for the Claude Code CLI (claude command)? List all available arguments with their descriptions.


I'll fetch the Claude Code documentation to get you the complete list of command-line switches and options.


WebFetch

Prompt: Find the documentation page that covers Claude Code CLI commands, switches, flags, and command-line options


# null

# Claude Code Documentation Map

This is a comprehensive map of all Claude Code documentation pages with their headings, designed for easy navigation by LLMs.

> **Note:** This file is auto-generated by GitHub Actions. Do not edit manually.
> Last updated: 2025-11-06 00:10:13 UTC

## Document Structure

This map uses a hierarchical structure:

* **##** marks documentation groups (e.g., 'Getting started')
* **###** marks individual documentation pages
* **Nested bullets** show the heading structure within each page
* Each page title links to the full documentation

## Getting started

### [overview](https://code.claude.com/docs/en/overview.md)

* Get started in 30 seconds
* What Claude Code does for you
* Why developers love Claude Code
* Next steps
* Additional resources

### [quickstart](https://code.claude.com/docs/en/quickstart.md)

* Before you begin
* Step 1: Install Claude Code
* Step 2: Log in to your account
* Step 3: Start your first session
* Step 4: Ask your first question
* Step 5: Make your first code change
* Step 6: Use Git with Claude Code
* Step 7: Fix a bug or add a feature
* Step 8: Test out other common workflows
* Essential commands
* Pro tips for beginners
* What's next?
* Getting help

### [common-workflows](https://code.claude.com/docs/en/common-workflows.md)

* Understand new codebases
  * Get a quick codebase overview
  * Find relevant code
* Fix bugs efficiently
* Refactor code
* Use specialized subagents
* Use Plan Mode for safe code analysis
  * When to use Plan Mode
  * How to use Plan Mode
  * Example: Planning a complex refactor
  * Configure Plan Mode as default
* Work with tests
* Create pull requests
* Handle documentation
* Work with images
* Reference files and directories
* Use extended thinking
* Resume previous conversations
* Run parallel Claude Code sessions with Git worktrees
* Use Claude as a unix-style utility
  * Add Claude to your verification process
  * Pipe in, pipe out
  * Control output format
* Create custom slash commands
  * Create project-specific commands
  * Add command arguments with \$ARGUMENTS
  * Create personal slash commands
* Ask Claude about its capabilities
  * Example questions
* Next steps

### [claude-code-on-the-web](https://code.claude.com/docs/en/claude-code-on-the-web.md)

* What is Claude Code on the web?
* Who can use Claude Code on the web?
* Getting started
* How it works
* Moving tasks between web and terminal
  * From web to terminal
* Cloud environment
  * Default image
    * Checking available tools
    * Language-specific setups
  * Environment configuration
  * Dependency management
    * Local vs remote execution
    * Persisting environment variables
* Network access and security
  * Network policy
    * GitHub proxy
    * Security proxy
  * Access levels
  * Default allowed domains
    * Anthropic Services
    * Version Control
    * Container Registries
    * Cloud Platforms
    * Package Managers - JavaScript/Node
    * Package Managers - Python
    * Package Managers - Ruby
    * Package Managers - Rust
    * Package Managers - Go
    * Package Managers - JVM
    * Package Managers - Other Languages
    * Linux Distributions
    * Development Tools & Platforms
    * Cloud Services & Monitoring
    * Content Delivery & Mirrors
    * Schema & Configuration
  * Security best practices for customized network access
* Security and isolation
* Pricing and rate limits
* Limitations
* Best practices
* Related resources

## Build with Claude Code

### [sub-agents](https://code.claude.com/docs/en/sub-agents.md)

* What are subagents?
* Key benefits
* Quick start
* Subagent configuration
  * File locations
  * Plugin agents
  * CLI-based configuration
  * File format
    * Configuration fields
  * Model selection
  * Available tools
* Managing subagents
  * Using the /agents command (Recommended)
  * Direct file management
* Using subagents effectively
  * Automatic delegation
  * Explicit invocation
* Built-in subagents
  * Plan subagent
* Example subagents
  * Code reviewer
  * Debugger
  * Data scientist
* Best practices
* Advanced usage
  * Chaining subagents
  * Dynamic subagent selection
  * Resumable subagents
* Performance considerations
* Related documentation

### [plugins](https://code.claude.com/docs/en/plugins.md)

* Quickstart
  * Prerequisites
  * Create your first plugin
* Hello Command
  * Plugin structure overview
  * Install and manage plugins
    * Prerequisites
    * Add marketplaces
    * Install plugins
      * Via interactive menu (recommended for discovery)
      * Via direct commands (for quick installation)
    * Verify installation
  * Set up team plugin workflows
  * Develop more complex plugins
    * Add Skills to your plugin
    * Organize complex plugins
    * Test your plugins locally
    * Debug plugin issues
    * Share your plugins
  * Next steps
    * For plugin users
    * For plugin developers
    * For team leads and administrators
  * See also

### [skills](https://code.claude.com/docs/en/skills.md)

* Prerequisites
* What are Agent Skills?
* Create a Skill
  * Personal Skills
  * Project Skills
  * Plugin Skills
* Write SKILL.md
* Add supporting files
* Restrict tool access with allowed-tools
* View available Skills
* Test a Skill
* Debug a Skill
  * Make description specific
  * Verify file path
  * Check YAML syntax
  * View errors
* Share Skills with your team
  * Step 1: Add Skill to your project
  * Step 2: Commit to git
  * Step 3: Team members get Skills automatically
* Update a Skill
* Remove a Skill
* Best practices
  * Keep Skills focused
  * Write clear descriptions
  * Test with your team
  * Document Skill versions
* Troubleshooting
  * Claude doesn't use my Skill
  * Skill has errors
  * Multiple Skills conflict
* Examples
  * Simple Skill (single file)
  * Skill with tool permissions
  * Multi-file Skill
* Next steps

### [output-styles](https://code.claude.com/docs/en/output-styles.md)

* Built-in output styles
* How output styles work
* Change your output style
* Create a custom output style
* Comparisons to related features
  * Output Styles vs. CLAUDE.md vs. --append-system-prompt
  * Output Styles vs. [Agents](/en/sub-agents)
  * Output Styles vs. [Custom Slash Commands](/en/slash-commands)

### [hooks-guide](https://code.claude.com/docs/en/hooks-guide.md)

* Hook Events Overview
* Quickstart
  * Prerequisites
  * Step 1: Open hooks configuration
  * Step 2: Add a matcher
  * Step 3: Add the hook
  * Step 4: Save your configuration
  * Step 5: Verify your hook
  * Step 6: Test your hook
* More Examples
  * Code Formatting Hook
  * Markdown Formatting Hook
  * Custom Notification Hook
  * File Protection Hook
* Learn more

### [headless](https://code.claude.com/docs/en/headless.md)

* Overview
* Basic usage
* Configuration Options
* Multi-turn conversations
* Output Formats
  * Text Output (Default)
  * JSON Output
  * Streaming JSON Output
* Input Formats
  * Text Input (Default)
  * Streaming JSON Input
* Agent Integration Examples
  * SRE Incident Response Bot
  * Automated Security Review
  * Multi-turn Legal Assistant
* Best Practices
* Related Resources

### [github-actions](https://code.claude.com/docs/en/github-actions.md)

* Why use Claude Code GitHub Actions?
* What can Claude do?
  * Claude Code Action
* Setup
* Quick setup
* Manual setup
* Upgrading from Beta
  * Essential changes
  * Breaking Changes Reference
  * Before and After Example
* Example use cases
  * Basic workflow
  * Using slash commands
  * Custom automation with prompts
  * Common use cases
* Best practices
  * CLAUDE.md configuration
  * Security considerations
  * Optimizing performance
  * CI costs
* Configuration examples
* Using with AWS Bedrock & Google Vertex AI
  * Prerequisites
    * For Google Cloud Vertex AI:
    * For AWS Bedrock:
* Troubleshooting
  * Claude not responding to @claude commands
  * CI not running on Claude's commits
  * Authentication errors
* Advanced configuration
  * Action parameters
    * Using claude\_args
  * Alternative integration methods
  * Customizing Claude's behavior

### [gitlab-ci-cd](https://code.claude.com/docs/en/gitlab-ci-cd.md)

* Why use Claude Code with GitLab?
* How it works
* What can Claude do?
* Setup
  * Quick setup
  * Manual setup (recommended for production)
* Example use cases
  * Turn issues into MRs
  * Get implementation help
  * Fix bugs quickly
* Using with AWS Bedrock & Google Vertex AI
* Configuration examples
  * Basic .gitlab-ci.yml (Claude API)
  * AWS Bedrock job example (OIDC)
  * Google Vertex AI job example (Workload Identity Federation)
* Best practices
  * CLAUDE.md configuration
  * Security considerations
  * Optimizing performance
  * CI costs
* Security and governance
* Troubleshooting
  * Claude not responding to @claude commands
  * Job can't write comments or open MRs
  * Authentication errors
* Advanced configuration
  * Common parameters and variables
  * Customizing Claude's behavior

### [mcp](https://code.claude.com/docs/en/mcp.md)

* What you can do with MCP
* Popular MCP servers
* Installing MCP servers
  * Option 1: Add a remote HTTP server
  * Option 2: Add a remote SSE server
  * Option 3: Add a local stdio server
  * Managing your servers
  * Plugin-provided MCP servers
* MCP installation scopes
  * Local scope
  * Project scope
  * User scope
  * Choosing the right scope
  * Scope hierarchy and precedence
  * Environment variable expansion in `.mcp.json`
* Practical examples
  * Example: Monitor errors with Sentry
  * Example: Connect to GitHub for code reviews
  * Example: Query your PostgreSQL database
* Authenticate with remote MCP servers
* Add MCP servers from JSON configuration
* Import MCP servers from Claude Desktop
* Use Claude Code as an MCP server
* MCP output limits and warnings
* Use MCP resources
  * Reference MCP resources
* Use MCP prompts as slash commands
  * Execute MCP prompts
* Enterprise MCP configuration
  * Setting up enterprise MCP configuration
  * Restricting MCP servers with allowlists and denylists

### [migration-guide](https://code.claude.com/docs/en/migration-guide.md)

* Overview
* What's Changed
* Migration Steps
  * For TypeScript/JavaScript Projects
  * For Python Projects
* Breaking changes
  * Python: ClaudeCodeOptions renamed to ClaudeAgentOptions
  * System prompt no longer default
  * Settings Sources No Longer Loaded by Default
* Why the Rename?
* Getting Help
* Next Steps

### [troubleshooting](https://code.claude.com/docs/en/troubleshooting.md)

* Common installation issues
  * Windows installation issues: errors in WSL
  * Linux and Mac installation issues: permission or command not found errors
    * Recommended solution: Native Claude Code installation
* Permissions and authentication
  * Repeated permission prompts
  * Authentication issues
* Performance and stability
  * High CPU or memory usage
  * Command hangs or freezes
  * Search and discovery issues
  * Slow or incomplete search results on WSL
* IDE integration issues
  * JetBrains IDE not detected on WSL2
    * WSL2 networking modes
  * Reporting Windows IDE integration issues (both native and WSL)
  * ESC key not working in JetBrains (IntelliJ, PyCharm, etc.) terminals
* Markdown formatting issues
  * Missing language tags in code blocks
  * Inconsistent spacing and formatting
  * Best practices for markdown generation
* Getting more help

## Deployment

### [third-party-integrations](https://code.claude.com/docs/en/third-party-integrations.md)

* Provider comparison
* Cloud providers
* Corporate infrastructure
* Configuration overview
  * Using Bedrock with corporate proxy
  * Using Bedrock with LLM Gateway
  * Using Vertex AI with corporate proxy
  * Using Vertex AI with LLM Gateway
  * Authentication configuration
* Choosing the right deployment configuration
  * Direct provider access
  * Corporate proxy
  * LLM Gateway
* Debugging
* Best practices for organizations
  * 1. Invest in documentation and memory
  * 2. Simplify deployment
  * 3. Start with guided usage
  * 4. Configure security policies
  * 5. Leverage MCP for integrations
* Next steps

### [amazon-bedrock](https://code.claude.com/docs/en/amazon-bedrock.md)

* Prerequisites
* Setup
  * 1. Submit use case details
  * 2. Configure AWS credentials
    * Advanced credential configuration
      * Example configuration
      * Configuration settings explained
  * 3. Configure Claude Code
  * 4. Model configuration
  * 5. Output token configuration
* IAM configuration
* Troubleshooting
* Additional resources

### [google-vertex-ai](https://code.claude.com/docs/en/google-vertex-ai.md)

* Prerequisites
* Region Configuration
* Setup
  * 1. Enable Vertex AI API
  * 2. Request model access
  * 3. Configure GCP credentials
  * 4. Configure Claude Code
  * 5. Model configuration
* IAM configuration
* 1M token context window
* Troubleshooting
* Additional resources

### [network-config](https://code.claude.com/docs/en/network-config.md)

* Proxy configuration
  * Environment variables
  * Basic authentication
* Custom CA certificates
* mTLS authentication
* Network access requirements
* Additional resources

### [llm-gateway](https://code.claude.com/docs/en/llm-gateway.md)

* LiteLLM configuration
  * Prerequisites
  * Basic LiteLLM setup
    * Authentication methods
      * Static API key
      * Dynamic API key with helper
    * Unified endpoint (recommended)
    * Provider-specific pass-through endpoints (alternative)
      * Claude API through LiteLLM
      * Amazon Bedrock through LiteLLM
      * Google Vertex AI through LiteLLM
  * Model selection
* Additional resources

### [devcontainer](https://code.claude.com/docs/en/devcontainer.md)

* Key features
* Getting started in 4 steps
* Configuration breakdown
* Security features
* Customization options
* Example use cases
  * Secure client work
  * Team onboarding
  * Consistent CI/CD environments
* Related resources

### [sandboxing](https://code.claude.com/docs/en/sandboxing.md)

* Overview
* Why sandboxing matters
* How it works
  * Filesystem isolation
  * Network isolation
  * OS-level enforcement
* Getting started
  * Enable sandboxing
  * Configure sandboxing
* Security benefits
  * Protection against prompt injection
  * Reduced attack surface
  * Transparent operation
* Security Limitations
* Advanced usage
  * Custom proxy configuration
  * Integration with existing security tools
* Best practices
* Open source
* Limitations
* See also

## Administration

### [setup](https://code.claude.com/docs/en/setup.md)

* System requirements
  * Additional dependencies
* Standard installation
* Windows setup
* Alternative installation methods
  * Native installation options
  * NPM installation
* Running on AWS or GCP
* Update Claude Code
  * Auto updates
  * Update manually

### [iam](https://code.claude.com/docs/en/iam.md)

* Authentication methods
  * Claude API authentication
  * Cloud provider authentication
* Access control and permissions
  * Permission system
  * Configuring permissions
    * Permission modes
    * Working directories
    * Tool-specific permission rules
  * Additional permission control with hooks
  * Enterprise managed policy settings
  * Settings precedence
* Credential management

### [security](https://code.claude.com/docs/en/security.md)

* How we approach security
  * Security foundation
  * Permission-based architecture
  * Built-in protections
  * User responsibility
* Protect against prompt injection
  * Core protections
  * Privacy safeguards
  * Additional safeguards
* MCP security
* IDE security
* Cloud execution security
* Security best practices
  * Working with sensitive code
  * Team security
  * Reporting security issues
* Related resources

### [data-usage](https://code.claude.com/docs/en/data-usage.md)

* Data policies
  * Data training policy
  * Development Partner Program
  * Feedback using the `/bug` command
  * Session quality surveys
  * Data retention
* Data flow and dependencies
  * Cloud execution
* Telemetry services
* Default behaviors by API provider

### [monitoring-usage](https://code.claude.com/docs/en/monitoring-usage.md)

* Quick Start
* Administrator Configuration
* Configuration Details
  * Common Configuration Variables
  * Metrics Cardinality Control
  * Dynamic Headers
    * Settings Configuration
    * Script Requirements
    * Important Limitations
  * Multi-Team Organization Support
  * Example Configurations
* Available Metrics and Events
  * Standard Attributes
  * Metrics
  * Metric Details
    * Session Counter
    * Lines of Code Counter
    * Pull Request Counter
    * Commit Counter
    * Cost Counter
    * Token Counter
    * Code Edit Tool Decision Counter
    * Active Time Counter
  * Events
    * User Prompt Event
    * Tool Result Event
    * API Request Event
    * API Error Event
    * Tool Decision Event
* Interpreting Metrics and Events Data
  * Usage Monitoring
  * Cost Monitoring
  * Alerting and Segmentation
  * Event Analysis
* Backend Considerations
  * For Metrics:
  * For Events/Logs:
* Service Information
* ROI Measurement Resources
* Security/Privacy Considerations
* Monitoring Claude Code on Amazon Bedrock

### [costs](https://code.claude.com/docs/en/costs.md)

* Track your costs
  * Using the `/cost` command
  * Additional tracking options
* Managing costs for teams
  * Rate limit recommendations
* Reduce token usage
* Background token usage
* Tracking version changes and updates
  * Current version information
  * Understanding changes in Claude Code behavior
  * When cost reporting changes

### [analytics](https://code.claude.com/docs/en/analytics.md)

* Access analytics
  * Required roles
* Available metrics
  * Lines of code accepted
  * Suggestion accept rate
  * Activity
  * Spend
  * Team insights
* Using analytics effectively
  * Monitor adoption
  * Measure productivity
* Related resources

### [plugin-marketplaces](https://code.claude.com/docs/en/plugin-marketplaces.md)

* Overview
  * Prerequisites
* Add and use marketplaces
  * Add GitHub marketplaces
  * Add Git repositories
  * Add local marketplaces for development
  * Install plugins from marketplaces
  * Verify marketplace installation
* Configure team marketplaces
* Create your own marketplace
  * Prerequisites for marketplace creation
  * Create the marketplace file
  * Marketplace schema
    * Required fields
    * Optional metadata
  * Plugin entries
    * Optional plugin fields
  * Plugin sources
    * Relative paths
    * GitHub repositories
    * Git repositories
    * Advanced plugin entries
* Host and distribute marketplaces
  * Host on GitHub (recommended)
  * Host on other git services
  * Use local marketplaces for development
* Manage marketplace operations
  * List known marketplaces
  * Update marketplace metadata
  * Remove a marketplace
* Troubleshooting marketplaces
  * Common marketplace issues
    * Marketplace not loading
    * Plugin installation failures
  * Validation and testing
* Next steps
  * For marketplace users
  * For marketplace creators
  * For organizations
* See also

## Configuration

### [settings](https://code.claude.com/docs/en/settings.md)

* Settings files
  * Available settings
  * Permission settings
  * Sandbox settings
  * Settings precedence
  * Key points about the configuration system
  * System prompt availability
  * Excluding sensitive files
* Subagent configuration
* Plugin configuration
  * Plugin settings
    * `enabledPlugins`
    * `extraKnownMarketplaces`
  * Managing plugins
* Environment variables
* Tools available to Claude
  * Extending tools with hooks
* See also

### [vs-code](https://code.claude.com/docs/en/vs-code.md)

* VS Code Extension (Beta)
  * Features
  * Requirements
  * Installation
  * How It Works
  * Using Third-Party Providers (Vertex and Bedrock)
    * Environment Variables
  * Not Yet Implemented
* Security Considerations
* Legacy CLI Integration
* Troubleshooting
  * Extension Not Installing
  * Legacy Integration Not Working

### [jetbrains](https://code.claude.com/docs/en/jetbrains.md)

* Supported IDEs
* Features
* Installation
  * Marketplace Installation
* Usage
  * From Your IDE
  * From External Terminals
* Configuration
  * Claude Code Settings
  * Plugin Settings
    * General Settings
    * ESC Key Configuration
* Special Configurations
  * Remote Development
  * WSL Configuration
* Troubleshooting
  * Plugin Not Working
  * IDE Not Detected
  * Command Not Found
* Security Considerations

### [terminal-config](https://code.claude.com/docs/en/terminal-config.md)

* Themes and appearance
* Line breaks
  * Set up Shift+Enter (VS Code or iTerm2):
  * Set up Option+Enter (VS Code, iTerm2 or macOS Terminal.app):
* Notification setup
  * iTerm 2 system notifications
  * Custom notification hooks
* Handling large inputs
* Vim Mode

### [model-config](https://code.claude.com/docs/en/model-config.md)

* Available models
  * Model aliases
  * Setting your model
* Special model behavior
  * `default` model setting
  * `opusplan` model setting
  * Extended context with \[1m]
* Checking your current model
* Environment variables
  * Prompt caching configuration

### [memory](https://code.claude.com/docs/en/memory.md)

* Determine memory type
* CLAUDE.md imports
* How Claude looks up memories
* Quickly add memories with the `#` shortcut
* Directly edit memories with `/memory`
* Set up project memory
* Organization-level memory management
* Memory best practices

### [statusline](https://code.claude.com/docs/en/statusline.md)

* Create a custom status line
* How it Works
* JSON Input Structure
* Example Scripts
  * Simple Status Line
  * Git-Aware Status Line
  * Python Example
  * Node.js Example
  * Helper Function Approach
* Tips
* Troubleshooting

## Reference

### [cli-reference](https://code.claude.com/docs/en/cli-reference.md)

* CLI commands
* CLI flags
  * Agents flag format
  * System prompt flags
* See also

### [interactive-mode](https://code.claude.com/docs/en/interactive-mode.md)

* Keyboard shortcuts
  * General controls
  * Multiline input
  * Quick commands
* Vim editor mode
  * Mode switching
  * Navigation (NORMAL mode)
  * Editing (NORMAL mode)
* Command history
  * Reverse search with Ctrl+R
* Background bash commands
  * How backgrounding works
  * Bash mode with `!` prefix
* See also

### [slash-commands](https://code.claude.com/docs/en/slash-commands.md)

* Built-in slash commands
* Custom slash commands
  * Syntax
    * Parameters
  * Command types
    * Project commands
    * Personal commands
  * Features
    * Namespacing
    * Arguments
      * All arguments with `$ARGUMENTS`
      * Individual arguments with `$1`, `$2`, etc.
    * Bash command execution
    * File references
    * Thinking mode
  * Frontmatter
* Plugin commands
  * How plugin commands work
  * Plugin command structure
  * Invocation patterns
* MCP slash commands
  * Command format
  * Features
    * Dynamic discovery
    * Arguments
    * Naming conventions
  * Managing MCP connections
  * MCP permissions and wildcards
* `SlashCommand` tool
  * `SlashCommand` tool supported commands
  * Disable `SlashCommand` tool
  * Disable specific commands only
  * `SlashCommand` permission rules
  * Character budget limit
* Skills vs slash commands
  * Use slash commands for
  * Use Skills for
  * Key differences
  * Example comparison
  * When to use each
* See also

### [checkpointing](https://code.claude.com/docs/en/checkpointing.md)

* How checkpoints work
  * Automatic tracking
  * Rewinding changes
* Common use cases
* Limitations
  * Bash command changes not tracked
  * External changes not tracked
  * Not a replacement for version control
* See also

### [hooks](https://code.claude.com/docs/en/hooks.md)

* Configuration
  * Structure
  * Project-Specific Hook Scripts
  * Plugin hooks
* Prompt-Based Hooks
  * How prompt-based hooks work
  * Configuration
  * Response schema
  * Supported hook events
  * Example: Intelligent Stop hook
  * Example: SubagentStop with custom logic
  * Comparison with bash command hooks
  * Best practices
* Hook Events
  * PreToolUse
  * PermissionRequest
  * PostToolUse
  * Notification
  * UserPromptSubmit
  * Stop
  * SubagentStop
  * PreCompact
  * SessionStart
    * Persisting environment variables
  * SessionEnd
* Hook Input
  * PreToolUse Input
  * PermissionRequest
  * PostToolUse Input
  * Notification Input
  * UserPromptSubmit Input
  * Stop and SubagentStop Input
  * PreCompact Input
  * SessionStart Input
  * SessionEnd Input
* Hook Output
  * Simple: Exit Code
    * Exit Code 2 Behavior
  * Advanced: JSON Output
    * Common JSON Fields
    * `PreToolUse` Decision Control
    * `PermissionRequest` Decision Control
    * `PostToolUse` Decision Control
    * `UserPromptSubmit` Decision Control
    * `Stop`/`SubagentStop` Decision Control
    * `SessionStart` Decision Control
    * `SessionEnd` Decision Control
    * Exit Code Example: Bash Command Validation
    * JSON Output Example: UserPromptSubmit to Add Context and Validation
    * JSON Output Example: PreToolUse with Approval
* Working with MCP Tools
  * MCP Tool Naming
  * Configuring Hooks for MCP Tools
* Examples
* Security Considerations
  * Disclaimer
  * Security Best Practices
  * Configuration Safety
* Hook Execution Details
* Debugging
  * Basic Troubleshooting
  * Advanced Debugging
  * Debug Output Example

### [plugins-reference](https://code.claude.com/docs/en/plugins-reference.md)

* Plugin components reference
  * Commands
  * Agents
  * Skills
  * Hooks
  * MCP servers
* Plugin manifest schema
  * Complete schema
  * Required fields
  * Metadata fields
  * Component path fields
  * Path behavior rules
  * Environment variables
* Plugin directory structure
  * Standard plugin layout
  * File locations reference
* Debugging and development tools
  * Debugging commands
  * Common issues
* Distribution and versioning reference
  * Version management

## Resources

### [legal-and-compliance](https://code.claude.com/docs/en/legal-and-compliance.md)

* Legal agreements
  * License
  * Commercial agreements
* Compliance
  * Healthcare compliance (BAA)
* Security and trust
  * Trust and safety
  * Security vulnerability reporting

---

> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt


Great! I found that the CLI reference is in the documentation. Let me fetch the specific CLI reference page:


Prompt: List all Claude Code CLI commands, flags, switches, and options with their descriptions


# CLI reference

> Complete reference for Claude Code command-line interface, including commands and flags.

## CLI commands

| Command                         | Description                                    | Example                                           |
| :------------------------------ | :--------------------------------------------- | :------------------------------------------------ |
| `claude`                        | Start interactive REPL                         | `claude`                                          |
| `claude "query"`                | Start REPL with initial prompt                 | `claude "explain this project"`                   |
| `claude -p "query"`             | Query via SDK, then exit                       | `claude -p "explain this function"`               |
| `cat file \| claude -p "query"` | Process piped content                          | `cat logs.txt \| claude -p "explain"`             |
| `claude -c`                     | Continue most recent conversation              | `claude -c`                                       |
| `claude -c -p "query"`          | Continue via SDK                               | `claude -c -p "Check for type errors"`            |
| `claude -r "<session>" "query"` | Resume session by ID or name                   | `claude -r "auth-refactor" "Finish this PR"`      |
| `claude update`                 | Update to latest version                       | `claude update`                                   |
| `claude mcp`                    | Configure Model Context Protocol (MCP) servers | See the [Claude Code MCP documentation](/en/mcp). |

## CLI flags

Customize Claude Code's behavior with these command-line flags:

| Flag                             | Description                                                                                | Example                                                                                |
| :------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------- |
| `--add-dir`                      | Add additional working directories for Claude to access (validates each path exists as a directory)                                                                                | `claude --add-dir ../apps ../lib`                                                                  |
| `--agent`                        | Specify an agent for the current session (overrides the `agent` setting)                                                                                | `claude --agent my-custom-agent`                                                                   |
| `--agents`                       | Define custom [subagents](/en/sub-agents) dynamically via JSON (see below for format)                                                                                | `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'` |
| `--allowedTools`                 | Tools that execute without prompting for permission. To restrict which tools are available, use `--tools` instead                                                                                | `"Bash(git log:*)" "Bash(git diff:*)" "Read"`                                                      |
| `--append-system-prompt`         | Append custom text to the end of the default system prompt (works in both interactive and print modes)                                                                                | `claude --append-system-prompt "Always use TypeScript"`                                            |
| `--betas`                        | Beta headers to include in API requests (API key users only)                                                                                | `claude --betas interleaved-thinking`                                                              |
| `--chrome`                       | Enable [Chrome browser integration](/en/chrome) for web automation and testing                                                                                | `claude --chrome`                                                                                |
| `--continue`, `-c`               | Load the most recent conversation in the current directory                                                                                | `claude --continue`                                                                                |
| `--dangerously-skip-permissions` | Skip permission prompts (use with caution)                                                                                | `claude --dangerously-skip-permissions`                                                            |
| `--debug`                        | Enable debug mode with optional category filtering (for example, `"api,hooks"` or `"!statsig,!file"`)                                                                                | `claude --debug "api,mcp"`                                                                         |
| `--disallowedTools`              | Tools that are removed from the model's context and cannot be used                                                                                | `"Bash(git log:*)" "Bash(git diff:*)" "Edit"`                                                      |
| `--enable-lsp-logging`           | Enable verbose LSP logging for debugging language server issues. Logs are written to `~/.claude/debug/`                                                                                | `claude --enable-lsp-logging`                                                                      |
| `--fallback-model`               | Enable automatic fallback to specified model when default model is overloaded (print mode only)                                                                                | `claude -p --fallback-model sonnet "query"`                                                        |
| `--fork-session`                 | When resuming, create a new session ID instead of reusing the original (use with `--resume` or `--continue`)                                                                                | `claude --resume abc123 --fork-session`                                                            |
| `--ide`                          | Automatically connect to IDE on startup if exactly one valid IDE is available                                                                                | `claude --ide`                                                                                |
| `--include-partial-messages`     | Include partial streaming events in output (requires `--print` and `--output-format=stream-json`)                                                                                | `claude -p --output-format stream-json --include-partial-messages "query"`                         |
| `--input-format`                 | Specify input format for print mode (options: `text`, `stream-json`)                                                                                | `claude -p --output-format json --input-format stream-json`                                        |
| `--json-schema`                  | Get validated JSON output matching a JSON Schema after agent completes its workflow (print mode only, see [Agent SDK Structured Outputs](https://docs.claude.com/en/docs/agent-sdk/structured-outputs)) | `claude -p --json-schema '{"type":"object","properties":{...}}' "query"`                           |
| `--max-turns`                    | Limit the number of agentic turns in non-interactive mode                                                                                | `claude -p --max-turns 3 "query"`                                                                  |
| `--mcp-config`                   | Load MCP servers from JSON files or strings (space-separated)                                                                                | `claude --mcp-config ./mcp.json`                                                                   |
| `--model`                        | Sets the model for the current session with an alias for the latest model (`sonnet` or `opus`) or a model's full name                                                                                | `claude --model claude-sonnet-4-5-20250929`                                                        |
| `--no-chrome`                    | Disable [Chrome browser integration](/en/chrome) for this session                                                                                | `claude --no-chrome`                                                                               |
| `--output-format`                | Specify output format for print mode (options: `text`, `json`, `stream-json`)                                                                                | `claude -p "query" --output-format json`                                                           |
| `--permission-mode`              | Begin in a specified [permission mode](/en/iam#permission-modes)                                                                                | `claude --permission-mode plan`                                                                    |
| `--permission-prompt-tool`       | Specify an MCP tool to handle permission prompts in non-interactive mode                                                                                | `claude -p --permission-prompt-tool mcp_auth_tool "query"`                                         |
| `--plugin-dir`                   | Load plugins from directories for this session only (repeatable)                                                                                | `claude --plugin-dir ./my-plugins`                                                                 |
| `--print`, `-p`                  | Print response without interactive mode (see [SDK documentation](https://docs.claude.com/en/docs/agent-sdk) for programmatic usage details)                                                             | `claude -p "query"`                                                                                |
| `--resume`, `-r`                 | Resume a specific session by ID or name, or show an interactive picker to choose a session                                                                                | `claude --resume auth-refactor`                                                                    |
| `--session-id`                   | Use a specific session ID for the conversation (must be a valid UUID)                                                                                | `claude --session-id "550e8400-e29b-41d4-a716-446655440000"`                                       |
| `--setting-sources`              | Comma-separated list of setting sources to load (`user`, `project`, `local`)                                                                                | `claude --setting-sources user,project`                                                            |
| `--settings`                     | Path to a settings JSON file or a JSON string to load additional settings from                                                                                | `claude --settings ./settings.json`                                                                |
| `--strict-mcp-config`            | Only use MCP servers from `--mcp-config`, ignoring all other MCP configurations                                                                                | `claude --strict-mcp-config --mcp-config ./mcp.json`                                               |
| `--system-prompt`                | Replace the entire system prompt with custom text (works in both interactive and print modes)                                                                                | `claude --system-prompt "You are a Python expert"`                                                 |
| `--system-prompt-file`           | Load system prompt from a file, replacing the default prompt (print mode only)                                                                                | `claude -p --system-prompt-file ./custom-prompt.txt "query"`                                       |
| `--tools`                        | Specify the list of available tools from the built-in set (use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"`)                                                         | `claude -p --tools "Bash,Edit,Read" "query"`                                                       |
| `--verbose`                      | Enable verbose logging, shows full turn-by-turn output (helpful for debugging in both print and interactive modes)                                                                                | `claude --verbose`                                                                                |
| `--version`, `-v`                | Output the version number                                                                                | `claude -v`                                                                                |

<Tip>
  The `--output-format json` flag is particularly useful for scripting and
  automation, allowing you to parse Claude's responses programmatically.
</Tip>

### Agents flag format

The `--agents` flag accepts a JSON object that defines one or more custom subagents. Each subagent requires a unique name (as the key) and a definition object with the following fields:

| Field         | Required | Description                                                                                |
| :------------ | :------- | :--------------------------------------------------------------------------------------------------------------------- |
| `description` | Yes      | Natural language description of when the subagent should be invoked                                                    |
| `prompt`      | Yes      | The system prompt that guides the subagent's behavior                                                                  |
| `tools`       | No       | Array of specific tools the subagent can use (for example, `["Read", "Edit", "Bash"]`). If omitted, inherits all tools |
| `model`       | No       | Model alias to use: `sonnet`, `opus`, or `haiku`. If omitted, uses the default subagent model                          |

Example:

```bash  theme={null}
claude --agents '{
  "code-reviewer": {
    "description": "Expert code reviewer. Use proactively after code changes.",
    "prompt": "You are a senior code reviewer. Focus on code quality, security, and best practices.",
    "tools": ["Read", "Grep", "Glob", "Bash"],
    "model": "sonnet"
  },
  "debugger": {
    "description": "Debugging specialist for errors and test failures.",
    "prompt": "You are an expert debugger. Analyze errors, identify root causes, and provide fixes."
  }
}'
```

For more details on creating and using subagents, see the [subagents documentation](/en/sub-agents).

### System prompt flags

Claude Code provides three flags for customizing the system prompt, each serving a different purpose:

| Flag                     | Behavior                           | Modes               | Use Case                                                             |
| :----------------------- | :--------------------------------- | :------------------ | :------------------------------------------------------------------- |
| `--system-prompt`        | **Replaces** entire default prompt | Interactive + Print | Complete control over Claude's behavior and instructions             |
| `--system-prompt-file`   | **Replaces** with file contents    | Print only          | Load prompts from files for reproducibility and version control      |
| `--append-system-prompt` | **Appends** to default prompt      | Interactive + Print | Add specific instructions while keeping default Claude Code behavior |

**When to use each:**

* **`--system-prompt`**: Use when you need complete control over Claude's system prompt. This removes all default Claude Code instructions, giving you a blank slate.
  ```bash  theme={null}
  claude --system-prompt "You are a Python expert who only writes type-annotated code"
  ```

* **`--system-prompt-file`**: Use when you want to load a custom prompt from a file, useful for team consistency or version-controlled prompt templates.
  ```bash  theme={null}
  claude -p --system-prompt-file ./prompts/code-review.txt "Review this PR"
  ```

* **`--append-system-prompt`**: Use when you want to add specific instructions while keeping Claude Code's default capabilities intact. This is the safest option for most use cases.
  ```bash  theme={null}
  claude --append-system-prompt "Always use TypeScript and include JSDoc comments"
  ```

<Note>
  `--system-prompt` and `--system-prompt-file` are mutually exclusive. You cannot use both flags simultaneously.
</Note>

<Tip>
  For most use cases, `--append-system-prompt` is recommended as it preserves Claude Code's built-in capabilities while adding your custom requirements. Use `--system-prompt` or `--system-prompt-file` only when you need complete control over the system prompt.
</Tip>

For detailed information about print mode (`-p`) including output formats,
streaming, verbose logging, and programmatic usage, see the
[SDK documentation](https://docs.claude.com/en/docs/agent-sdk).

## See also

* [Chrome extension](/en/chrome) - Browser automation and web testing
* [Interactive mode](/en/interactive-mode) - Shortcuts, input modes, and interactive features
* [Slash commands](/en/slash-commands) - Interactive session commands
* [Quickstart guide](/en/quickstart) - Getting started with Claude Code
* [Common workflows](/en/common-workflows) - Advanced workflows and patterns
* [Settings](/en/settings) - Configuration options
* [SDK documentation](https://docs.claude.com/en/docs/agent-sdk) - Programmatic usage and integrations

---

> To find navigation and other pages in this documentation, fetch the llms.txt file at: https://code.claude.com/docs/llms.txt


Perfect! Here's the complete reference for Claude Code CLI switches, flags, and options:

## Claude Code CLI Commands & Flags

### CLI Commands

| Command | Description | Example |
|---------|-------------|---------|
| `claude` | Start interactive REPL | `claude` |
| `claude "query"` | Start REPL with initial prompt | `claude "explain this project"` |
| `claude -p "query"` | Query via SDK, then exit | `claude -p "explain this function"` |
| `cat file \| claude -p "query"` | Process piped content | `cat logs.txt \| claude -p "explain"` |
| `claude -c` | Continue most recent conversation | `claude -c` |
| `claude -c -p "query"` | Continue via SDK | `claude -c -p "Check for type errors"` |
| `claude -r "<session>" "query"` | Resume session by ID or name | `claude -r "auth-refactor" "Finish this PR"` |
| `claude update` | Update to latest version | `claude update` |
| `claude mcp` | Configure Model Context Protocol (MCP) servers | See MCP documentation |

### CLI Flags (Complete List)

| Flag | Description | Example |
|------|-------------|---------|
| `--add-dir` | Add additional working directories for Claude to access | `claude --add-dir ../apps ../lib` |
| `--agent` | Specify an agent for the current session | `claude --agent my-custom-agent` |
| `--agents` | Define custom subagents dynamically via JSON | `claude --agents '{"reviewer":{"description":"...","prompt":"..."}}'` |
| `--allowedTools` | Tools that execute without prompting for permission | `"Bash(git log:*)" "Bash(git diff:*)" "Read"` |
| `--append-system-prompt` | Append custom text to the end of the default system prompt | `claude --append-system-prompt "Always use TypeScript"` |
| `--betas` | Beta headers to include in API requests (API key users only) | `claude --betas interleaved-thinking` |
| `--chrome` | Enable Chrome browser integration for web automation | `claude --chrome` |
| `--continue`, `-c` | Load the most recent conversation in current directory | `claude --continue` |
| `--dangerously-skip-permissions` | Skip permission prompts (use with caution) | `claude --dangerously-skip-permissions` |
| `--debug` | Enable debug mode with optional category filtering | `claude --debug "api,mcp"` |
| `--disallowedTools` | Tools removed from the model's context | `"Bash(git log:*)" "Bash(git diff:*)" "Edit"` |
| `--enable-lsp-logging` | Enable verbose LSP logging for debugging language server issues | `claude --enable-lsp-logging` |
| `--fallback-model` | Enable automatic fallback to specified model when default is overloaded | `claude -p --fallback-model sonnet "query"` |
| `--fork-session` | When resuming, create new session ID instead of reusing original | `claude --resume abc123 --fork-session` |
| `--ide` | Automatically connect to IDE on startup if one is available | `claude --ide` |
| `--include-partial-messages` | Include partial streaming events in output | `claude -p --output-format stream-json --include-partial-messages "query"` |
| `--input-format` | Specify input format for print mode (options: `text`, `stream-json`) | `claude -p --input-format stream-json` |
| `--json-schema` | Get validated JSON output matching a JSON Schema | `claude -p --json-schema '{"type":"object","properties":{...}}' "query"` |
| `--max-turns` | Limit the number of agentic turns in non-interactive mode | `claude -p --max-turns 3 "query"` |
| `--mcp-config` | Load MCP servers from JSON files or strings | `claude --mcp-config ./mcp.json` |
| `--model` | Sets the model for the current session | `claude --model claude-sonnet-4-5-20250929` |
| `--no-chrome` | Disable Chrome browser integration for this session | `claude --no-chrome` |
| `--output-format` | Specify output format for print mode (options: `text`, `json`, `stream-json`) | `claude -p "query" --output-format json` |
| `--permission-mode` | Begin in a specified permission mode | `claude --permission-mode plan` |
| `--permission-prompt-tool` | Specify an MCP tool to handle permission prompts | `claude -p --permission-prompt-tool mcp_auth_tool "query"` |
| `--plugin-dir` | Load plugins from directories for this session only (repeatable) | `claude --plugin-dir ./my-plugins` |
| `--print`, `-p` | Print response without interactive mode | `claude -p "query"` |
| `--resume`, `-r` | Resume a specific session by ID or name | `claude --resume auth-refactor` |
| `--session-id` | Use a specific session ID for the conversation (valid UUID) | `claude --session-id "550e8400-e29b-41d4-a716-446655440000"` |
| `--setting-sources` | Comma-separated list of setting sources to load (user, project, local) | `claude --setting-sources user,project` |
| `--settings` | Path to settings JSON file or JSON string | `claude --settings ./settings.json` |
| `--strict-mcp-config` | Only use MCP servers from `--mcp-config`, ignoring all others | `claude --strict-mcp-config --mcp-config ./mcp.json` |
| `--system-prompt` | Replace entire system prompt with custom text | `claude --system-prompt "You are a Python expert"` |
| `--system-prompt-file` | Load system prompt from a file (print mode only) | `claude -p --system-prompt-file ./custom-prompt.txt "query"` |
| `--tools` | Specify list of available tools (use `""` to disable all, `"default"` for all) | `claude -p --tools "Bash,Edit,Read" "query"` |
| `--verbose` | Enable verbose logging, shows full turn-by-turn output | `claude --verbose` |
| `--version`, `-v` | Output the version number | `claude -v` |

### Key Flag Notes

**System Prompt Flags** (choose one):
- `--system-prompt`: Replaces entire default prompt (use for complete control)
- `--system-prompt-file`: Replaces with file contents (print mode only)
- `--append-system-prompt`: Appends to default prompt while keeping Claude Code features (recommended for most use cases)

**Agents Flag Format**:
The `--agents` flag accepts JSON with this structure:
```json
{
  "agent-name": {
    "description": "When this agent should be invoked",
    "prompt": "System prompt for the agent",
    "tools": ["Read", "Edit", "Bash"],  // optional
    "model": "sonnet"  // optional (sonnet, opus, or haiku)
  }
}
```

This is the complete and official reference for all Claude Code CLI options as of the latest documentation.