🔓 unclaimed — this page was auto-generated from GitHub. Are you the creator?
Claim this page →
claude-code-guide
Claude Code Guide - Setup, Commands, workflows, agents, skills & tips-n-tricks go from beginner to power user!
git clone https://github.com/zebbern/claude-code-guide
Claude Code Guide
For reference and contributions, visit the official Claude Code documentation
| Section | Status | Other Resources |
|---|---|---|
| Getting Started | ✅ | Claude-Code Docs |
| Configuration & Environment Variables | ✅ | Claude-Code via Discord |
| Commands & Usage | ✅ | Security Agents SKILL.md |
| Interface & Input | ✅ | Let Agent Create SKILL.md |
| Advanced Features | ✅ | 954+ Agent Skills |
| Automation & Integration | ✅ | No cost ai resources |
| Help & Troubleshooting | ✅ | 250+ Mermaid templates |
| Third-Party Integrations | ✅ | Discord Communication MCP |
Contents
Fast paths: Install · Commands · Config · MCP · Agents · Troubleshoot
Full content map
-
- Thinking Mode
- Effort Levels
- Fast Mode
- Auto Mode
- Plan Mode
- Background Tasks
- Workflows & Scheduling
- Remote Sessions
- Claude in Chrome
- Sandbox Mode
- LSP Tool
- Sub Agents
- Agent Teams
- Skills
- Plugin System
- Worktree Isolation
- Native Installer
- Authentication CLI
- Agent Management CLI
- Remote Control
- Managed Settings
- Model Updates
- Theming & Customization
- Code Review
- Insights
- MCP Integration
- Hooks System
Getting Started
Enable sound alerts when claude completes the task:
claude config set --global preferredNotifChannel terminal_bell
Quick Start
[!TIP] Send claude or npx claude in terminal to start the interface
Go to Help & Troubleshooting to fix issues...
# Native Installer (preferred — no Node.js required) ⭐️
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Windows
/* Via CMD (native) */ curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
/* Via Powershell */ irm https://claude.ai/install.ps1 | iex
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# macOS / Linux / WSL
/* Via Terminal */ curl -fsSL https://claude.ai/install.sh | bash
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Arch
/* Via Terminal */ yay -S claude-code*/
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Alternative (npm) — useful when your environment already standardizes on Node.js
# Requires Node.js 18+
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Windows
/* Via CMD (npm) */ npm install -g @anthropic-ai/claude-code
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# macOS
/* Via Terminal */ brew install node && npm install -g @anthropic-ai/claude-code
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Linux
/* Via Terminal */ sudo apt update && sudo apt install -y nodejs npm
/* Via Terminal */ npm install -g @anthropic-ai/claude-code
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# WSL/GIT
/* Via Terminal */ npm install -g @anthropic-ai/claude-code
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Docker
/* Windows (CMD) */ docker run -it --rm -v "%cd%:/workspace" -e ANTHROPIC_API_KEY="sk-your-key" node:20-slim bash -lc "npm i -g @anthropic-ai/claude-code && cd /workspace && claude"
/* macOS/Linux (bash/zsh)*/ docker run -it --rm -v "$PWD:/workspace" -e ANTHROPIC_API_KEY="sk-your-key" node:20-slim bash -lc 'npm i -g @anthropic-ai/claude-code && cd /workspace && claude'
/* No bash Fallback */ docker run -it --rm -v "$PWD:/workspace" -e ANTHROPIC_API_KEY="sk-your-key" node:20-slim sh -lc 'npm i -g @anthropic-ai/claude-code && cd /workspace && claude'
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Check if claude is installed correctly
/* Linux */ which claude
/* Windows */ where claude
/* Universal */ claude --version
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Common Management
/*claude config */ Configure settings
/*claude mcp list */ Setup MCP servers, you can also replace "list" with add/remove
/*claude agents */ Open the agent/session dashboard
/*claude update */ Run a manual update check
[!Tip] Open Project Via Terminal Into VS Code / Cursor
$ - cd /path/to/project
$ - code .
Make sure you have the (Claude Code extension) installed in your VS Code / Cursor
System Requirements
- OS: macOS 10.15+, Ubuntu 20.04+/Debian 10+, or Windows 10/11 or WSL
- Hardware: 4GB RAM minimum 8GB+ recommended
- Software: Git 2.23+ is optional for PR/worktree workflows. Node.js 18+ is only required for npm-based installation; the native installer bundles its own runtime.
- Internet: Connection for API calls
Initial Setup
[!Tip] Find API key from Anthropic Console
Do NOT commit real keys use git-ignored files, OS key stores, or secret managers
# Universal
/* Authenticate via Anthropic account */ claude auth login
/* Authenticate via Console/API billing */ claude auth login --console
/* Switch accounts inside Claude */ /login
----------------------------------------------------------------------------------------------------------------------------------
# Windows
/* Set-api-key */ set ANTHROPIC_API_KEY=sk-your-key-here-here
/* cmd-masked-check */ echo OK: %ANTHROPIC_API_KEY:~0,8%***
/* Set-persistent-key */ setx ANTHROPIC_API_KEY "sk-your-key-here-here"
/* cmd-unset-key */ set ANTHROPIC_API_KEY=
----------------------------------------------------------------------------------------------------------------------------------
# Linux
/* Set-api-key */ export ANTHROPIC_API_KEY="sk-your-key-here-here"
/* masked-check */ echo "OK: ${ANTHROPIC_API_KEY:0:8}***"
/* remove-session */ unset ANTHROPIC_API_KEY
----------------------------------------------------------------------------------------------------------------------------------
# Powershell
/* ps-session */ $env:ANTHROPIC_API_KEY = "sk-your-key-here-here"
/* ps-masked-check */ "OK: $($env:ANTHROPIC_API_KEY.Substring(0,8))***"
/* ps-persist */ [Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY","sk-your-key-here-here","User")
/* ps-rotate */ $env:ANTHROPIC_API_KEY = "sk-new-key"
/* ps-remove */ Remove-Item Env:\ANTHROPIC_API_KEY
----------------------------------------------------------------------------------------------------------------------------------
# Other...
# persist-bash/* */ echo 'export ANTHROPIC_API_KEY="sk-your-key-here-here"' >> ~/.bashrc && source ~/.bashrc
# persist-zsh /* */ echo 'export ANTHROPIC_API_KEY="sk-your-key-here-here"' >> ~/.zshrc && source ~/.zshrc
# persist-fish/* */ fish -lc 'set -Ux ANTHROPIC_API_KEY sk-your-key-here-here'
----------------------------------------------------------------------------------------------------------------------------------
Configuration & Environment
Environment Variables
You can also set any of these in settings.json under the "env" key for automatic application.
[!Important] Windows Users replace export with set or setx for perm
# Environment toggles (put in ~/.bashrc or ~/.zshrc)
export ANTHROPIC_API_KEY="sk-your-key-here-here" # API key sent as X-Api-Key header (interactive usage: /login)
export ANTHROPIC_AUTH_TOKEN="my-auth-token" # Custom Authorization header; Claude adds "Bearer " prefix automatically
export ANTHROPIC_CUSTOM_HEADERS="X-Trace-Id: 12345" # Extra request headers (format: "Name: Value")
export ANTHROPIC_MODEL="sonnet" # Custom model name or alias to use
export ANTHROPIC_DEFAULT_SONNET_MODEL="sonnet" # Default Sonnet alias or pinned Sonnet model ID
export ANTHROPIC_DEFAULT_OPUS_MODEL="opus" # Default Opus alias or pinned Opus model ID
export ANTHROPIC_SMALL_FAST_MODEL="haiku-model" # Haiku-class model for background tasks (placeholder)
export ANTHROPIC_SMALL_FAST_MODEL_AWS_REGION="REGION" # Override AWS region for the small/fast model on Bedrock (placeholder)
export AWS_BEARER_TOKEN_BEDROCK="bedrock_..." # Amazon Bedrock API key/token for authentication
export BASH_DEFAULT_TIMEOUT_MS=60000 # Default timeout (ms) for long-running bash commands
export BASH_MAX_TIMEOUT_MS=300000 # Maximum timeout (ms) allowed for long-running bash commands
export BASH_MAX_OUTPUT_LENGTH=20000 # Max characters in bash outputs before middle-truncation
export CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1 # (0 or 1) return to original project dir after each Bash command
export CLAUDE_BASH_NO_LOGIN=1 # Force BashTool to skip login shell startup files
export CLAUDE_CODE_API_KEY_HELPER_TTL_MS=600000 # Interval (ms) to refresh creds when using apiKeyHelper
export CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL=1 # (0 or 1) skip auto-installation of IDE extensions
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=4096 # Max number of output tokens for most requests
export CLAUDE_CODE_USE_BEDROCK=1 # (0 or 1) use Amazon Bedrock
export CLAUDE_CODE_USE_VERTEX=0 # (0 or 1) use Google Vertex AI
export CLAUDE_CODE_SKIP_BEDROCK_AUTH=0 # (0 or 1) skip AWS auth for Bedrock (e.g., via LLM gateway)
export CLAUDE_CODE_SKIP_VERTEX_AUTH=0 # (0 or 1) skip Google auth for Vertex (e.g., via LLM gateway)
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=0 # (0 or 1) disable nonessential traffic (equivalent to DISABLE_* below)
export CLAUDE_CODE_DISABLE_TERMINAL_TITLE=0 # (0 or 1) disable automatic terminal title updates
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 # (0 or 1) enable agent teams research preview
export CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 # (0 or 1) load CLAUDE.md from --add-dir paths
export CLAUDE_CODE_ENABLE_TASKS=false # Set to "false" to disable the task system
export DISABLE_AUTOUPDATER=0 # (0 or 1) disable automatic updates (overrides autoUpdates setting)
export DISABLE_BUG_COMMAND=0 # (0 or 1) disable the /bug command
export DISABLE_COST_WARNINGS=0 # (0 or 1) disable cost warning messages
export DISABLE_ERROR_REPORTING=0 # (0 or 1) opt out of Sentry error reporting
export DISABLE_NON_ESSENTIAL_MODEL_CALLS=0 # (0 or 1) disable model calls for non-critical paths
export DISABLE_TELEMETRY=0 # (0 or 1) opt out of Statsig telemetry
export HTTP_PROXY="http://proxy:8080" # HTTP proxy server URL
export HTTPS_PROXY="https://proxy:8443" # HTTPS proxy server URL
export MAX_THINKING_TOKENS=0 # (0 or 1 to turn off/on) force a thinking budget for the model
export MCP_TIMEOUT=120000 # MCP server startup timeout (ms)
export MCP_TOOL_TIMEOUT=60000 # MCP tool execution timeout (ms)
export MAX_MCP_OUTPUT_TOKENS=25000 # Max tokens allowed in MCP tool responses (default 25000)
export USE_BUILTIN_RIPGREP=0 # (0 or 1) set 0 to use system-installed rg instead of bundled one
# Vertex AI region overrides follow VERTEX_REGION_CLAUDE_<MODEL_FAMILY>.
export VERTEX_REGION_CLAUDE_3_5_HAIKU="REGION" # 3.x family example
export VERTEX_REGION_CLAUDE_4_6_SONNET="REGION" # Sonnet family example
export VERTEX_REGION_CLAUDE_4_8_OPUS="REGION" # Opus family example
# -- Session and runtime controls ---------------------------------------------
export CLAUDE_CODE_SIMPLE=1 # Minimal mode: disables MCP tools, attachments, hooks, CLAUDE.md, and skills
export CLAUDE_CODE_DISABLE_1M_CONTEXT=1 # Disable 1 M-token context window (use default shorter context)
export CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1 # Disable background tasks entirely
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 # Opt out of experimental beta features
export CLAUDE_CODE_AUTO_CONNECT_IDE=false # Disable automatic IDE connection on startup
export CLAUDE_CODE_TMPDIR="/custom/tmp" # Override the temp directory Claude Code uses
export CLAUDE_CODE_SHELL="/bin/zsh" # Override shell detection (force a specific shell)
export CLAUDE_CODE_SHELL_PREFIX="command-wrapper" # Prefix/wrap every shell command Claude runs
export CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS=50000 # Override max output tokens for the Read tool
export CLAUDE_CODE_PROXY_RESOLVES_HOSTS=true # Let the HTTP/HTTPS proxy handle DNS resolution
export CLAUDE_CODE_EXIT_AFTER_STOP_DELAY=30000 # Auto-exit SDK mode after idle for N ms
export CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS=30000 # Timeout (ms) for plugin git operations
export CLAUDE_CODE_ACCOUNT_UUID="uuid" # Override account UUID (SDK / automation flows)
export CLAUDE_CODE_USER_EMAIL="[email protected]" # Override user email (SDK / automation flows)
export CLAUDE_CODE_ORGANIZATION_UUID="uuid" # Override organization UUID (SDK / automation flows)
export ENABLE_CLAUDEAI_MCP_SERVERS=false # Opt out from claude.ai-synced MCP servers
export FORCE_AUTOUPDATE_PLUGINS=1 # Allow plugin auto-update even when main updater is disabled
export IS_DEMO=1 # Demo mode — hides email/org from the UI
export NO_PROXY="localhost,127.0.0.1" # Bypass proxy for specified hosts (comma-separated)
# -- Provider, terminal, and telemetry controls --------------------------------
export CLAUDE_CODE_ENABLE_AUTO_MODE=1 # Enable auto mode on Bedrock, Vertex, and Foundry for Opus 4.7/4.8
export CLAUDE_CODE_USE_POWERSHELL_TOOL=1 # Enable PowerShell tool where available; Windows provider sessions may default to it
export CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY=1 # Opt out of PowerShell -ExecutionPolicy Bypass behavior
export CLAUDE_CODE_NO_FLICKER=1 # Prefer flicker-free alternate-screen rendering where supported
export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 # Let compatible gateways populate the model picker from /v1/models
export CLAUDE_CODE_FORCE_SYNC_OUTPUT=1 # Force synchronized terminal output when auto-detection misses support
export CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 # Let package-manager installs run background upgrades where supported
export ENABLE_PROMPT_CACHING_1H=true # Opt in to 1-hour prompt cache TTL when your provider supports it
export OTEL_LOG_TOOL_DETAILS=1 # Include tool parameters in tool_decision telemetry events
export OTEL_METRICS_INCLUDE_ENTRYPOINT=true # Include session entrypoint on OpenTelemetry metrics
Global Config Options
claude config set -g theme dark # Theme: dark | light | light-daltonized | dark-daltonized
claude config set -g preferredNotifChannel iterm2_with_bell # Notification channel: iterm2 | iterm2_with_bell | terminal_bell | notifications_disabled
claude config set -g autoUpdates true # Auto-download & install updates (applied on restart)
claude config set -g verbose true # Show full bash/command outputs
claude config set -g attribution false # Omit "co-authored-by Claude" in git commits/PRs
claude config set -g forceLoginMethod claudeai # Restrict login flow: claudeai | console
claude config set -g model "sonnet" # Default model override; use a full model ID only when pinning
claude config set -g statusLine '{"type":"command","command":"~/.claude/statusline.sh"}' # Custom status line
claude config set -g enableAllProjectMcpServers true # Auto-approve all MCP servers from .mcp.json
claude config set -g enabledMcpjsonServers '["memory","github"]' # Approve specific MCP servers
claude config set -g disabledMcpjsonServers '["filesystem"]' # Reject specific MCP servers
Configuration Files
(Memory type) Claude Code offers four memory locations in a hierarchical structure, each serving a different purpose:
| Memory Type | Location | Purpose | Use Case Examples | Shared With |
|---|---|---|---|---|
| Enterprise policy | macOS: /Library/Application Support/ClaudeCode/CLAUDE.mdLinux: /etc/claude-code/CLAUDE.mdWindows: C:\ProgramData\ClaudeCode\CLAUDE.md | Organization-wide instructions managed by IT/DevOps | Company coding standards, security policies, compliance requirements | All users in organization |
| Project memory | ./CLAUDE.md | Team-shared instructions for the project | Project architecture, coding standards, common workflows | Team members via source control |
| User memory | ~/.claude/CLAUDE.md | Personal preferences for all projects | Code styling preferences, personal tooling shortcuts | Just you (all projects) |
| Project memory (local) | ./CLAUDE.local.md | Personal project-specific preferences (git-ignored) | Your sandbox URLs, preferred test data, personal overrides | Just you (current project) |
| Project rules | .claude/rules/*.md | Modular project rules (loaded alongside CLAUDE.md) | Linting rules, API conventions, per-directory standards | Team members via source control |
All memory files are automatically loaded into Claude Code's context when launched. Files higher in the hierarchy take precedence and are loaded first, providing a foundation that more specific memories build upon.
.claude/rules/ Directory
The .claude/rules/ directory lets you break project instructions into separate Markdown files instead of one large CLAUDE.md. Every *.md file inside is automatically loaded into context alongside CLAUDE.md. This is useful for:
- Modular organization: Separate concerns (e.g.,
api-conventions.md,testing-rules.md) - Per-directory overrides: Nested
rules/directories can apply scoped rules - Team collaboration: Different team members can own different rule files via PR review
Auto-Memory
Claude can save useful working context during your sessions, such as project conventions, tooling preferences, and architectural decisions it observes while helping you. Use /memory to inspect, edit, or remove saved memories.
Auto-memory is most useful for context you would otherwise repeat across sessions:
- Preferred build, test, and lint commands
- Local conventions that are not obvious from code alone
- Architecture decisions that influence future edits
- Team preferences that should shape how Claude proposes changes
Keep durable team rules in CLAUDE.md or .claude/rules/. Treat auto-memory as helpful working context, not as the only source of truth.
Commands & Usage
Slash Command Reference
| Command | Purpose |
|---|---|
/add-dir | Add additional working directories |
/agents | Manage custom AI subagents for specialized tasks |
/branch | Branch or fork the current conversation into a separate session |
/bug | Report bugs (sends conversation to Anthropic) |
/clear | Clear conversation history |
/compact [instructions] | Compact conversation with optional focus instructions |
/config | Open the Settings interface (Config tab) |
/context | Visualize current context usage as a colored grid |
/copy | Copy conversation content to clipboard |
/code-review [effort] | Run correctness-focused code review; use --fix to apply findings or --comment for PR comments |
/color | Set or randomize the current session accent color |
/debug | Troubleshoot current session and diagnose issues |
/doctor | Checks the health of your Claude Code installation |
/effort | Pick reasoning effort for the current model/session |
/exit | Exit the REPL |
/export [filename] | Export the current conversation to a file or clipboard |
/fast | Toggle fast mode for accelerated Opus responses where available |
/goal | Set a completion condition so Claude keeps working across turns until it is met |
/help | Get usage help |
/init | Initialize project with CLAUDE.md guide |
/insights | Generate an interactive HTML report analyzing your coding habits |
/keybindings | Configure custom keyboard shortcuts |
/login | Switch Anthropic accounts |
/loop | Schedule a recurring prompt or slash command |
/logout | Sign out from your Anthropic account |
/mcp | Manage MCP server connections and OAuth authentication |
/memory | Edit CLAUDE.md memory files |
/model | Select or change the AI model |
/permissions | View or update tool permissions |
/plan | Enter plan mode directly from the prompt |
/plugins | Manage plugins (install, enable, disable, marketplace) |
/pr_comments | View pull request comments |
/release-notes | Open the built-in release notes view |
/rename <name> | Rename the current session for easier identification |
/resume [session] | Resume a conversation by ID or name, or open session picker |
/rules | View and manage .claude/rules/ directory (modular project rules) |
/rewind | Rewind the conversation and/or code to a previous point |
/sandbox | View sandbox dependency status with installation instructions |
/scroll-speed | Tune mouse wheel scroll speed with a live preview |
/settings | Open Settings interface (alias for /config) |
/simplify | Run cleanup-only review for reuse, simplification, efficiency, and altitude |
/status | Open Settings interface (Status tab) showing version, model, account |
/statusline | Set up Claude Code's status line UI |
/tasks | List and manage background tasks |
/teleport | Resume a remote session from claude.ai (subscribers only) |
/terminal-setup | Install Shift+Enter key binding for newlines (iTerm2, VS Code, Kitty, Alacritty, Zed, Warp, and WezTerm) |
/remote-env | Configure remote environment settings |
/theme | Change the color theme |
/todos | List current TODO items |
/ultrareview [target] | Run comprehensive cloud code review with parallel multi-agent analysis |
/usage | Show plan usage limits and rate limit status (subscription plans) |
/usage-credits | Enable or inspect usage credits for higher-throughput modes |
/workflows | View dynamic workflow runs and background orchestration status |
/batch | Run batch operations on multiple files (bundled skill) |
Command Line Flags
| Flag / Command | Description | Example |
|---|---|---|
-d, --debug | Enable debug mode (shows detailed debug output). | claude -d -p "query" |
--include-partial-messages | partial message streaming support via CLI flag | claude -p "query" --include-partial-messages |
--verbose | Override verbose mode setting from config (shows expanded logging / turn-by-turn output). | claude --verbose |
-p, --print | Print response and exit (useful for piping output). | claude -p "query" |
--output-format <format> | Output format (only works with --print): text (default), json (single result), or stream-json (realtime streaming). | claude -p "query" --output-format json |
--input-format <format> | Input format (only works with --print): text (default) or stream-json (realtime streaming input). | claude -p --output-format stream-json --input-format stream-json |
--replay-user-messages | Re-emit user messages from stdin back to stdout for acknowledgment — only works with --input-format=stream-json and --output-format=stream-json. | claude --input-format stream-json --output-format stream-json --replay-user-messages |
--allowedTools, --allowed-tools <tools...> | Comma/space-separated list of tool names to allow (e.g. "Bash(git:*) Edit"). | --allowed-tools "Bash(git:*)" Edit" |
--disallowedTools, --disallowed-tools <tools...> | Comma/space-separated list of tool names to deny (e.g. "Bash(git:*) Edit"). | --disallowed-tools "Edit" |
--mcp-config <configs...> | Load MCP servers from JSON files or strings (space-separated). | claude --mcp-config ./mcp-servers.json |
--strict-mcp-config | Only use MCP servers from --mcp-config, ignoring other MCP configurations. | claude --mcp-config ./a.json --strict-mcp-config |
--append-system-prompt <prompt> | Append a system prompt to the default system prompt (useful in print mode). | claude -p --append-system-prompt "Do X then Y" |
--permission-mode <mode> | Permission mode for the session (choices include acceptEdits, auto, bypassPermissions, default, plan). | claude --permission-mode plan |
--permission-prompt-tool <tool> | Specify an MCP tool to handle permission prompts in non-interactive mode. | claude -p --permission-prompt-tool mcp_auth_tool "query" |
--fallback-model <model> | Enable automatic fallback to a specified model when the default is overloaded (note: only works with --print per help). | claude -p --fallback-model claude-haiku-20240307 "query" |
--model <model> | Model for the current session. Accepts aliases like sonnet/opus or a full model ID when pinning. | claude --model sonnet |
--settings <file-or-json> | Load additional settings from a JSON file or a JSON string. | claude --settings ./settings.json |
--add-dir <directories...> | Additional directories to allow tool access to. | claude --add-dir ../apps ../lib |
--ide | Automatically connect to an IDE on startup if exactly one valid IDE is available. | claude --ide |
-c, --continue | Continue the most recent conversation in the current directory. | claude --continue |
-r, --resume [sessionId] | Resume a conversation; provide a session ID or interactively select one. | claude -r "abc123" |
--session-id <uuid> | Use a specific session ID for the conversation (must be a valid UUID). | claude --session-id 123e4567-e89b-12d3-a456-426614174000 |
--agents <json> | Define custom subagents dynamically via JSON (see subagent docs for format). | claude --agents '{"reviewer":{"description":"Reviews code","prompt":"..."}}' |
--agent <name> | Specify a specific agent for the current session. | claude --agent my-custom-agent |
--bg | Start or continue work as a background session that can be viewed from claude agents. | claude --bg "fix failing tests" |
--bg --exec <command> | Run a shell command as an attachable background session. | claude --bg --exec "npm test" |
--name <label> | Name a background or remote session for easier identification. | claude --bg --name nightly-check "run checks" |
--chrome | Enable Chrome browser integration for web automation and testing. | claude --chrome |
--no-chrome | Disable Chrome browser integration for this session. | claude --no-chrome |
--remote | Create a new web session on claude.ai with the provided task description. | claude --remote "Fix the login bug" |
--teleport | Resume a web session in your local terminal. | claude --teleport |
--fork-session | When resuming, create a new session ID instead of reusing the original. | claude --resume abc123 --fork-session |
--json-schema <schema> | Get validated JSON output matching a JSON Schema after agent completes (print mode only). | claude -p --json-schema '{"type":"object",...}' "query" |
--max-budget-usd <amount> | Maximum dollar amount to spend on API calls before stopping (print mode only). | claude -p --max-budget-usd 5.00 "query" |
--max-turns <n> | Limit the number of agentic turns (print mode only). Exits with error when limit reached. | claude -p --max-turns 3 "query" |
--betas <headers> | Beta headers to include in API requests (API key users only). | claude --betas interleaved-thinking |
--tools <tools> | Restrict which built-in tools Claude can use. Use "" to disable all, "default" for all, or specific tool names. | claude --tools "Bash,Edit,Read" |
--system-prompt <prompt> | Replace the entire system prompt with custom text (works in interactive and print modes). | claude --system-prompt "You are a Python expert" |
--system-prompt-file <file> | Load system prompt from a file, replacing the default prompt (print mode only). | claude -p --system-prompt-file ./custom-prompt.txt "query" |
--append-system-prompt-file <file> | Load additional system prompt text from a file and append to default (print mode only). | claude -p --append-system-prompt-file ./extra-rules.txt "query" |
--plugin-dir <dir> | Load plugins from directories for this session only (repeatable). | claude --plugin-dir ./my-plugins |
--setting-sources <sources> | Comma-separated list of setting sources to load (user, project, local). | claude --setting-sources user,project |
--no-session-persistence | Disable session persistence so sessions are not saved to disk (print mode only). | claude -p --no-session-persistence "query" |
--disable-slash-commands | Disable all skills and slash commands for this session. | claude --disable-slash-commands |
--dangerously-skip-permissions | Bypass all permission checks (only for trusted sandboxes). | claude --dangerously-skip-permissions |
--worktree, -w | Start in an isolated git worktree; worktree.baseRef controls whether it branches from fresh remote state or local HEAD. | claude -w "implement feature" |
--from-pr <url> | Start a session from a pull request URL. | claude --from-pr https://github.com/org/repo/pull/123 |
// compatibility
| Platforms | cli, api, desktop, web |
|---|---|
| Operating systems | — |
| AI compatibility | claude |
| License | MIT |
| Pricing | open-source |
| Language | Python |
// faq
What is claude-code-guide?
Claude Code Guide - Setup, Commands, workflows, agents, skills & tips-n-tricks go from beginner to power user!. It is open-source on GitHub.
Is claude-code-guide free to use?
claude-code-guide is open-source under the MIT license, so it is free to use.
What category does claude-code-guide belong to?
claude-code-guide is listed under mcp-servers in the Claudeers registry of Claude-compatible tools.
// embed badge
[](https://claudeers.com/claude-code-guide)
// retro hit counter
[](https://claudeers.com/claude-code-guide)
// reviews
// guestbook
// related in Automation & Workflows
The API to search, scrape, and interact with the web at scale. 🔥
🌐 Make websites accessible for AI agents. Automate tasks online with ease.
An open-source long-horizon SuperAgent harness that researches, codes, and creates. With the help of sandboxes, memories, tools, skill, subagents and message…