Claude Code Cheat Sheet & Quick Reference

Setup and Access

$curl -fsSL https://claude.ai/install.sh | bash
$curl -fsSL https://claude.ai/install.sh | bash

Install Claude Code natively on macOS, Linux, or WSL with automatic background updates.

$irm https://claude.ai/install.ps1 | iex

Install Claude Code with the native installer from Windows PowerShell with automatic background updates.

$curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Install Claude Code with the native installer from Windows CMD with automatic background updates.

$brew install --cask claude-code
$brew install --cask claude-code

Install Claude Code with Homebrew.

$brew upgrade claude-code
$brew upgrade claude-code

Homebrew installations do not auto-update. Run this command to get the latest features and security fixes.

$winget install Anthropic.ClaudeCode

Install Claude Code with WinGet on Windows.

$winget upgrade Anthropic.ClaudeCode

WinGet installations do not auto-update. Run this command to get the latest features and security fixes.

$claude

Start an interactive Claude Code session in the current project.

$claude -v

Show the installed Claude Code version.

$claude update

Manually update Claude Code to the latest version.

$claude --init

Run initialization hooks and start interactive mode.

$claude auth login

Log in to your Claude account from the terminal. Use --email to pre-fill email or --sso to force SSO authentication.

$claude auth status --text

Show authentication status as JSON. Use --text for human-readable output. Exits with code 0 if logged in, 1 if not.

$claude "write a test for this function"

Run a one-time task and get a response without starting an interactive session.

$claude commit

Create a Git commit with Claude Code writing the commit message.

/init

Initialize project guidance files for the current project.

/memory

Open Claude memory management from inside the session.

/login

Sign in to your Anthropic account.

/logout

Sign out from your Anthropic account.

/mobile
/ios
/android

Show QR code to download the Claude mobile app.

Prompting and Input

$claude -p "explain this function"

Run Claude once in print mode and exit with a single response.

Ctrl + G

Open the current prompt in your default text editor.

/btw what was the name of that config file again?

Ask a side question without adding it to the main conversation history. Can run while Claude is working.

Ctrl + K

Delete from the cursor to the end of the line.

Ctrl + U

Delete the entire current line.

Ctrl + Y

Paste text deleted with readline kill commands.

Alt + Y

Cycle through earlier kill-ring entries after pasting.

Alt + B

Move the cursor back by one word.

Alt + F

Move the cursor forward by one word.

Ctrl + V or Cmd + VAlt + VCtrl + V or Alt + V

Paste an image from the clipboard.

\ + Enter
Shift + Enter
Ctrl + J
Option + EnterShift + EnterShift + Enter

Insert a newline for multiline input.

/

Open the slash command picker from the start of the prompt.

!

Enter bash mode from the start of the prompt.

@

Trigger file path autocomplete.

Tab

Accept a prompt suggestion for editing.

Enter

Accept a prompt suggestion and submit it immediately.

Escape
Backspace
Ctrl + U

Exit bash mode when the prompt is empty.

/voice

Toggle push-to-talk voice dictation.

Space
Enter
Escape

Dismiss a /btw side-question overlay and return to the main prompt.

Sessions and Context

$claude -c
$claude --continue

Continue most recent conversation in current directory.

$claude --resume auth-refactor
$claude -r

Resume a specific session by ID or name, or show an interactive picker to choose a session.

/clear
/reset
/new

Clear the current session and start a fresh conversation.

/compact "keep only the important parts"

Compact the current conversation to keep only the important context.

/resume
/continue

Resume another conversation from inside the current session.

/rename feature-auth

Rename the current conversation.

/fork bug-investigation

Fork the current conversation into a new branch of work.

/context

Show how much context is currently in use.

/plan

Switch into planning mode.

/tasks

Open the task list for the current session.

/copy

Copy the current response to the clipboard.

/export notes.txt

Export the current response to a file.

/desktop
/app

Transfer a terminal session to the desktop app or web for visual diff review and continued work.

/add-dir <path>

Add a new working directory to the current session.

/branch feature-auth
/fork

Create a branch of the current conversation at this point.

/remote-control
/rc

Enable remote control of the current session from claude.ai.

Esc + Esc

Rewind or summarize from the keyboard.

Ctrl + C

Cancel the current input or generation.

Ctrl + F

Kill all background agents.

Ctrl + D

Exit the Claude Code session.

/exit
/quit

Exit Claude Code from the command prompt.

Ctrl + L

Clear the terminal screen while keeping conversation history.

Ctrl + O

Toggle verbose output for tool execution details.

Ctrl + B

Background running tasks. Tmux users press Ctrl+B twice.

Ctrl + T

Show or hide the task list.

Cycle through tabs in dialogs and menus.

Navigate command history.

Review and Diagnostics

/diff

Show the current diff inside Claude.

/rewind
/checkpoint

Rewind the conversation to an earlier checkpoint.

/pr-comments

Pull pull request comments into the current session.

/doctor

Run Claude's environment health checks.

/status

Show current Claude session and account status.

/stats

Show detailed conversation and usage statistics including session history and streaks.

/insights

Generate a report analyzing Claude Code sessions, interaction patterns, and friction points.

/usage

Show current usage information.

/cost

Show current spend and cost information.

/security-review

Review the current branch for security issues.

Cmd + ClickCtrl + ClickCtrl + Click

Open the linked pull request from the footer.

Ctrl + R

Start reverse search through command history or cycle through older matches.

Tab
Esc

Accept the current reverse-search match for editing.

Enter

Accept the current reverse-search match and execute it.

Backspace

Exit reverse search when the query is empty.

Ctrl + C

Cancel reverse search and restore your original input.

Configuration and Integrations

/config
/settings

Open Claude configuration settings.

/theme

Open the theme picker.

/color orange

Set the interface color theme.

/keybindings

Open keybinding configuration.

/terminal-setup

Install terminal-specific bindings such as Shift+Enter support.

/model

Switch models from inside the current session.

/effort high

Change the current reasoning effort level.

/fast on

Toggle fast mode in the current session.

/permissions
/allowed-tools

Open permission settings.

/sandbox

Open sandbox settings.

/mcp

Manage MCP server integrations.

/plugin

Manage plugins from inside the session.

/reload-plugins

Reload installed plugins.

/ide

Connect Claude Code to your IDE.

/agents

Open agent and teammate options.

/hooks

View hook configurations for tool events and automations.

/vim

Toggle between Vim and Normal editing modes.

/statusline

Configure Claude Code's status line display in your shell prompt.

Shift + Tab
Alt + M

Toggle permission modes.

Option + PAlt + PAlt + P

Switch models without clearing the current prompt.

Option + TAlt + TAlt + T

Toggle extended thinking mode.

Ctrl + T

Toggle syntax highlighting inside the theme picker.

Help and Discovery

/help

Open the built-in slash command help.

/skills

Open the available skills list.

/release-notes

View the full changelog with recent version updates.

/feedback
/bug

Submit feedback or report bugs about Claude Code.

?

Open the shortcut legend for your current environment.