Claude Code CLI Source Code
Learn Claude Code
from the inside out
Two interactive modes to explore how a production AI-powered CLI is actually built — from streaming concurrency to OAuth flows to security hardening.
MODE 1
Interactive Code Tour
Step through 12 curated chapters of the source code with annotated code viewer, narrative explanations, and live AI chat.
- →CLI Bootstrap & Entry Points
- →Query Engine & Streaming
- →Tool System & Concurrency
- →Security & Permission Model
- →+ 8 more chapters
Start tour
MODE 2
System Design Learning
Explore 12 system design patterns mapped to the actual source code — with architecture diagrams and AI chat.
- →Plugin & Factory Patterns
- →Concurrent Execution Model
- →Defense-in-Depth Security
- →OAuth Token Lifecycle
- →+ 8 more concepts
Explore concepts
2,000+
Source files explored
45+
Tools documented
12
System design patterns
Live AI
Chat in every chapter