CLI Reference
AdvancedPro49 minupdated 2026-10-21
Overview
The Claude Code CLI (Command Line Interface) is the primary way to interact with Claude Code. It provides powerful options for running queries, managing sessions, configuring models, and integrating Claude into your development workflows.
Architecture
graph TD
A["User Terminal"] -->|"claude [options] [query]"| B["Claude Code CLI"]
B -->|Interactive| C["REPL Mode"]
B -->|"--print"| D["Print Mode (SDK)"]
B -->|"--resume"| E["Session Resume"]
C -->|Conversation| F["Claude API"]
D -->|Single Query| F
E -->|Load Context| F
F -->|Response| G["Output"]
G -->|text/json/stream-json| H["Terminal/Pipe"]This guide continues on the Pro plan
You have seen the introduction and the first example. With Pro you unlock this guide and every other one - updated every day, with ready-to-copy examples.
In this guide (Pro): Runtime & Packaging · CLI Commands · Core Flags · Model & Configuration · System Prompt Customization · Tool & Permission Management · Output & Format · Workspace & Directory · MCP Configuration · Session Management · Advanced Features · Agents Configuration · High-Value Use Cases · Models · Key Environment Variables · Settings.json Keys · Quick Reference · Troubleshooting · Additional Resources
€7.99/month · No commitment · Cancel anytime
Open-source community guide (MIT) · curated and maintained by Doutor AI.
Need a tailor-made solution?
Not sure where to start with AI in your business? Get a free assessment and a tailored plan - no commitment.
Save hours every week with AI, no hassle
Doutor AI gives you 1,859 ready-to-copy AI prompts, by industry and in plain English - plus a complete technical library for those who want to go further.