Build your own grep
Read stdin, filter by pattern and honour exit codes. The gateway to Unix tooling.
Go · Python · Zig
Learn the core foundations of AI coding assistants from scratch: model basics, API key security, why use OpenRouter as a universal model router, tool schemas, and the autonomous ReAct loop.
Build it in your language
The tester treats your program as a black box: any language works. These are just the most convenient ones for this project.
Tools like Claude Code, Codex, Pi, and OpenCode are reshaping software engineering. For junior developers and beginners, they might feel like magic black boxes. In reality, their architecture rests on clean, approachable software principles: communicating with model APIs through a universal router like OpenRouter, defining tools with JSON schemas, and safely inspecting and editing code within an iterative loop.
In this project, you will build a coding agent runtime from the absolute fundamentals. You will understand what an API key is and how to protect it with environment variables, why model routers prevent vendor lock-in, how to structure tools with line context and surgical patching, and how to orchestrate the autonomous Reason-Act (ReAct) loop.
7 stages across 3 phases. Every stage comes with its guide and its tests: you move on when they pass.
Understand language models, API key authentication, why to use OpenRouter as a universal model router, and how to declare standard tool schemas.
Implement the tools the agent uses to inspect and modify code: line-numbered reading, file creation, and surgical patching.
Unify tools in a dispatcher that isolates recoverable errors and orchestrate the autonomous ReAct reasoning and acting loop.
Read stdin, filter by pattern and honour exit codes. The gateway to Unix tooling.
Go · Python · Zig
Blobs, trees and commits. Discover that Git is a content-addressed object store, and little else.
Go · Python · Rust