ivan-magda/swift-claude-code

166 stars · Last commit 2026-05-11

A Swift reimplementation of a Claude Code-style coding agent, built stage by stage to explore what makes coding agents work

README preview

# swift-claude-code

Exploring the architecture of coding agents by rebuilding a Claude Code-style CLI from scratch in Swift.

![demo](demo.gif)

## Learning Series

A complete 9-part learning series is available on [ivanmagda.dev](https://ivanmagda.dev).

[Start the series →](https://ivanmagda.dev/posts/s00-bootstrapping-the-project)

## Why This Exists

Claude Code feels unusually effective compared to other coding agents, and I suspect most of it comes from architectural restraint rather than architectural complexity. I studied the tool surface, traced the interaction loop, and tried to isolate which design choices actually matter.

My working theory: **coding agents benefit more from a small set of excellent tools and tight loop design than from large orchestration layers.**

Claude Code doesn't have many tools. The tools it does have are simple: a search tool, a file editing tool. But those tools are really good. And the system leans on the model far more than most agent implementations — less scaffolding, more trust in the LLM to do the heavy lifting.

View full repository on GitHub →