claude-code-source-code  by 777genius

Claude CLI source code snapshot for terminal interaction

Created 3 days ago

New!

856 stars

Top 41.8% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides an exploratory mirror of a source code snapshot for Anthropic's Claude Code CLI, reportedly exposed via published source maps. It targets developers, researchers, and power users interested in understanding or analyzing the internal workings of this large-scale TypeScript codebase. The primary benefit is enabling interactive exploration and deep inspection of the CLI's architecture, tools, and commands through provided tooling.

How It Works

The project is built using TypeScript and the Bun runtime, comprising over 512,000 lines of code across approximately 1,900 files. Its architecture is modular, featuring a Tool System with ~40 distinct tools (e.g., File I/O, Search, Execution, Agent orchestration), a Command System with ~50 user-facing slash commands, and a Service Layer for external integrations. A Bridge System facilitates bidirectional communication with IDEs, while a Permission System governs tool invocation. An MCP (Model Context Protocol) server is included, allowing interactive exploration via compatible clients like VS Code, Claude Desktop, and Cursor.

Quick Start & Requirements

The MCP server can be installed and run directly via npm:

npx -y claude-code-explorer-mcp

Alternatively, clone the repository, navigate to mcp-server, install dependencies, build, and register the local server with Claude Code:

git clone https://github.com/777genius/claude-code-source-code.git
cd claude-code-source-code/mcp-server
npm install && npm run build
claude mcp add claude-code-explorer -- node ~/claude-code-source-code/mcp-server/dist/index.js

VS Code, Claude Desktop, and Cursor integration requires specific configuration files (.vscode/mcp.json or equivalent). Prerequisites include Node.js/npm (for setup) and the Claude Code CLI itself.

Highlighted Details

  • Codebase Scale: ~1,900 files and 512,000+ lines of TypeScript code.
  • Interactive Exploration: An MCP server enables clients like VS Code, Claude Desktop, and Cursor to explore the codebase interactively, with tools for listing commands/tools, reading source, and searching.
  • Comprehensive Documentation: The repository includes extensive documentation within the docs/ directory covering architecture, tools, commands, and subsystems.
  • Modular Design: Clear separation of concerns between tools, commands, services, and bridge components.

Maintenance & Community

This repository serves as an archival snapshot. Contributions are welcomed for the exploration tooling and MCP server, but changes to the core src/ snapshot are not the default contribution path. No specific community links (e.g., Discord, Slack) or roadmap details are provided.

Licensing & Compatibility

This repository archives a source snapshot and is provided for research, documentation, and exploration. It is explicitly stated that this is not an official release, and no rights to Anthropic's original code are granted. Users are solely responsible for assessing and complying with any legal implications of using or redistributing the archived material.

Limitations & Caveats

The primary limitation is the repository's nature as a leaked, unofficial snapshot, carrying potential legal ambiguities for users. The src/ directory is archived and intended for inspection, not modification or direct use in production systems. The project's stability and future are tied to the original source's status and the maintainer's efforts on the exploration tooling.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
1
Star History
866 stars in the last 3 days

Explore Similar Projects

Starred by Matt Schrage Matt Schrage(Cofounder of Fig), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
2 more.

amazon-q-developer-cli by aws

0.2%
2k
CLI tool for agentic terminal interactions using natural language
Created 1 year ago
Updated 1 week ago
Feedback? Help us improve.