claude
01Start an interactive Claude Code session in the current directory.
$ claudeA free, searchable field guide for claude code commands, claude code mcp, claude code config, claude code workflow, and practical claude code tips.
Start sessions, manage context, switch models, and move between tasks without leaving the terminal.
claudeStart an interactive Claude Code session in the current directory.
$ claudeclaude -cContinue the most recent conversation in the current directory.
$ claude -cclaude -r <session>Resume a conversation by session ID or name, optionally with a new prompt.
$ claude -r "auth-refactor"/helpShow the available built-in commands and usage hints. Type / to filter the command menu.
/help/model [model]Switch the AI model. With no argument, open the picker; supported models can also adjust effort with the arrow keys.
/model sonnet/clear [name]Start a new conversation with empty context. An optional name keeps the old session easy to find in /resume.
/clear new-task/compact [instructions]Summarize the current conversation to free context while keeping the same session. Add focus instructions when needed.
/compact focus on the API error/initInitialize a project guide by creating a starter CLAUDE.md for the repository.
/init/resume [session]Resume a conversation by ID or name, or open the session picker. Alias: /continue.
/resume auth-refactor/statusOpen Settings on the Status tab to inspect version, model, account, connectivity, and setting sources.
/status/quitExit the CLI. /quit is an alias of /exit; Ctrl+D also sends the exit signal.
/quitclaude -pRun a non-interactive prompt for scripts or CI. Pair it with an output format when a machine-readable result is needed.
$ claude -p "explain this function" --output-format jsonmcp, permission, or context.Use CLAUDE.md for project context and settings.json for behavior, permissions, model, and output style.
CLAUDE.mdPersistent project context: architecture, conventions, test commands, constraints, and instructions Claude should follow every session.
# Project instructions
- Run npm test before a PR.settings.json scopesUser settings apply everywhere; project settings are shared; local settings are gitignored overrides. Managed policy sits above them.
~/.claude/settings.json
.claude/settings.json
.claude/settings.local.jsonmodelSet the initial model in settings, use --model for a launch override, or use /model during a session.
{ "model": "claude-sonnet-4-6" }permissionsAllow, ask, or deny tool calls with specific rules. Deny rules take precedence; review active sources with /status and edit via /permissions.
{ "permissions": { "allow": ["Bash(npm test *)"] } }outputStyleChange how Claude responds. Built-in styles include Default, Explanatory, Proactive, and Learning; custom styles live in output-styles/.
{ "outputStyle": "Explanatory" }.claude/rules/Split reusable project rules into focused Markdown files. Keep personal project notes in CLAUDE.local.md; use @path/to/file to import context.
.claude/rules/
testing.md
api-style.mdCLAUDE.md tells Claude about your project. settings.json controls behavior and permissions. .mcp.json connects shared MCP servers. Output styles change response format.
model, permission, or CLAUDE.md.Model Context Protocol lets Claude Code connect to external tools and data sources through configured MCP servers.
MCP in one lineMCP is an open protocol for exposing tools, resources, and prompts to an AI client. In Claude Code, each server adds a reviewed connection to an outside system.
Claude Code + MCP = connected toolsclaude mcp add · HTTPAdd a remote HTTP server. HTTP is the recommended transport for cloud services and supports OAuth when the provider offers it.
$ claude mcp add --transport http notion https://mcp.notion.com/mcpclaude mcp add · stdioRun a local MCP process. The double dash separates Claude Code options from the server command and its arguments.
$ claude mcp add --transport stdio my-server -- npx -y my-mcp-serverlist / get / removeList configured servers, inspect one server, or remove it. Inside a Claude Code session, use /mcp for status and authentication.
claude mcp list
claude mcp get notion
claude mcp remove notion--scope decides who gets itLocal is the default and stays tied to you and one project. Project scope writes shared config to .mcp.json; user scope is available across your projects.
$ claude mcp add --scope project ...These provider endpoints are documented examples. Always review the provider’s current setup and permissions before connecting.
notion → mcp.notion.com/mcpHTTPsentry → mcp.sentry.dev/mcpOAuthstripe → mcp.stripe.comHTTPFor OAuth-capable HTTP servers, run /mcp in a session or use claude mcp login <name>. Keep tokens out of .mcp.json and source control.
server, scope, or oauth.Small context, explicit intent, and short feedback loops make the agent easier to steer and easier to trust.
Use /clear when the goal changes. Give the previous session a name if you may need it later with /resume.
For a large change, use /plan or start with --permission-mode plan. Ask for files, risks, and verification steps before edits.
Make one logical change, inspect git diff, run the focused test, then commit. Short checkpoints make mistakes cheap to undo.
Use /context to see what is consuming space. Use /compact for the same task, or narrow the request instead of pasting whole logs.
Ask Claude to explain what changed and how it verified the result. Use /status, /doctor, tests, and a final diff review.
For CI or scripts, use claude -p with --output-format json. Keep prompts narrow and set a clear budget or failure condition.
plan, context, or commit.Start with the narrowest diagnostic, then change one variable at a time. Avoid bypassing safety controls just to make an error disappear.
Pause and retry with backoff. Check account usage, plan or API billing, provider status, and whether multiple sessions are sharing the same limit.
/status
claude auth status --textRun /context to find the biggest consumers, then /compact with a focus. Start a new task with /clear and summarize only what matters.
/context
/compact keep the API decisionsInspect the exact tool rule in /permissions. Check the working directory and the setting scope; a managed deny cannot be overridden by a project file.
/permissions
/statusCheck the endpoint, transport, headers, proxy, and local network. For MCP, inspect health with claude mcp get and re-authenticate if needed.
claude mcp get notion
claude mcp login notionCheck whether Claude Code is authenticated, then sign in again. If you use Console billing, select the console login flow; do not commit credentials.
claude auth status --text
claude auth loginCommand availability can vary by Claude Code version, plan, platform, and environment. Check your version and the current command menu before automating.
claude --version
/helpnetwork, context, or permission.Terminal interactions vary slightly by OS and terminal. These are the common Claude Code CLI bindings.
Cancel current input or generation.
Exit the Claude Code session.
Redraw the screen while keeping input and history.
Toggle detailed tool usage and transcript view.
Search previous prompts interactively.
Background a running Bash command or agent.
Cycle permission modes such as default, acceptEdits, and plan.
Rewind code and/or conversation, or summarize from a selected point.
Add a newline without submitting in any terminal.
/ commands, ! shell mode, @ file mention.
Ctrl, mode, or history.Short answers for the most common Claude Code setup and workflow questions.
Claude Code is Anthropic’s coding agent that runs in your terminal or supported IDE surfaces. It can inspect a repository, edit files, run tools with your approval, and help you reason through a change. Its exact features depend on your version, platform, plan, and provider.
Use CLAUDE.md for project conventions and context. Use /config or the appropriate settings.json scope for model, permissions, output style, hooks, and environment settings. Use .mcp.json for shared project MCP servers.
MCP, or Model Context Protocol, is an open protocol for connecting AI clients to external tools and data. In Claude Code, you add servers with claude mcp add, inspect them with claude mcp list or /mcp, and remove them with claude mcp remove.
Start with the smallest diagnostic: /status for account and connectivity, /doctor for setup checks, /permissions for denied tools, and /mcp or claude mcp get for server health. For context issues, use /context and /compact; for authentication, use claude auth status.
Use /clear when you are starting a genuinely new task and want empty context. Use /compact when you are staying on the same task but need a shorter summary to free the context window.
config, MCP, or errors.