Open source · Rust · 9 crates
Rune Code is a CLI agent runtime where humans set direction and claws execute. Streaming API, native tools, session persistence, sub-agent orchestration — all in ~20K lines of Rust.
Everything needed for autonomous coding agent workflows, from API streaming to sub-agent orchestration.
SSE streaming against the Messages API. Real-time token delivery, backpressure handling, extended thinking blocks, and cost tracking per session. Supports API keys and OAuth.
Rustyline-powered REPL with tab completion, slash commands, model aliases, session resume, and markdown rendering in the terminal.
Every conversation is persisted to disk. Resume sessions exactly where you left off, with full history and context.
Bash, ReadFile, WriteFile, EditFile, GlobSearch, GrepSearch, WebSearch, WebFetch, Agent (sub-agent spawning), and more. Each tool is permission-aware with three enforcement modes: read-only, workspace-write, and full-access.
Spawn child agents for parallel work. Structured handoffs, disagreement resolution, and verification loops between agents.
Full Model Context Protocol support. Config validation, startup healthcheck, degraded-mode reporting, structured failure classification.
Global → project-local config hierarchy with deep-merge, validation, and hook support. Includes PreToolUse and PostToolUse hooks.
Native diff rendering, branch detection, worktree support, and stale-branch detection baked into the runtime.
Nine focused crates. Each with one job.
rusty-claude-cli
binary
Main entry point. REPL, one-shot prompt, streaming display, argument parsing.
api
lib
HTTP client, SSE stream parser, request/response types, auth.
runtime
lib
Conversation loop, config loader, session store, permission policy, MCP client, system prompt assembly.
tools
lib
Bash, ReadFile, WriteFile, EditFile, GlobSearch, GrepSearch, WebSearch, WebFetch, Agent.
commands
lib
Slash command definitions and help text for the REPL.
plugins
lib
Plugin metadata, registries, and hook surfaces.
telemetry
lib
Session trace events and telemetry payloads.
compat-harness
test
Extracts upstream TypeScript manifests for parity verification.
mock-anthropic-service
test
Deterministic local mock for CLI parity tests.
"Humans set direction. Claws coordinate, build, test, recover, and push. The repository is the artifact. The system behind it is the product."
Rune Code is not just a tool for humans — it's an execution runtime designed to be driven by autonomous agents. The project was built in public, coordinated by claws, and continuously improved through structured planning, execution, and review loops. The bottleneck is no longer typing speed. When agent systems can rebuild a codebase in hours, the scarce resource becomes architectural clarity, task decomposition, and conviction about what is worth building.
Or one-shot: rune prompt "explain this codebase"