Skip to content

Quick Reference: Claude CLI ​

Updated: 2026-05-26

Core Commands ​

CommandDescription
claudeStart interactive session
claude "prompt"Run a one-shot prompt
claude -pPipe input from stdin
claude --model MODELSpecify model
claude --max-tokens NSet max output tokens
claude --system "text"Set system prompt

Tool Commands ​

CommandDescription
claude toolsList available tools
claude skillsList installed skills
claude skill install NAMEInstall a skill
claude mcpManage MCP tunnel connections

Common Patterns ​

bash
# One-shot prompt
claude "Summarize this file" < file.txt

# Interactive with tools
claude --tools

# Specify model
claude --model claude-sonnet-4-6 "Explain the code"

# Pipe input
cat error.log | claude "Diagnose this error"

# With system prompt
claude --system "You are a security auditor" "Review this config"

Gotchas ​

IssueFix
Tools not availableAdd --tools flag
Token limit hitIncrease --max-tokens
Slow responsesTry Haiku model for speed
Auth errorRun claude login or set ANTHROPIC_API_KEY