문서 보기이전 판역링크맨 위로 이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. {{tag>[cli ai agent claude anthropic claude_code]}} ====== claude ====== Anthropic Claude Code CLI. Terminal에서 codebase를 분석하고 파일 수정, command 실행, Git workflow, MCP 및 agent 작업을 수행한다. ===== Summary ===== * ''claude''를 인자 없이 실행하면 현재 directory에서 interactive session을 시작한다. * ''-p''/''--print''는 prompt를 non-interactive 방식으로 실행해 script나 CI에서 사용한다. * 기존 CLI, slash command, shortcut 기록을 보존하고 2026-07-19 기준 공식 Claude Code 문서의 설치 및 update 흐름을 반영했다. ===== Installation ===== <note tip> 공식 문서는 native installer를 권장한다. 원격 설치 스크립트를 실행하기 전에 URL이 공식 ''claude.ai'' 도메인인지 확인한다. </note> <code bash> # macOS / Linux / WSL: native installer (권장) curl -fsSL https://claude.ai/install.sh | bash # macOS: Homebrew stable channel brew install --cask claude-code # npm 대안: Node.js 18 이상, sudo 사용 금지 npm install -g @anthropic-ai/claude-code # 설치 확인 및 진단 claude --version claude doctor </code> <code powershell> # Windows PowerShell: native installer (권장) irm https://claude.ai/install.ps1 | iex # Windows Package Manager winget install Anthropic.ClaudeCode # 설치 확인 및 진단 claude --version claude doctor </code> * native install의 기본 실행 파일 위치는 macOS/Linux에서 ''~/.local/bin/claude'', Windows에서 ''%USERPROFILE%\.local\bin\claude.exe''다. * native installation은 background auto-update를 지원한다. 즉시 확인하려면 ''claude update''를 실행한다. * Homebrew는 ''brew upgrade claude-code'', WinGet은 ''winget upgrade Anthropic.ClaudeCode''로 수동 update한다. * 설치 후 ''claude''를 실행해 browser login을 진행하거나 ''claude auth login''을 사용한다. 상태 확인은 ''claude auth status''다. * native Windows에서는 Git for Windows가 권장되며, 없으면 PowerShell을 shell tool로 사용한다. ===== CLI ===== * ''<color #c3c3c3>**claude**</color> <color #22b14c>[options]</color> <color #ff7f27>[command]</color> <color #7092be>[prompt]</color>'' * ''<color #22b14c>**--continue**</color>'' 이전 세션 이어서 시작 * ''<color #22b14c>**--resume**</color>'' 과거 특정 세션 선택해서 재개 * ''<color #22b14c>**-p**</color> <color #7092be>"PROMPT"</color>'' 비대화형 모드. CI/CD 자동화등에 사용 * ''<color #22b14c>**--model**</color> <color #7092be>MODEL</color>'' 모델 지정 * ''<color #22b14c>**--doctor**</color>'' 설치 상태 진단 * ''<color #22b14c>**--dangerously-skip-permissions**</color>'' 권한 요청 생략. 외부에서 격리된 환경에서만 사용한다. * ''<color #c3c3c3>**claude**</color> <color #ff7f27>**auth login**</color>'' * ''<color #c3c3c3>**claude**</color> <color #ff7f27>**auth status**</color>'' * ''<color #c3c3c3>**claude**</color> <color #ff7f27>**auth logout**</color>'' ===== Help ===== ++++ claude --help | <code text> Usage: claude [options] [command] [prompt] Claude Code - starts an interactive session by default, use -p/--print for non-interactive output Arguments: prompt Your prompt Options: --add-dir <directories...> Additional directories to allow tool access to --agent <agent> Agent for the current session. Overrides the 'agent' setting. --agents <json> JSON object defining custom agents (e.g. '{"reviewer": {"description": "Reviews code", "prompt": "You are a code reviewer"}}') --allow-dangerously-skip-permissions Enable bypassing all permission checks as an option, without it being enabled by default. Recommended only for sandboxes with no internet access. --allowedTools, --allowed-tools <tools...> Comma or space-separated list of tool names to allow (e.g. "Bash(git:*) Edit") --append-system-prompt <prompt> Append a system prompt to the default system prompt --bare Minimal mode: skip hooks, LSP, plugin sync, attribution, auto-memory, background prefetches, keychain reads, and CLAUDE.md auto-discovery. Sets CLAUDE_CODE_SIMPLE=1. Anthropic auth is strictly ANTHROPIC_API_KEY or apiKeyHelper via --settings (OAuth and keychain are never read). 3P providers (Bedrock/Vertex/Foundry) use their own credentials. Skills still resolve via /skill-name. Explicitly provide context via: --system-prompt[-file], --append-system-prompt[-file], --add-dir (CLAUDE.md dirs), --mcp-config, --settings, --agents, --plugin-dir. --betas <betas...> Beta headers to include in API requests (API key users only) --brief Enable SendUserMessage tool for agent-to-user communication --chrome Enable Claude in Chrome integration -c, --continue Continue the most recent conversation in the current directory --dangerously-skip-permissions Bypass all permission checks. Recommended only for sandboxes with no internet access. -d, --debug [filter] Enable debug mode with optional category filtering (e.g., "api,hooks" or "!1p,!file") --debug-file <path> Write debug logs to a specific file path (implicitly enables debug mode) --disable-slash-commands Disable all skills --disallowedTools, --disallowed-tools <tools...> Comma or space-separated list of tool names to deny (e.g. "Bash(git:*) Edit") --effort <level> Effort level for the current session (low, medium, high, max) --fallback-model <model> Enable automatic fallback to specified model when default model is overloaded (only works with --print) --file <specs...> File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png) --fork-session When resuming, create a new session ID instead of reusing the original (use with --resume or --continue) --from-pr [value] Resume a session linked to a PR by PR number/URL, or open interactive picker with optional search term -h, --help Display help for command --ide Automatically connect to IDE on startup if exactly one valid IDE is available --include-hook-events Include all hook lifecycle events in the output stream (only works with --output-format=stream-json) --include-partial-messages Include partial message chunks as they arrive (only works with --print and --output-format=stream-json) --input-format <format> Input format (only works with --print): "text" (default), or "stream-json" (realtime streaming input) (choices: "text", "stream-json") --json-schema <schema> JSON Schema for structured output validation. Example: {"type":"object","properties":{"name":{"type":"string"}},"required":["name"]} --max-budget-usd <amount> Maximum dollar amount to spend on API calls (only works with --print) --mcp-config <configs...> Load MCP servers from JSON files or strings (space-separated) --mcp-debug [DEPRECATED. Use --debug instead] Enable MCP debug mode (shows MCP server errors) --model <model> Model for the current session. Provide an alias for the latest model (e.g. 'sonnet' or 'opus') or a model's full name (e.g. 'claude-sonnet-4-6'). -n, --name <name> Set a display name for this session (shown in /resume and terminal title) --no-chrome Disable Claude in Chrome integration --no-session-persistence Disable session persistence - sessions will not be saved to disk and cannot be resumed (only works with --print) --output-format <format> Output format (only works with --print): "text" (default), "json" (single result), or "stream-json" (realtime streaming) (choices: "text", "json", "stream-json") --permission-mode <mode> Permission mode to use for the session (choices: "acceptEdits", "bypassPermissions", "default", "dontAsk", "plan", "auto") --plugin-dir <path> Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B) (default: []) -p, --print Print response and exit (useful for pipes). Note: The workspace trust dialog is skipped when Claude is run with the -p mode. Only use this flag in directories you trust. --replay-user-messages Re-emit user messages from stdin back on stdout for acknowledgment (only works with --input-format=stream-json and --output-format=stream-json) -r, --resume [value] Resume a conversation by session ID, or open interactive picker with optional search term --session-id <uuid> Use a specific session ID for the conversation (must be a valid UUID) --setting-sources <sources> Comma-separated list of setting sources to load (user, project, local). --settings <file-or-json> Path to a settings JSON file or a JSON string to load additional settings from --strict-mcp-config Only use MCP servers from --mcp-config, ignoring all other MCP configurations --system-prompt <prompt> System prompt to use for the session --tmux Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux. --tools <tools...> Specify the list of available tools from the built-in set. Use "" to disable all tools, "default" to use all tools, or specify tool names (e.g. "Bash,Edit,Read"). --verbose Override verbose mode setting from config -v, --version Output the version number -w, --worktree [name] Create a new git worktree for this session (optionally specify a name) Commands: agents [options] List configured agents auth Manage authentication auto-mode Inspect auto mode classifier configuration doctor Check the health of your Claude Code auto-updater. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust. install [options] [target] Install Claude Code native build. Use [target] to specify version (stable, latest, or specific version) mcp Configure and manage MCP servers plugin|plugins Manage Claude Code plugins setup-token Set up a long-lived authentication token (requires Claude subscription) update|upgrade Check for updates and install if available </code> ++++ ===== Command ===== * Session/Context * ''<color #ff7f27>**/context**</color>''** 토큰량 확인** * ''<color #ff7f27>**/compact**</color>'' 컨텍스트 압축. 80% 도달시 사용 권장. 인자로 보존할 내용 지정 가능 * ''<color #ff7f27>**/clear**</color>'' **대화 기록 완전 초기화**. 새작업시 사용 * ''<color #ff7f27>**/resume**</color>'' **대화복원** * ''<color #ff7f27>**/fork**</color> <color #7092be>NAME</color>'' 현재 대화 복사본 생성. 실험적 변경시 원본 보호 * ''<color #ff7f27>**/rollback**</color>'' 특정 대화 시점으로 되돌리기 * ''<color #ff7f27>**/export**</color>'' 다른 모델에서 사용하기 위해 내보내기 * ''<color #ff7f27>**/output-style**</color>'' **대화스타일(defalut, explanatory, leaning)** * Model / Behavior * ''<color #ff7f27>**/model**</color> <color #7092be>MODEL</color>'' 모델 전환 * ''<color #ff7f27>**/effort**</color> <color #7092be>LEVEL</color>'' 모델 추론 노력 수준. ''low'', ''medium'', ''high'', ''max''(Opus 4.6+) * ''<color #ff7f27>**/fast**</color>'' Fast Mode 토글. 빠른 반복 작업에 적합(비용주의) * ''<color #ff7f27>**/config**</color>'' 설정 편집. 자동 업데이트 채널 등 조정 * Project * ''<color #ff7f27>**/init**</color>'' 프로젝트 분석 후 CLAUDE.md 자동 생성 * ''<color #ff7f27>**/hooks**</color>'' 훅 설정 메뉴. 파일 저장시 자동 실행 규칙 구성 * ''<color #ff7f27>**/mcp**</color>'' **MCP 서버 연결관리** * ''<color #ff7f27>**/keybindings**</color>'' 단축키 커스터마이징 (''~/.claude/keybindings.json'') * Workflow (bundle) * ''<color #ff7f27>**/debug**</color>'' 오류 진단 및 디버깅 워크플로우 실행 * ''<color #ff7f27>**/simplify**</color>'' 복잡한 코드 단순화 제안 * ''<color #ff7f27>**/loop**</color> <color #7092be>TIME</color> <color #7092be>COMMAND</color>'' 명령 반복 실행(''/loop 5m /test'') * ''<color #ff7f27>**/btw**</color>'' 현재 작업 중 부수적인 제안 전달 * PR / GIT * ''<color #ff7f27>**/review**</color> #<color #7092be>NUMBER</color>'' PR 코드 리뷰 실행 * ''<color #ff7f27>**/pr-comments**</color>'' 현재 브랜치의 PR 코멘트 표시 * ''<color #ff7f27>**/security-review**</color>'' 미커밋 변경사항 보안 감사 * ''<color #ff7f27>**/install-github-app**</color>'' Github 앱 연동. PR 자동 리뷰 활성화 * ETC * ''<color #ff7f27>**/doctor**</color>'' 설치 상태 진단. * ''<color #ff7f27>**/insights**</color>'' 사용량 및 토큰 소비 통계 보고서 생성. (''.claude/usage-data/report.html'') * ''<color #ff7f27>**/help**</color>'' * ''<color #ff7f27>**/exit**</color>'' ===== Shortcut ===== * ''shift + Tab'' 일반/자동승인/PlanMode 순환 * ''Esc'' 현재 실행 중단 * ''@FILENAME'' 파일을 컨텍스트에 즉시 추가 * ''!COMMAND'' 쉘 명령 직접 실행(토큰 절약) ===== Troubleshooting ===== * ''claude: command not found''가 나오면 새 terminal을 열고 ''~/.local/bin''이 ''PATH''에 포함되었는지 확인한다. * 여러 설치가 충돌하면 macOS/Linux에서 ''which -a claude'', Windows에서 ''where.exe claude''로 중복 binary를 찾는다. * npm 설치 시 optional dependency를 제외하면 platform native binary를 찾지 못할 수 있다. ''--omit=optional''이나 ''.npmrc''의 ''optional=false'' 설정을 제거한다. * npm global 설치에 ''sudo''를 사용하지 않는다. permission 문제가 있으면 native installer로 전환한다. ===== See Also ===== * [[codex:ko|Codex CLI]] * [[gemini:ko|Gemini CLI]] * [[agent:openclaw|OpenClaw]] * [[agent:hermes|Hermes Agent]] * [[https://code.claude.com/docs/en/quickstart|Claude Code Quickstart]] ===== History ===== * codex:: 2026-07-19 Migrated to ''claude:ko'' and added native, Homebrew, WinGet, npm, verification, authentication, update, and troubleshooting guidance from official docs. {{indexmenu>.#1|js}} /home/u613600155/domains/cli.zerotymer.net/public_html/data/pages/claude/ko.txt 마지막으로 수정됨: 2026/07/19 02:41저자 127.0.0.1