ChinaSiro/claude-code-sourcemapPublic

AI summary: Reconstructed TypeScript source code for Claude Code CLI extracted via source maps.

Stars
9.6K
+-1 today
Forks
14.7K
Watchers
34
Open issues
8
Open PRs
4
Contributors
~1
Commits
1
Branches
1

TypeScriptNo licenseCreated Mar 31, 2026Last push 4mo ago+13 stars this week+24 this month

Star history

since Mar 29, 2026
02.5K5K7.5KMar 2026May 2026Jun 2026Aug 2026
9.6K stars as of Aug 6, 2026, tracked back to Mar 29, 2026. Historical curve reconstructed from public GitHub event archives, calibrated to the current total.

What claude-code-sourcemap does

This repository provides a reconstructed version of the internal TypeScript source code for Anthropic's Claude Code CLI. By extracting the 'sourcesContent' field from the publicly distributed npm package's source map (cli.js.map), it restores over 4,700 original source files. This allows researchers to study the internal architecture of Claude Code, including its Agent coordinator, MCP integrations, plugin system, and specific CLI command implementations.

Security researchers, AI engineers, and CLI tool developers who want to study the internal architecture and implementation details of Anthropic's Claude Code.

  • Source map extraction: Reconstructs the original .ts and .tsx files directly from the published cli.js.map file.
  • Complete file structure: Restores the internal directory tree, including /tools, /commands, /coordinator, and /plugins.
  • Agent architecture insights: Reveals the internal implementation of the KAIROS assistant mode and multi-agent coordination.
  • Tool implementations: Contains the source code for over 30 built-in tools like Bash, FileEdit, Grep, and MCP.
  • React CLI components: Exposes the React-based terminal UI implementation and context management.

Where teams use it

Agent architecture research

AI researchers study the /coordinator and /assistant directories to understand how Anthropic implements multi-agent workflows.

Custom MCP tool development

Developers inspect the /tools directory to learn the best practices for building robust MCP servers for Claude.

CLI UI design patterns

React developers study the /main.tsx and /context files to see how a complex terminal UI is built using React components.

Security analysis

Security researchers analyze the /utils/auth and /utils/env files to understand how the CLI handles credentials and local execution.

Getting started: git clone https://github.com/ChinaSiro/claude-code-sourcemap.git

README

main branch

claude-code-sourcemap

linux.do

Warning

This repository is unofficial and is reconstructed from the public npm package and source map analysis, for research purposes only. It does not represent the original internal development repository structure.

本仓库为非官方整理版,基于公开 npm 发布包与 source map 分析还原,仅供研究使用不代表官方原始内部开发仓库结构。 一切基于L站"飘然与我同"的情报提供

概述

本仓库通过 npm 发布包(@anthropic-ai/claude-code)内附带的 source map(cli.js.map)还原的 TypeScript 源码,版本为 2.1.88

来源

  • npm 包:@anthropic-ai/claude-code
  • 还原版本:2.1.88
  • 还原文件数:4756 个(含 1884 个 .ts/.tsx 源文件)
  • 还原方式:提取 cli.js.map 中的 sourcesContent 字段

目录结构

restored-src/src/
├── main.tsx              # CLI 入口
├── tools/                # 工具实现(Bash、FileEdit、Grep、MCP 等 30+ 个)
├── commands/             # 命令实现(commit、review、config 等 40+ 个)
├── services/             # API、MCP、分析等服务
├── utils/                # 工具函数(git、model、auth、env 等)
├── context/              # React Context
├── coordinator/          # 多 Agent 协调模式
├── assistant/            # 助手模式(KAIROS)
├── buddy/                # AI 伴侣 UI
├── remote/               # 远程会话
├── plugins/              # 插件系统
├── skills/               # 技能系统
├── voice/                # 语音交互
└── vim/                  # Vim 模式

声明

  • 源码版权归 Anthropic 所有
  • 本仓库仅用于技术研究与学习,请勿用于商业用途
  • 如有侵权,请联系删除
View on GitHub

Recent activity

commits and pull requests

Code frequency

additions and deletions
+982.8K-982.8KWeek of 2026-03-29: +982,833 linesWeek of 2026-03-29: -0 linesWeek of 2026-04-05: +0 linesWeek of 2026-04-05: -0 linesWeek of 2026-04-12: +0 linesWeek of 2026-04-12: -0 linesWeek of 2026-04-19: +0 linesWeek of 2026-04-19: -0 linesWeek of 2026-04-26: +0 linesWeek of 2026-04-26: -0 linesWeek of 2026-05-03: +0 linesWeek of 2026-05-03: -0 linesWeek of 2026-05-10: +0 linesWeek of 2026-05-10: -0 linesWeek of 2026-05-17: +0 linesWeek of 2026-05-17: -0 linesWeek of 2026-05-24: +0 linesWeek of 2026-05-24: -0 linesWeek of 2026-05-31: +0 linesWeek of 2026-05-31: -0 linesWeek of 2026-06-07: +0 linesWeek of 2026-06-07: -0 linesWeek of 2026-06-14: +0 linesWeek of 2026-06-14: -0 linesWeek of 2026-06-21: +0 linesWeek of 2026-06-21: -0 linesWeek of 2026-06-28: +0 linesWeek of 2026-06-28: -0 linesWeek of 2026-07-05: +0 linesWeek of 2026-07-05: -0 linesWeek of 2026-07-12: +0 linesWeek of 2026-07-12: -0 linesWeek of 2026-07-19: +0 linesWeek of 2026-07-19: -0 linesWeek of 2026-07-26: +0 linesWeek of 2026-07-26: -0 linesMar 29, 2026Jul 26, 2026
+982.8K lines added, -0 removed over the last year.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 0 commitsSun 1:00 — 0 commitsSun 2:00 — 0 commitsSun 3:00 — 0 commitsSun 4:00 — 0 commitsSun 5:00 — 0 commitsSun 6:00 — 0 commitsSun 7:00 — 0 commitsSun 8:00 — 0 commitsSun 9:00 — 0 commitsSun 10:00 — 0 commitsSun 11:00 — 0 commitsSun 12:00 — 0 commitsSun 13:00 — 0 commitsSun 14:00 — 0 commitsSun 15:00 — 0 commitsSun 16:00 — 0 commitsSun 17:00 — 0 commitsSun 18:00 — 0 commitsSun 19:00 — 0 commitsSun 20:00 — 0 commitsSun 21:00 — 0 commitsSun 22:00 — 0 commitsSun 23:00 — 0 commitsMon 0:00 — 0 commitsMon 1:00 — 0 commitsMon 2:00 — 0 commitsMon 3:00 — 0 commitsMon 4:00 — 0 commitsMon 5:00 — 0 commitsMon 6:00 — 0 commitsMon 7:00 — 0 commitsMon 8:00 — 0 commitsMon 9:00 — 0 commitsMon 10:00 — 0 commitsMon 11:00 — 0 commitsMon 12:00 — 0 commitsMon 13:00 — 0 commitsMon 14:00 — 0 commitsMon 15:00 — 0 commitsMon 16:00 — 0 commitsMon 17:00 — 0 commitsMon 18:00 — 0 commitsMon 19:00 — 0 commitsMon 20:00 — 0 commitsMon 21:00 — 0 commitsMon 22:00 — 0 commitsMon 23:00 — 0 commitsTue 0:00 — 0 commitsTue 1:00 — 0 commitsTue 2:00 — 0 commitsTue 3:00 — 0 commitsTue 4:00 — 0 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 0 commitsTue 8:00 — 0 commitsTue 9:00 — 0 commitsTue 10:00 — 0 commitsTue 11:00 — 0 commitsTue 12:00 — 0 commitsTue 13:00 — 0 commitsTue 14:00 — 0 commitsTue 15:00 — 0 commitsTue 16:00 — 1 commitsTue 17:00 — 0 commitsTue 18:00 — 0 commitsTue 19:00 — 0 commitsTue 20:00 — 0 commitsTue 21:00 — 0 commitsTue 22:00 — 0 commitsTue 23:00 — 0 commitsWed 0:00 — 0 commitsWed 1:00 — 0 commitsWed 2:00 — 0 commitsWed 3:00 — 0 commitsWed 4:00 — 0 commitsWed 5:00 — 0 commitsWed 6:00 — 0 commitsWed 7:00 — 0 commitsWed 8:00 — 0 commitsWed 9:00 — 0 commitsWed 10:00 — 0 commitsWed 11:00 — 0 commitsWed 12:00 — 0 commitsWed 13:00 — 0 commitsWed 14:00 — 0 commitsWed 15:00 — 0 commitsWed 16:00 — 0 commitsWed 17:00 — 0 commitsWed 18:00 — 0 commitsWed 19:00 — 0 commitsWed 20:00 — 0 commitsWed 21:00 — 0 commitsWed 22:00 — 0 commitsWed 23:00 — 0 commitsThu 0:00 — 0 commitsThu 1:00 — 0 commitsThu 2:00 — 0 commitsThu 3:00 — 0 commitsThu 4:00 — 0 commitsThu 5:00 — 0 commitsThu 6:00 — 0 commitsThu 7:00 — 0 commitsThu 8:00 — 0 commitsThu 9:00 — 0 commitsThu 10:00 — 0 commitsThu 11:00 — 0 commitsThu 12:00 — 0 commitsThu 13:00 — 0 commitsThu 14:00 — 0 commitsThu 15:00 — 0 commitsThu 16:00 — 0 commitsThu 17:00 — 0 commitsThu 18:00 — 0 commitsThu 19:00 — 0 commitsThu 20:00 — 0 commitsThu 21:00 — 0 commitsThu 22:00 — 0 commitsThu 23:00 — 0 commitsFri 0:00 — 0 commitsFri 1:00 — 0 commitsFri 2:00 — 0 commitsFri 3:00 — 0 commitsFri 4:00 — 0 commitsFri 5:00 — 0 commitsFri 6:00 — 0 commitsFri 7:00 — 0 commitsFri 8:00 — 0 commitsFri 9:00 — 0 commitsFri 10:00 — 0 commitsFri 11:00 — 0 commitsFri 12:00 — 0 commitsFri 13:00 — 0 commitsFri 14:00 — 0 commitsFri 15:00 — 0 commitsFri 16:00 — 0 commitsFri 17:00 — 0 commitsFri 18:00 — 0 commitsFri 19:00 — 0 commitsFri 20:00 — 0 commitsFri 21:00 — 0 commitsFri 22:00 — 0 commitsFri 23:00 — 0 commitsSat 0:00 — 0 commitsSat 1:00 — 0 commitsSat 2:00 — 0 commitsSat 3:00 — 0 commitsSat 4:00 — 0 commitsSat 5:00 — 0 commitsSat 6:00 — 0 commitsSat 7:00 — 0 commitsSat 8:00 — 0 commitsSat 9:00 — 0 commitsSat 10:00 — 0 commitsSat 11:00 — 0 commitsSat 12:00 — 0 commitsSat 13:00 — 0 commitsSat 14:00 — 0 commitsSat 15:00 — 0 commitsSat 16:00 — 0 commitsSat 17:00 — 0 commitsSat 18:00 — 0 commitsSat 19:00 — 0 commitsSat 20:00 — 0 commitsSat 21:00 — 0 commitsSat 22:00 — 0 commitsSat 23:00 — 0 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits1 (100%)
Community commits0 (0%)

1 commits in total over the last year.

DateListRankStars gained
Apr 1, 2026daily#8+401
Mar 31, 2026daily#14+221
  • freeCodeCamp/freeCodeCamp

    freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

    453.6K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    385.5K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript

  • anomalyco/opencode

    The open source coding agent.

    194.7K stars · TypeScript