Windy3f3f3f3f

Build your own coding agent from scratch in ~1300 lines of TypeScript. / 从零构建你自己的 Claude Code,~1300 行代码,分步教程

27
8
100% credibility
Found Mar 31, 2026 at 27 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

A step-by-step tutorial and minimal TypeScript implementation recreating the core capabilities of Claude Code, a coding agent with tools for file operations, shell execution, and interactive CLI sessions.

How It Works

1
🕵️ Discover the mini coding helper

You find this project on GitHub, a simple guide to create your own smart coding assistant that helps with files and tasks.

2
📥 Get it on your computer

You download the files and follow easy steps to prepare it on your machine so everything is ready to go.

3
🧠 Connect the smart brain

You link it to an AI service, like giving it a thinking partner to understand and act on your requests.

4
🚀 Launch the chat

You start the interactive chat window where you can talk to your assistant right away.

5
💬 Give coding tasks

You describe what you need, like 'fix this bug' or 'add a feature', and watch it read files, make changes, and even run checks.

6
💾 Save your progress

It automatically saves your conversation so you can pause, come back later, and pick up right where you left off.

🎉 Coding magic achieved

Your project is now better—bugs fixed, features added—and you feel empowered with your personal coding sidekick.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 27 to 27 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is claude-code-from-scratch?

This TypeScript project is a step-by-step tutorial to build your own AI coding agent from scratch, recreating Claude Code's essentials in ~1300 lines. You end up with a CLI REPL that handles file reads/writes/edits, glob searches, grep, and shell commands via Anthropic or OpenAI APIs, looping until tasks complete with streaming output. It solves the black-box problem of proprietary agents by letting you build own ai agent or claude code app from scratch.

Why is it gaining traction?

Its hook is the 8-chapter online guide contrasting your minimal code against Claude Code's real source, demystifying agent loops, tools, prompts, and safety. Dual API support (Anthropic preferred, OpenAI compatible), session resume via `npm start --resume`, and `--yolo` for skipping confirmations make it instantly usable for prototyping build github copilot agent or own ai. Token tracking, auto-compaction, and REPL commands like `/cost` or `/compact` deliver pro features without setup hassle.

Who should use this?

TypeScript devs experimenting with agents for build github actions, build github app, or build github repository automation. AI tinkerers wanting to build own rag or llm tools before vendor lock-in, or instructors teaching coding agents. Suited for solo hackers customizing for build github portfolio or pages in their workflow.

Verdict

Solid educational starter at 27 stars and 1.0% credibility—polished docs and tutorial outweigh maturity gaps like no tests. Fork it to build own ai or steam machine equivalent, but add safeguards for real projects.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.