claude-code-guide

MCP开发工具

提供方 zebbern · 包名 claude-code-guide

开发工具 stdio · 本地进程 未标注 社区 / 第三方 Claude DesktopCursorClineClaude Code
查看接入方式

Claude Code Guide - Setup, Commands, workflows, agents, skills & tips-n-tricks go from beginner to power user!

一句话选型结论

按资料字段整理

claude-code-guide 属于开发工具类 MCP 服务器,stdio · 本地进程,鉴权方式未标注,可直接接入 Claude Desktop、Cursor、Cline 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类开发工具 传输方式stdio · 本地进程 鉴权未标注 部署方式本地部署
GitHub 星标 3,917 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

开发工具
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

claude-code-guide ai ai-agent ai-agent-tools anthropic-claude

支持客户端

适用场景

claude-code-guideaiai-agent

安装与配置

stdio · 本地进程 未标注
客户端在本机拉起子进程,数据不出本机
git clone https://github.com/zebbern/claude-code-guide && cd claude-code-guide

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Cross-platform,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
代码与仓库操作

在对话里直接查代码、提 issue、走 PR,省掉来回切工具。

本地命令与脚本

把构建、测试、格式化这类重复命令交给模型执行。

接口联调与测试

让模型调你的接口、跑一遍用例,快速定位问题。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Cursor、Cline,换客户端不用重新研究配置。
  • 仓库有一定关注度(星标 3,917),遇到问题更容易搜到资料。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
claude-code-guide当前 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Git 838e2ec1 12 stdio · 本地进程 本地部署 有 2026-05-17
Markitdown MCP 2c653a5f 1 stdio · 本地进程 本地部署 有 2026-05-17
JavaGuide 未标注 stdio · 本地进程 本地部署 有 2026-04-11
awesome-claude-skills 未标注 stdio · 本地进程 本地部署 有 2026-04-26
Context7 831acf40 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

开发工具
字段来自项目仓库与公开索引,中文说明由本站标注
提供方zebbern上游标注的维护方 zebbern
分类开发工具本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式未标注远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时claude-code-guide · Cross-platform本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-04-11上游最后核验时间

详细介绍

142.4 KB
来自项目仓库与上游目录的原文,未做删改

Claude Code Guide

For reference and contributions, visit the official Claude Code documentation

Commands and provider model mappings change quickly; the linked official references remain authoritative.

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

Area Start here Also useful
Configuration Environment Variables Configuration Files
Commands Slash Commands CLI Quick Reference
Interface Keyboard Shortcuts Vim Mode
Third-Party Integrations DeepSeek Integration Provider Setup Examples

Full content map

  • Getting Started
  • Quick Start
  • System Requirements
  • Initial Setup

  • Configuration & Environment

  • Environment Variables
  • Configuration Files

  • Commands & Usage

  • Slash Command Reference
  • CLI Quick Reference

  • Interface & Input

  • Keyboard Shortcuts
  • Vim Mode

  • Advanced Features

  • Thinking Mode
  • Effort Levels
  • Advisor Tool
  • Fast Mode
  • Auto Mode
  • Plan Mode
  • Background Tasks
  • Workflows & Scheduling
  • Remote Sessions
  • Claude in Chrome
  • Desktop and IDEs
  • 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

  • Security & Permissions

  • Dangerous Mode
  • Security Best Practices

  • Automation & Integration

  • Automation & Scripting
  • Auto PR Review
  • Issue Triage

  • Help & Troubleshooting

  • Installation Issues
  • MCP Issues
  • Best Practices
  • Monitoring & Alerting

  • Third-Party Integrations

  • Provider Setup Examples
  • DeepSeek Integration

Getting Started

Enable completion alerts: run /config inside Claude Code and choose a notification channel such as Terminal bell.

Quick Start

> [!TIP]
> Run claude in a project directory to start the interface.
>
> Go to Help & Troubleshooting to fix issues...

Native installer (recommended; no Node.js required)

macOS, Linux, or WSL:```bash
curl -fsSL https://claude.ai/install.sh | bash


Windows PowerShell:```powershell
irm https://claude.ai/install.ps1 | iex

Windows CMD:```bat
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd


Supported package managers (manual updates by default):```bash
brew install --cask claude-code
winget install Anthropic.ClaudeCode

npm distribution (supported; Node.js 22+ is required to install):```bash
npm install -g @anthropic-ai/claude-code


Verify the installation, then start Claude Code:```bash
claude --version
claude doctor
claude

Native installs update themselves. Homebrew, WinGet, and the signed apt, dnf, and apk repositories follow their package manager's update flow. See the official setup guide for channels, version pinning, Linux repository setup, and signature verification. For an npm install, upgrade with npm install -g @anthropic-ai/claude-code@latest; do not use sudo npm install -g.


> [!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 13+, Windows 10 1809+/Windows Server 2019+, Ubuntu 20.04+, Debian 10+, or Alpine Linux 3.19+. Native Windows, WSL 1, and WSL 2 are supported.

> - Hardware: 4 GB+ RAM and an x64 or ARM64 processor

> - Software: Git is optional on native Windows; without Git for Windows, Claude uses the PowerShell tool instead of Bash. Node.js 22+ is required only to install through npm; the installed CLI is a native binary.

> - Internet: Connection for API calls


Initial Setup

Claude Code requires a Pro, Max, Team, Enterprise, or Console account; the free Claude.ai plan does not include Claude Code. The normal first-party flow is browser sign-in:```bash
claude auth login # Claude subscription
claude auth login --console # Anthropic Console/API billing
claude auth status # Verify the active login


For API automation or a provider/gateway deployment, inject credentials from an OS key store or secret manager instead of committing them:```bash
export ANTHROPIC_API_KEY="$SECRET_FROM_YOUR_STORE" # bash/zsh: current process only
``````powershell
$env:ANTHROPIC_API_KEY = $secretFromYourStore # PowerShell: current process only

> [!Important]
> A persistent ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, or credential helper selects API/provider authentication even if you are logged in. Subscription-only features such as Remote Control, cloud sessions, claude.ai MCP connectors, and notification preferences then remain unavailable. Do not commit credentials; use your platform's secret storage.


Configuration & Environment

Environment Variables

> Environment values can also be stored as strings under the env key in a settings.json file. The official environment-variable reference is the exhaustive source.

> [!Important]
> On PowerShell, use $env:NAME = "value" for the current process. Persist secrets through an OS key store or secret manager, not a checked-in settings file.```bash

Authentication and routing: set only when API/provider billing is intentional

export ANTHROPIC_API_KEY="$SECRET_FROM_YOUR_STORE"
export ANTHROPIC_AUTH_TOKEN="$TOKEN_FROM_YOUR_STORE"
export ANTHROPIC_BASE_URL="https://gateway.example.com"
export ANTHROPIC_CUSTOM_HEADERS="X-Trace-Id: 12345"

Model selection and provider alias overrides

export ANTHROPIC_MODEL="sonnet"
export ANTHROPIC_DEFAULT_FABLE_MODEL="<provider-fable-model-id>"
export ANTHROPIC_DEFAULT_OPUS_MODEL="<provider-opus-model-id>"
export ANTHROPIC_DEFAULT_SONNET_MODEL="<provider-sonnet-model-id>"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="<provider-haiku-model-id>"

Third-party provider selection (enable only one deployment path)

export CLAUDE_CODE_USE_BEDROCK=1

export ANTHROPIC_BEDROCK_REGION_PREFIX=eu # Prefer eu/us/apac/jp/au/global cross-region inference on Bedrock

export CLAUDE_CODE_USE_VERTEX=1

export CLAUDE_CODE_USE_FOUNDRY=1

Timeouts and output budgets, in milliseconds/tokens

export API_TIMEOUT_MS=1200000
export BASH_DEFAULT_TIMEOUT_MS=120000
export BASH_MAX_TIMEOUT_MS=600000
export MCP_TIMEOUT=30000
export MCP_TOOL_TIMEOUT=60000
export MAX_MCP_OUTPUT_TOKENS=25000
export MAX_THINKING_TOKENS=0 # 0 disables fixed thinking where supported; positive values set a budget

Session, context, agents, and accessibility

export CLAUDE_CODE_SIMPLE=1

export CLAUDE_CODE_SAFE_MODE=1

export CLAUDE_CODE_DISABLE_1M_CONTEXT=1 # Clamp native-1M models to 200K via autocompaction; warns if the clamp is not enforced
export CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT=1 # Opt out of enforcing the assumed context window for unknown model IDs
export CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS=20
export CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH=3
export CLAUDE_CODE_FORWARD_SUBAGENT_TEXT=1
export CLAUDE_AX_SCREEN_READER=1

Feature and administration controls

export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
export CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1
export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1
export CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1
export ENABLE_CLAUDEAI_MCP_SERVERS=false

Network routing

export HTTP_PROXY="http://proxy.example.com:8080"
export HTTPS_PROXY="http://proxy.example.com:8080"
export NO_PROXY="localhost,127.0.0.1"

Privacy/network reduction: these are presence-based; unset them to turn them off

export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
export DISABLE_TELEMETRY=1
export DISABLE_ERROR_REPORTING=1


The block is a catalog, not a recommended profile—do not enable mutually exclusive provider variables together. Boolean variables usually accept `1`/`true` and `0`/`false`, but the three presence-based variables shown at the end treat any non-empty value, including `0`, as enabled. Environment values in `settings.json` override the shell value at startup and when the file changes.

Global Config Options

Use `/config` for interactive settings, or pass one or more `key=value` pairs. Run `/config --help` for the keys supported by your installed build.```bash
/config                         # Open the settings UI
/config theme=dark model=sonnet # Update supported keys directly

For version-controlled or managed configuration, edit JSON settings files directly:

Scope File
User ~/.claude/settings.json
Project (shared) .claude/settings.json
Project (private) .claude/settings.local.json
Managed macOS: /Library/Application Support/ClaudeCode/

Linux/WSL: /etc/claude-code/
Windows: C:\Program Files\ClaudeCode\ |```json
{
"model": "sonnet",
"theme": "dark",
"autoUpdatesChannel": "stable",
"permissions": {
"defaultMode": "default"
}
}


Settings precedence is **managed policy → CLI arguments/`--settings` → local → project → user**. Permission arrays have their own merge rules, so read the settings reference before relying on ordinary last-writer-wins behavior. `~/.claude.json` stores global state, session/trust data, and local/user MCP configuration; it is not the user settings file.

Configuration Files

Claude Code combines human-authored instructions from several locations:

Memory Type · Location · Purpose · Use Case Examples · Shared With
**Enterprise policy** · macOS: `/Library/Application Support/ClaudeCode/CLAUDE.md`
Linux: `/etc/claude-code/CLAUDE.md`
Windows: `C:\Program Files\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` or `./.claude/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, path-scoped standards · Team members via source control

&gt; Instruction files are concatenated rather than overriding one another. User and ancestor-project files load at startup; `CLAUDE.md` files in subdirectories load lazily when Claude works there. `CLAUDE.md` is context, not an enforcement boundary.

Use `@path` to import another file. Claude Code does not load `AGENTS.md` automatically; add `@AGENTS.md` to `CLAUDE.md` (or use a symlink where portable) when you want to share those instructions.

#### `.claude/rules/` Directory

The `.claude/rules/` directory lets you break project instructions into separate Markdown files instead of one large `CLAUDE.md`. Markdown files are discovered recursively. Add `paths` frontmatter with glob patterns when a rule should load only for matching files. 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 under `~/.claude/projects//memory/`. It loads the first 200 lines or 25 KB of `MEMORY.md`; use `/memory` to inspect, edit, disable, or remove saved memories. Auto-memory is machine-local and shared across worktrees for the same repository.

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 &amp; Usage

Slash Command Reference

Type `/` to see what your installed build, plan, platform, plugins, MCP servers, and skills actually provide. The table below is a high-value snapshot; use the official command reference for the live list.

Command · Purpose
`/add-dir ` · Grant this session access to another working directory
`/advisor [model\ · off]` · Configure the experimental second-model advisor, save the selection, or turn it off
`/agents` · Explain how to create or edit subagents; the old interactive agent wizard was removed in v2.1.198
`/background [prompt]` · Detach the current conversation as a background session (`/bg` alias)
`/batch ` · Decompose a large change into worktree-isolated background units (bundled skill)
`/branch [name]` · Switch into a new branch of the current conversation while preserving the original
`/btw [question]` · Ask an ephemeral side question without adding it to conversation history
`/cd ` · Move the current session to another working directory
`/clear [name]` · Start a new conversation with empty context while preserving project memory
`/code-review [level] [--fix] [--comment] [target]` · Run a local background review, or use level `ultra` for cloud review; levels run from `low` through `max`
`/compact [instructions]` · Summarize the conversation to free context
`/config [key=value ...]` · Open settings or update supported keys directly (`/settings` alias)
`/context [all]` · Visualize what is using the context window
`/diff` · Open the interactive current/per-turn diff viewer
`/doctor` · Diagnose setup, configuration, hooks, memory, plugins, and MCP; can offer fixes (`/checkup` alias)
`/effort [level · auto]` · Set model-dependent effort: `low`, `medium`, `high`, `xhigh`, `max`, or `ultracode`
`/fast [on · off]` · Toggle fast mode where the selected Opus model and plan support it
`/fork [prompt]` · Copy this conversation into a worktree-isolated background session and keep working here
`/goal [condition · clear]` · Keep working across turns until a completion condition is met
`/hooks` · Inspect configured hooks in the read-only hook browser
`/import [codex · gemini]` · Preview or migrate supported configuration from another coding agent
`/init` · Generate a starter `CLAUDE.md` for the project
`/loop [interval] [prompt]` · Run a prompt repeatedly while the session remains open
`/mcp` · Inspect, authenticate, enable, disable, or reconnect MCP servers
`/memory` · Manage `CLAUDE.md`, rules, and auto-memory
`/model [model]` · Switch model and normally save it as the default; press `s` in the picker for session-only selection
`/permissions` · Manage allow, ask, and deny rules (`/allowed-tools` alias)
`/plan [description]` · Enter plan mode, optionally with a task
`/plugin [subcommand]` · Discover, install, enable, disable, and manage plugins
`/reload-plugins [--force]` · Apply plugin changes without restarting when safe
`/remote-control [name]` · Expose this local session to claude.ai/code or the Claude mobile app
`/resume [session]` · Resume by ID/name or open the session picker
`/review ...` · Alias for `/code-review` as of v2.1.223
`/rewind` · Restore or summarize code and conversation from a checkpoint
`/sandbox` · View and configure Bash filesystem/network sandboxing on supported platforms
`/security-review` · Review the current branch diff for security vulnerabilities
`/simplify` · Review changed code for reuse, quality, and efficiency improvements
`/subtask [prompt]` · Run the former in-session fork behavior as a subagent that reports back here
`/tasks` · List the current session&#x27;s background shells, subagents, and tool calls
`/teleport [session]` · Copy a Claude Code web session into the local terminal
`/usage` · Show subscription usage and rate-limit status
`/workflows` · Inspect dynamic workflow runs and background orchestration

Command Line Flags

Flag / Command · Description · Example
`-d, --debug` · Enable debug mode (shows detailed debug output). · `claude -d -p &quot;query&quot;`
`--include-partial-messages` · Include partial streaming events; requires print mode and `stream-json`. · `claude -p --output-format stream-json --include-partial-messages &quot;query&quot;`
`--include-hook-events` · Include hook lifecycle events in `stream-json` output. · `claude -p --output-format stream-json --include-hook-events &quot;query&quot;`
`--forward-subagent-text` · Forward subagent text/thinking with `parent_tool_use_id` in `stream-json`. · `claude -p --output-format stream-json --forward-subagent-text &quot;query&quot;`
`--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 &quot;query&quot;`
`--output-format ` · Output format (only works with `--print`): `text` (default), `json` (single result), or `stream-json` (realtime streaming). · `claude -p &quot;query&quot; --output-format json`
`--input-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** print mode plus `stream-json` input and output. · `claude -p --verbose --input-format stream-json --output-format stream-json --replay-user-messages`
`--allowedTools`, `--allowed-tools ` · Comma/space-separated permission rules to allow. · `claude --allowed-tools &quot;Bash(git *)&quot; &quot;Edit&quot;`
`--disallowedTools`, `--disallowed-tools ` · Comma/space-separated permission rules to deny. · `claude --disallowed-tools &quot;Edit&quot;`
`--mcp-config ` · 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 ` · Append a system prompt to the default system prompt (useful in print mode). · `claude -p --append-system-prompt &quot;Do X then Y&quot;`
`--autocompact ` · Override the auto-compaction window for this session. · `claude --autocompact 500k`
`--ax-screen-reader` · Use a flat, screen-reader-friendly renderer without decorative borders or animations. · `claude --ax-screen-reader`
`--bare` · Minimal scripted mode: skip discovered hooks, skills, plugins, MCP, auto-memory, and `CLAUDE.md`. · `claude --bare -p &quot;query&quot;`
`--permission-mode ` · Start in `default`/`manual`, `acceptEdits`, `auto`, `dontAsk`, `bypassPermissions`, or `plan`. · `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 &quot;query&quot;`
`--fallback-model ` · In print mode, try a comma-separated fallback chain when the primary model is unavailable. · `claude -p --fallback-model sonnet,haiku &quot;query&quot;`
`--effort ` · Set effort to `low`, `medium`, `high`, `xhigh`, or `max`, or start session-only `ultracode` mode where supported. · `claude --effort high`
`--model ` · Model for the current session. Accepts aliases like `sonnet`/`opus` or a full model ID when pinning. · `claude --model sonnet`
`--advisor ` · Set the experimental advisor for this session without changing `advisorModel`; intentionally omitted from `claude --help`. · `claude --advisor opus`
`--settings ` · Load additional settings from a JSON file or a JSON string. · `claude --settings ./settings.json`
`--add-dir ` · 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 &quot;abc123&quot;`
`--session-id ` · Use a specific session ID for the conversation (must be a valid UUID). · `claude --session-id 123e4567-e89b-12d3-a456-426614174000`
`--agents ` · Define custom subagents dynamically via JSON (see subagent docs for format). · `claude --agents &#x27;{&quot;reviewer&quot;:{&quot;description&quot;:&quot;Reviews code&quot;,&quot;prompt&quot;:&quot;...&quot;}}&#x27;`
`--agent ` · 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 &quot;fix failing tests&quot;`
`--bg --exec ` · Run a shell command as an attachable background session. · `claude --bg --exec &quot;npm test&quot;`
`--name ` · Name a background or remote session for easier identification. · `claude --bg --name nightly-check &quot;run checks&quot;`
`--chrome` · Enable Chrome browser integration for web automation and testing. · `claude --chrome`
`--no-chrome` · Disable Chrome browser integration for this session. · `claude --no-chrome`
`--cloud [description\ · session\ · url]` · Create or attach to a Claude Code web session on claude.ai. · `claude --cloud &quot;Fix the login bug&quot;`
`--remote` · Deprecated alias for `--cloud`. · `claude --remote &quot;Fix the login bug&quot;`
`--remote-control`, `--rc` · Start an interactive local session that can also be controlled from claude.ai or the Claude app. · `claude --remote-control &quot;My Project&quot;`
`--teleport [session]` · 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 ` · Get validated JSON output matching a JSON Schema after agent completes (print mode only). · `claude -p --json-schema &#x27;{&quot;type&quot;:&quot;object&quot;,...}&#x27; &quot;query&quot;`
`--max-budget-usd ` · Maximum dollar amount to spend on API calls before stopping (print mode only). · `claude -p --max-budget-usd 5.00 &quot;query&quot;`
`--max-turns ` · Limit the number of agentic turns (print mode only). Exits with error when limit reached. · `claude -p --max-turns 3 &quot;query&quot;`
`--betas ` · Beta headers to include in API requests (API key users only). · `claude --betas interleaved-thinking`
`--tools ` · Restrict which built-in tools Claude can use. Use &quot;&quot; to disable all, &quot;default&quot; for all, or specific tool names. · `claude --tools &quot;Bash,Edit,Read&quot;`
`--system-prompt ` · Replace the entire system prompt with custom text (works in interactive and print modes). · `claude --system-prompt &quot;You are a Python expert&quot;`
`--system-prompt-file ` · Load a system prompt from a file, replacing the default in interactive or print mode. · `claude --system-prompt-file ./custom-prompt.txt`
`--append-system-prompt-file ` · Load additional system-prompt text from a file in interactive or print mode. · `claude --append-system-prompt-file ./extra-rules.txt`
`--plugin-dir ` · Load a plugin directory or `.zip` for this session only (repeatable). · `claude --plugin-dir ./my-plugin --plugin-dir ./other.zip`
`--plugin-url ` · Fetch a plugin `.zip` URL for this session only (repeatable). · `claude --plugin-url https://example.com/plugin.zip`
`--setting-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 &quot;query&quot;`
`--disable-slash-commands` · Disable all skills and slash commands for this session. · `claude --disable-slash-commands`
`--dangerously-skip-permissions` · Skip normal permission prompts, subject to non-bypassable safety checks and managed policy. · `claude --dangerously-skip-permissions`
`--safe-mode` · Disable user/project customizations for configuration troubleshooting while retaining authentication, models, tools, and permissions. · `claude --safe-mode`
`--worktree [name]`, `-w [name]` · Start in `/.claude/worktrees/`; omit the name to generate one. · `claude -w feature-auth`
`--from-pr [value]` · Filter/resume sessions by PR number or GitHub/GitLab/Bitbucket PR/MR URL, or open the picker. · `claude --from-pr 123`
`--init` · Run Setup hooks with the `init` matcher before a print-mode session. · `claude -p --init &quot;query&quot;`
`--init-only` · Run Setup hooks and exit. · `claude --init-only`
`--maintenance` · Run Setup hooks with the `maintenance` matcher before a print-mode session. · `claude -p --maintenance &quot;query&quot;`
`-v, --version` · Show the installed `claude` CLI version. · `claude --version`
`-h, --help` · Display help / usage. · `claude --help`

&gt; This table highlights common and recently changed options; `claude --help` and the live CLI reference are authoritative. `--output-format json` is useful for one-shot automation; use `stream-json` for event-level integrations.

For programmatic integrations, the former **Claude Code SDK** is now the Claude Agent SDK: TypeScript uses `@anthropic-ai/claude-agent-sdk`, and Python uses `claude-agent-sdk` / `claude_agent_sdk`. Use `claude -p` for headless CLI calls; `--bare` removes discovered customization and keychain/OAuth access for low-overhead API/provider automation.

CLI Quick Reference &amp; Configuration Examples```md
## Claude Cheat Sheet

# Start and resume

claude # Start interactive REPL
claude &quot;explain this project&quot; # Start REPL seeded with a prompt
claude -p &quot;summarize README.md&quot; # Non-interactive headless print mode
cat logs.txt | claude -p &quot;explain&quot; # Pipe input to Claude and exit
claude -c # Continue most recent conversation
claude -r &quot;&lt;session-id&gt;&quot; &quot;finish this&quot; # Resume by ID or name
claude --model sonnet # Pick the Sonnet alias for this run
claude --model opus # Pick the Opus alias for harder tasks

# Install, update, and auth

claude update # Manually update Claude Code
claude doctor # Diagnose install/version &amp; setup
claude install stable # Install/reinstall the native binary on the stable channel
claude auth login # Log in to your Anthropic account
claude auth status # Check authentication status
claude auth logout # Log out

# Background and remote sessions

claude agents # Open the live session dashboard: running, blocked, completed
claude agents --json # Scriptable JSON list of live/background sessions
claude --bg &quot;run the integration suite and summarize failures&quot; # Start a background session
claude --bg --exec &quot;npm test&quot; # Run a shell command as an attachable background session
claude attach &lt;id&gt; # Attach to a background session
claude logs &lt;id&gt; # Print recent background-session output
claude stop &lt;id&gt; # Stop a background session
claude rm &lt;id&gt; # Remove it from agent view and delete its worktree; transcript remains resumable
claude remote-control # Serve local sessions to web/mobile while this process stays alive
claude --cloud &quot;Fix the bug&quot; # Create a web session on claude.ai
claude --teleport &lt;session-id&gt; # Copy a web session into this terminal

# Config essentials

/config # Interactive settings
/config model=sonnet # Set a supported key directly
/config theme=dark
/config --help # Show settable keys and values
# For shared or managed settings, edit the appropriate settings.json file.

# MCP essentials

claude mcp list # List configured MCP servers
claude mcp get &lt;name&gt; # Show details for a server
claude mcp add &lt;name&gt; &lt;command&gt; [args...] # Add local stdio server
claude mcp add --transport http &lt;name&gt; &lt;url&gt; # Add remote HTTP server
claude mcp login &lt;name&gt; # Complete OAuth without opening /mcp
claude mcp logout &lt;name&gt; # Clear saved OAuth credentials
claude mcp reset-project-choices # Reset approvals for project .mcp.json servers
claude mcp serve # Run Claude Code itself as an MCP stdio server

# High-value flags

claude --add-dir ../apps ../lib # Add additional working directories
claude --allowed-tools &quot;Bash(git log *)&quot; &quot;Read&quot; # Allow listed tools without permission prompts
claude --disallowed-tools &quot;Edit&quot; # Deny listed tools
claude -p &quot;query&quot; --output-format json # Structured one-shot output
claude --verbose # Verbose logging (turn-by-turn)
claude --dangerously-skip-permissions # Skip permission prompts (use with caution)
claude --permission-mode plan # Start in plan mode without source edits
claude --effort high # Set reasoning effort for this session
claude --bare -p &quot;query&quot; # Fast scripted call without discovered customization
claude --safe-mode # Troubleshoot with user/project customization disabled
claude --ax-screen-reader # Use the accessible flat-text renderer
claude --max-turns 3 -p &quot;query&quot; # Limit agentic turns (print mode only)

…(正文过长,页面只展示前面部分,完整内容见仓库)

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
claude-code-guide 怎么安装?

在客户端按下面的安装命令接入:git clone https://github.com/zebbern/claude-code-guide && cd claude-code-guide。对应的包名是 claude-code-guide。装完在客户端配置里引用同一个包或端点。

claude-code-guide 怎么在 Claude Desktop、Cursor、Cline 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

claude-code-guide 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

claude-code-guide 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

claude-code-guide 支持哪些客户端?

资料标注支持 Claude Desktop、Cursor、Cline、Claude Code;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

claude-code-guide 能提供哪些能力?

资料显示能力标签包括 claude-code-guide、ai、ai-agent、ai-agent-tools、anthropic-claude。具体工具清单以官方文档为准。

claude-code-guide 需要什么运行环境?

运行时为 Cross-platform;属于本地进程,需要在本机装好运行环境。

claude-code-guide 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-04-11。