claude-code  by T-Lab-CUHKSZ

Buildable Claude Code research fork

Created 5 days ago

New!

274 stars

Top 94.3% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a buildable, modifiable, and runnable fork of the Claude Code source, reconstructed from a publicly exposed snapshot. It targets researchers and power users needing to inspect, adapt, or extend the Claude Code system. The primary benefit is enabling functional experimentation with a previously non-compilable codebase.

How It Works

This fork reconstructs the build system (package.json, tsconfig.json, etc.) for a Claude Code source snapshot leaked via npm source map. It utilizes Bun as the runtime and TypeScript for development, adding minimal stubs for over 100 missing internal or feature-gated modules to allow the build to complete. The core architecture features an agentic loop (query.ts, QueryEngine.ts) that orchestrates tool calls, managed by a layered prompt system and a file-based memory system.

Quick Start & Requirements

  • Prerequisites: Bun >= 1.3.x, valid Anthropic authentication (OAuth via claude login or ANTHROPIC_API_KEY environment variable).
  • Install: git clone https://github.com/beita6969/claude-code.git, cd claude-code, bun install.
  • Run: bun src/main.tsx -p "your prompt here" --output-format text.
  • Build (Optional): bun build src/main.tsx --outdir=dist --target=bun.
  • Documentation: Primary details are within the repository's README.

Highlighted Details

  • Reconstructed build system from a source map leak, enabling compilation and execution of previously non-functional code.
  • Over 100 internal/feature-gated modules stubbed to allow build completion.
  • Extensive toolset (40+ tools) including Bash, File I/O, Search, and agent coordination.
  • Extensible via custom skills, agents, MCP servers, and hooks without source modification.
  • Feature flags are controlled via bun:bundle and require manual editing of node_modules/bundle/index.js.

Maintenance & Community

This project is a research fork by T-Lab-CUHKSZ/claude-code. No specific contributors, sponsorships, or community links (e.g., Discord/Slack) are detailed in the provided README.

Licensing & Compatibility

The repository is explicitly stated to be for "educational and research purposes only." The original Claude Code source remains the property of Anthropic. No open-source license (e.g., MIT, Apache) is specified, indicating significant restrictions on commercial use or integration into closed-source projects.

Limitations & Caveats

This project is based on a leaked snapshot and is not official Anthropic code, intended solely for educational/research use. Many internal/feature-gated modules are stubbed, potentially limiting full functionality. The absence of an explicit open-source license raises compatibility concerns for commercial applications. Feature flags are disabled by default and require manual modification of installed dependencies.

Health Check
Last Commit

4 days ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
2
Star History
276 stars in the last 5 days

Explore Similar Projects

Feedback? Help us improve.