/clear
/compact
/cost
/help
/model
/model <name>
/config
/permissions
/plan
/fast
claude # 启动交互式会话 claude --print "问题" # 非交互模式,直接输出回答 claude --resume # 恢复上一次会话 claude --continue # 继续上一次会话
claude --print --output-format json "问题" # JSON 格式输出 claude --print --output-format stream-json "问题" # 流式 JSON 输出
claude --model claude-opus-4-8 "问题" # 指定模型
claude --allowedTools "Bash(npm *)" "Edit" # 限制可用工具 claude --disallowedTools "Bash(rm *)" # 禁止特定工具
claude --mcp-config path/to/config.json # 指定 MCP 配置文件
ANTHROPIC_API_KEY
CLAUDE_MODEL
CLAUDE_CODE_MAX_OUTPUT_TOKENS