>_FoxiRef
>_/cheatsheet/claude-code
Claude Code

Claude Code Cheatsheet

Frequently used Claude Code commands

#Basic Usage

CommandDescription
claudeStart interactive mode
claude "..."Ask once and exit
claude -p "..."For pipeline/scripts (non-interactive)
claude --cwd /pathStart in specific directory
claude --versionCheck version

#Slash Commands

CommandDescription
/helpShow help
/clearClear conversation history
/compactCompress context (save tokens)
/configView/change settings
/costCheck current session cost
/doctorDiagnose settings
/initCreate CLAUDE.md file
/loginLogin to account
/logoutLogout
/memoryEdit memory
/modelChange model
/permissionsView permissions
/reviewRequest code review
/terminal-setupTerminal setup (Shift+Enter, etc.)
/vimToggle Vim mode

#CLI Flags

CommandDescription
--model <model>Specify model to use
--output-format textOutput text only
--output-format jsonOutput in JSON format
--output-format stream-jsonStreaming JSON output
--system-prompt "..."Add system prompt
--mcp-config <file>Specify MCP config file
--allowedTools "..."Specify allowed tools
--permission-mode planRead-only mode
--dangerouslySkipPermissionsSkip all permission checks (for CI)
--resumeResume last conversation
--continueContinue most recent conversation

#Pipeline Usage

CommandDescription
cat file | claude "Analyze this"Pass file content as input
git diff | claude "Review this"Analyze/review git diff
git diff --staged | claude "Write commit message"Generate commit message
npm test 2>&1 | claude "Analyze errors"Analyze test errors
git log --oneline | claude "Write PR description"Write PR description

#Keyboard Shortcuts

CommandDescription
Shift+EnterMulti-line input (setup required)
TabAutocomplete (filenames, etc.)
↑ / ↓Navigate previous/next input
Ctrl+CInterrupt current response
Ctrl+DEnd session
EscapeCancel current input

#Environment Variables

CommandDescription
ANTHROPIC_API_KEYAnthropic API key
CLAUDE_MODELDefault model setting
HTTP_PROXYHTTP proxy setting
HTTPS_PROXYHTTPS proxy setting

#Frequently Asked Questions

이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.