nano-claude  by dox012

Agentic CLI for Claude-like interactions and tool use

Created 3 weeks ago

New!

318 stars

Top 85.2% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

nano-claude provides a highly distilled, ~2,000-line TypeScript reimplementation of Anthropic's Claude Code, targeting developers and researchers who need to understand, modify, or build upon its core agentic capabilities. It serves as a lightweight, incremental alternative to the full Claude Code, significantly simplifying comprehension and customization of LLM agent architectures and tool-use patterns.

How It Works

This project meticulously reconstructs Claude Code's functionality using TypeScript and the Bun runtime, emphasizing a minimal codebase and clear architecture. Its core design revolves around an agentic tool-use loop, progressively building features across distinct versions from a basic streaming REPL to advanced session persistence, smart conversation compaction, and multi-agent orchestration. The approach prioritizes understandability by employing a simple readline interface and abstracting complex LLM interactions.

Quick Start & Requirements

Installation is straightforward: npm install, copy .env.example to .env, and edit the .env file with your Anthropic API key. The project is initiated using npm run dev. Key requirements include Node.js/Bun and an API key for LLM interaction.

Highlighted Details

  • Versioned Development: Features are incrementally added across 8 tagged versions (v0-v8), each serving as a milestone to illustrate specific concepts: streaming REPL, agentic tool-use, markdown rendering, safety permissions, session persistence, context window management, multi-level CLAUDE.md, persistent memory, and sub-agent orchestration.
  • Core Tools: A curated set of 7 tools is provided for environment interaction: bash (with per-command risk classification), read (with line numbers), write, edit, glob (file pattern search), grep (content search), and agent (sub-agent spawning).
  • Flexible CLI & Interaction: Offers both interactive REPL and non-interactive modes, supporting session continuation/resumption, model overrides, and fine-grained control over agent behavior, including a --dangerously-skip-permissions flag for advanced use cases.
  • In-Chat Commands: A comprehensive set of slash commands (/help, /cost, /clear, /compact, /model, /sessions, /resume, /remember, /forget, /memory) allows for dynamic management of the agent's state and interaction.

Maintenance & Community

No specific details regarding maintainers, community channels (like Discord/Slack), sponsorships, or roadmap were provided in the README.

Licensing & Compatibility

The project is released under the MIT License, which permits broad use, modification, and distribution, including for commercial purposes, without significant copyleft restrictions.

Limitations & Caveats

As a "lightweight, incremental reimplementation," nano-claude may not replicate all functionalities or the full robustness of the original Claude Code. The presence of a --dangerously-skip-permissions flag indicates potential security considerations when executing tools without explicit user confirmation. The project's versioned structure suggests it is actively under development and may undergo further changes.

Health Check
Last Commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
318 stars in the last 27 days

Explore Similar Projects

Feedback? Help us improve.