LibreAI / Agents / claude-code-from-scratch
// agents · Windy3f3f3f3f/claude-code-from-scratch

claude-code-from-scratch

Rebuild Claude Code’s core in ~5,000 lines: an 11-chapter coding-agent masterclass.

💎 Hidden gem★ 2.7k stars⑂ 547 forksMITupdated 2026-07
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

claude-code-from-scratch is an open-source agents project by Windy3f3f3f3f (Windy3f3f3f3f/claude-code-from-scratch on GitHub). It has 2,727 GitHub stars and 547 forks, is released under the MIT license, and was last updated on GitHub on 9 July 2026.

GitHub stars
2,727
Forks
547
License
MIT
Last updated on GitHub
9 July 2026
Category
Agents
Listing
Hidden gem — a shorter page for a lesser-known project
Official site
Official site
// how it works

How it works

  1. Start chapter one

    Follow the guided tutorial sequence.

  2. Build the core loop

    Implement the agent’s reasoning cycle.

  3. Add tools

    Wire up file, shell, and search tools.

  4. Finish your agent

    End with a working Claude Code-style agent.

// features

Why people love it

Eleven-chapter tutorial

Step-by-step guided learning.

About 5,000 lines

Core architecture, nothing extra.

TypeScript and Python

Two implementations to study.

Build from zero

No magic; every piece explained.

Working result

You finish with a real coding agent.

Free and open

MIT licensed learning resource.

Advertisement
// run it

Run it yourself

  1. Step 1 — Clone the repo

    Download the source and move into the project folder.

    git clone https://github.com/Windy3f3f3f3f/claude-code-from-scratch.git
    cd claude-code-from-scratch
  2. Step 2 — Check the README

    Every project documents its own setup; start with install requirements.

    cat README.md | head -60
  3. Step 3 — Run it

    Follow the project’s launch command — Docker, pip, npm, or a binary release.

    # see README for the exact launch command
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains it?

It is an open project at Windy3f3f3f3f/claude-code-from-scratch with 547 forks.

Is it free?

Yes. MIT licensed.

Do I need an API key for the agent I build?

Yes. The finished agent still calls a real model API.

How long does it take?

Eleven chapters; pace yourself over days or weeks.

Is the original Claude Code open source?

Parts are; this project exists because the full source is too large to study.

// keep exploring

Similar tools

AI Agents

superpowers

An agentic skills framework & software development methodology that works.

★ 294.9k starsMIT
View guide →
AI Agents

Openai Agents Python

A lightweight, powerful framework for multi-agent workflows

★ 29.8k starsMIT
View guide →
AI Agents

CoreCoder

Self-hosted ai agents: minimal ai coding agent (~1,000 lines of python) inspir.

★ 1.8k starsMIT
View guide →
AI Agents

openclaude

A Claude Code-style coding agent that runs anywhere and works with almost any model provider

★ 33.7k starsMIT
View guide →
Agents

nanocoder

Community-built terminal coding agent: bring your own model, keep code local.

★ 2.5k starsCustom
View guide →
AI Agents

holaOS

Local-first agentic workspace where Claude Code, Codex and a built-in agent share memory, apps and tools.

★ 11.5k starsModified Apache-2.0
View guide →
// alternatives

Alternatives in Agents

The most-starred other Agents projects in the LibreAI catalogue — the realistic shortlist if claude-code-from-scratch is not the right fit.

Get claude-code-from-scratch

Free and open — grab the source, star the repo, and start creating.