Claude Code Command Reference (2026)

Search 80+ commands, shortcuts, and flags. Filter by category. Copy instantly.

Showing 0 of 0 commands

Why a Command Reference?

Claude Code ships with dozens of commands spread across slash commands, CLI flags, keyboard shortcuts, CLAUDE.md directives, and MCP integrations. Remembering every option is impractical, and the built-in /help command only shows a subset. This reference puts every command in one searchable, filterable interface so you spend less time hunting through documentation and more time shipping code.

Whether you are a first-time user trying to learn the basics or a power user automating CI/CD pipelines, having a single source of truth for all available commands eliminates guesswork. You can filter by category to focus on exactly what you need, copy any command with one click, and discover tips you might have missed in the official docs.

We built this tool after watching teams waste hours looking up obscure flags or rediscovering the same keyboard shortcuts. By consolidating every command into a searchable database, we turned a scattered experience into a streamlined workflow. The search covers command names, descriptions, and tips simultaneously, so even a vague query like "token" or "permission" surfaces all relevant commands instantly.

Slash Commands Explained

Slash commands are typed directly inside a Claude Code session by prefixing a keyword with /. They control the session itself rather than issuing prompts to the model. For example, /compact compresses your conversation to save tokens, /clear resets the session entirely, and /doctor runs a diagnostic check on your environment.

The slash command system is designed to be discoverable. Typing / by itself in some configurations will show an autocomplete menu. Commands like /init generate a CLAUDE.md file for your project, while /model lets you switch between models mid-session. Understanding these commands is essential because they give you control over context length, cost, and session behavior without leaving the terminal.

Some slash commands accept arguments. For example, /review can target a specific file, and /compact can take an optional instruction for how to summarize. Check the usage examples in each card above for the correct syntax.

CLI Flags for Power Users

CLI flags are passed when launching Claude Code from the terminal. They configure behavior before the session starts, making them essential for automation and scripting. The most commonly used flag is --print (or -p), which runs Claude Code in non-interactive mode and prints the result to stdout.

For CI/CD pipelines, combine --print with --output-format json to get structured output you can pipe into other tools. Add --dangerously-skip-permissions to bypass interactive permission prompts in trusted environments. The --max-turns flag bounds the number of agentic steps, preventing runaway sessions in automated workflows.

Flags like --model and --system-prompt let you customize which model runs and what instructions it receives, all without modifying any configuration files. This makes it easy to test different setups or run specialized tasks from shell scripts. You can chain as many flags as needed in a single invocation.

Keyboard Shortcuts That Save Time

Keyboard shortcuts in Claude Code follow standard terminal conventions, so most will feel familiar. Ctrl+C cancels the current operation without exiting, while Ctrl+D exits the session entirely. These two shortcuts alone save significant time compared to waiting for a response to finish and then manually stopping it.

Escape interrupts the current generation, which is useful when you realize mid-response that you asked the wrong question. Tab triggers autocomplete for file paths and slash commands. Shift+Tab inserts a newline when you need to write multi-line input without submitting. The Up Arrow cycles through your command history, letting you re-run or modify previous prompts quickly.

Mastering these shortcuts turns Claude Code from a chatbot into a true power tool. Instead of waiting, canceling, and retyping, you can interrupt, correct, and iterate at the speed of thought. The difference is especially noticeable during long debugging sessions where you might issue dozens of prompts in rapid succession.

Common Questions

How do I see all available commands in Claude Code?
Type /help inside a Claude Code session to see a list of all available slash commands. For CLI flags, run claude --help in your terminal. You can also use this command reference page to search all 80+ commands at once.
Can I create custom slash commands in Claude Code?
Claude Code does not support custom slash commands directly, but you can achieve similar functionality by defining instructions in your CLAUDE.md file. Use project-level directives to create reusable workflows that Claude will follow automatically when you reference them.
What is the difference between /compact and /clear?
/compact summarizes the current conversation to reduce token usage while preserving context. /clear wipes the conversation entirely and starts fresh. Use /compact when you want to keep working on the same task but reduce costs; use /clear when switching to a completely different task.
How do I use Claude Code in CI/CD pipelines?
Use the --print flag (or -p) to run Claude Code in non-interactive mode. Combine with --output-format json for machine-readable output. Example: claude -p 'review this PR' --output-format json. Set ANTHROPIC_API_KEY as an environment variable and use --dangerously-skip-permissions for fully automated runs.
What does --dangerously-skip-permissions do?
The --dangerously-skip-permissions flag bypasses all permission checks, allowing Claude Code to read, write, and execute without asking for confirmation. This is useful in CI/CD pipelines but should never be used in interactive sessions where untrusted code could be executed. The name is intentionally alarming to discourage casual use.
Can I chain multiple CLI flags together?
Yes, you can chain multiple flags. For example: claude --model claude-opus-4-6 --verbose --max-turns 10 -p 'fix all lint errors'. Flags can be combined in any order. Some flags like --print and --output-format are commonly paired together for scripting.
How do I update Claude Code to the latest version?
Run npm update -g @anthropic-ai/claude-code to update to the latest version. You can check your current version with claude --version. Claude Code updates frequently, so check for updates weekly to get new features and bug fixes.
What keyboard shortcuts work inside Claude Code?
Key shortcuts include: Ctrl+C to cancel the current operation, Ctrl+D to exit, Escape to interrupt generation, Tab for autocomplete, Up Arrow for command history, Shift+Tab for inserting a newline, and Ctrl+L to clear the screen.

80+ command templates and cheat sheets

Get the full Claude Code Mastery Playbook with ready-to-use command templates, CLAUDE.md examples, and automation scripts.

Get Lifetime Access — $99

Ready to get started? Check out our Getting Started guide to set up Claude Code, learn about configuration options, or review the permissions system in detail.

For more command templates and automation scripts, explore the Claude Code Mastery Playbook ($99) with 200+ ready-to-use CLAUDE.md templates and workflow guides.