3.3 KiB
Claude Code — recovered source internals
!!! warning "Proprietary software / leaked reconstruction" This repository contains reconstructed TypeScript source from a published npm bundle source map (March 2026). The software is Anthropic’s proprietary product. These docs are for education and architecture study only. Building or redistributing a competing product may violate law or Anthropic’s terms. This site is not official documentation and not Anthropic support.
This documentation maps the src/ tree of the Claude Code CLI to how the product behaves, with cross-links to official Claude Code documentation.
What Claude Code is (official product)
From the product overview:
Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools. Available in your terminal, IDE, desktop app, and browser.
The recovered codebase implements primarily the terminal CLI surface, plus shared logic for tools, MCP, permissions, compaction, IDE bridge hooks, and related services.
How to use this site
| Section | Purpose |
|---|---|
| Installation | Build this documentation locally; install the real Claude Code from Anthropic. |
| Reproducibility | Why you cannot rebuild the shipping npm package from this tree alone. |
| System design | Layers, state/data flow, security and trust model. |
| Architecture | Overview diagram and links into system design + reference. |
| Workflows | Interactive REPL, print/headless, swarm, compaction paths. |
| Developer hub | Working on docs, navigating src/, Bun feature flags. |
| Guides | Greenfield agentic CLI and docs/CI patterns—not cloning this leak. |
| Official docs map | Every indexed doc page ↔ src/ entry points. |
| Reference | Deeper dives per subsystem. |
| Appendix | Directory layout, tool packages, environment variables, glossary. |
Repository
Source code lives under src/ on GitHub (mehmoodosman/claude-code-source-code). This site is published at https://mehmoodosman.github.io/claude-code-source-code/ via GitHub Actions from docs-site/.