Discover and explore top open-source AI tools and projects—updated daily.
Windy3f3f3f3fReplicate a coding agent's core logic in ~1300 lines of TypeScript
New!
Top 52.7% on SourcePulse
This project provides a highly distilled, educational implementation of a coding agent, replicating core functionalities of Claude Code in approximately 1300 lines of TypeScript. It serves as a step-by-step tutorial for developers and researchers aiming to understand the internal workings of advanced coding assistants, offering a simplified yet functional model for learning and experimentation.
How It Works
The project reconstructs a coding agent's essential components, centered around a core agent loop that iteratively calls a Large Language Model (LLM), executes tools based on its output, and processes results. Key design choices include a simplified tool system comprising six fundamental operations (file read/write, code edit, search, command execution), strategic system prompt engineering to guide the LLM, and support for streaming output via both Anthropic and OpenAI compatible APIs. Context management is handled through token tracking and automatic dialogue compression, while a basic security layer requires user confirmation for potentially dangerous commands.
Quick Start & Requirements
npm install, build with npm run build, and run the interactive REPL with npm start. Global CLI access is available via npm link followed by mini-claude.ANTHROPIC_API_KEY) or OpenAI (OPENAI_API_KEY), and optionally custom base URLs (ANTHROPIC_BASE_URL, OPENAI_BASE_URL).MINI_CLAUDE_MODEL environment variable or a command-line argument (--model).Highlighted Details
--yolo flag.--resume flag.Maintenance & Community
The project acknowledges support and discussion from the LINUX DO community. No specific details regarding active maintainers, sponsorships, or dedicated community channels (like Discord/Slack) are provided in the README.
Licensing & Compatibility
The project is released under the MIT license. This permissive license allows for broad compatibility, including commercial use and integration into closed-source projects without significant restrictions.
Limitations & Caveats
This project is explicitly positioned as a "minimal viable implementation" for educational purposes, contrasting with the production-grade complexity of the original Claude Code. It features a significantly reduced toolset (6 vs. 66+), a simpler security model, and less sophisticated context management compared to its inspiration. The ~1300-line codebase prioritizes clarity and learning over feature parity or robustness for demanding production environments.
1 day ago
Inactive