Appendix B
Essential Commands & CLI Reference
Terminal: pwd, ls, cd, mkdir, touch, cp, mv, rm, cat, less, head, tail, echo, grep, find
Git: git init, git add, git commit, git push, git pull, git branch, git checkout, git merge, git log, git diff, git status, git stash
Claude Code Slash Commands: /help, /compact, /clear, /model, /context, /init, /code-review, /cost, /permissions, /hooks, /agents, /add-dir, /statusline, /fast
npm: npm install, npm run dev, npm run build, npx
CLI Flags Reference (Key Flags)
| Flag | Description |
|---|---|
-p "query" | Print mode — non-interactive, for scripts/CI |
-c | Continue most recent conversation |
-r <session> | Resume a specific session by ID or name |
--model <name> | Set model (alias: sonnet, opus, haiku, or full model ID) |
--permission-mode <mode> | Start in a permission mode: plan, acceptEdits, dontAsk, bypassPermissions, delegate |
--agents '<json>' | Define session-level subagents via JSON |
--agent <name> | Run a named agent as the main thread |
--add-dir <path> | Add additional working directories |
--mcp-config <file> | Load MCP servers from JSON file |
--strict-mcp-config | Only use MCP servers from --mcp-config |
--tools "Bash,Edit,Read" | Restrict which built-in tools Claude can use |
--disallowedTools "Task(Explore)" | Deny specific tools |
--allowedTools "Bash(npm run *)" | Pre-approve specific tools without prompting |
--system-prompt "..." | Replace the entire system prompt |
--append-system-prompt "..." | Append to the default system prompt |
--output-format json | Output format for -p mode: text, json, stream-json |
--json-schema '<schema>' | Get validated JSON output matching a schema (-p only) |
--max-turns <n> | Limit agentic turns (-p only) |
--max-budget-usd <n> | Maximum dollar spend before stopping (-p only) |
--fallback-model <name> | Auto-fallback when default model is overloaded (-p only) |
--from-pr <number> | Resume sessions linked to a GitHub PR |
--fork-session | Create new session ID when resuming |
--chrome | Enable Chrome browser integration |
--remote "task" | Create a web session on claude.ai |
--teleport | Resume a web session in local terminal |
--teammate-mode <mode> | Agent team display: auto, in-process, tmux |
--plugin-dir <path> | Load plugins from a directory |
--verbose | Enable verbose logging |
--debug | Debug mode with optional category filter |
--dangerously-skip-permissions | Skip all permission prompts (use with extreme caution) |
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+C | Cancel current generation |
Ctrl+B | Background a running task |
Ctrl+O | Toggle verbose mode (see hook output) |
Ctrl+G | Open external editor |
Shift+Up/Down | Switch between agent team teammates |
Escape | Clear current input / exit mode |