augur is a tiny Claude-style assistant client written in Zig. It talks to
OpenRouter, supports tool calling, and ships with a simple REPL.
This project started as the CodeCrafters course "Build your own Claude Code."
- Zig 0.15+
- An OpenRouter API key (
OPENROUTER_API_KEY)
zig buildbash -lc 'set -euo pipefail; INSTALL_DIR="${AUGUR_INSTALL_DIR:-$HOME/.local/bin}"; mkdir -p "$INSTALL_DIR"; zig build >/dev/null 2>&1 || { echo "Build failed"; exit 1; }; BIN_PATH="zig-out/bin/augur"; if [ ! -f "$BIN_PATH" ]; then echo "Binary not found at $BIN_PATH"; exit 1; fi; cp -f "$BIN_PATH" "$INSTALL_DIR/augur" && echo "augur installed to $INSTALL_DIR/augur"; case ":$PATH:" in *":$INSTALL_DIR:"*) ;; *) echo "Add to PATH: export PATH=\"$INSTALL_DIR:\$PATH\"";; esac'# streams by default
OPENROUTER_API_KEY=... zig build run -- -p "Say hello"
# queue multiple prompts in order
OPENROUTER_API_KEY=... zig build run -- -p "step 1" -p "step 2"OPENROUTER_API_KEY=... zig build runType /quit to leave the REPL.
The REPL uses ANSI colors when stdout is a TTY and starts in plan mode.
Conversations are persisted to ./augur/conversations.json and switching
conversations restores their message history into the active context buffer.
Inside the REPL:
/planswitches to plan mode (high-level steps, no code)./buildswitches to build mode (implementation + code)./pairswitches to pair mode (direction-first pair programming + code)./modelshows the current OpenRouter model./model <id>changes the OpenRouter model./new [name]creates and switches to a new conversation./switch <name>switches to a saved conversation (loads its history into context)./convoslists all conversations./initinspects the project and generates anAGENTS.md./quitexits the REPL./helpshows the command list.
Augur now detects repository skill guidance and appends it to the system prompt:
SKILLS.mdSKILLS/*/SKILL.md.skills/*/SKILL.md
When skills are present, the assistant is instructed to read relevant SKILL.md files before implementation.
OPENROUTER_API_KEY(required)OPENROUTER_BASE_URL(optional, defaults tohttps://openrouter.ai/api/v1)
The assistant can call these tools:
read: Read a file from disk.write: Write a file to disk.bash: Run a shell command and return stdout/stderr.
- Streamed responses (default)
- Model choice
- Plan, Build, and Pair modes
- Conversation persistence + switching
- SKILLS discovery (
SKILLS.md,SKILLS/*/SKILL.md,.skills/*/SKILL.md) - Streaming wait indicator before first token
- Per-response token usage + context-window %
- Context-bound tool loop (continues while context remains)
- Scoped AGENTS.md loading by directory tree
- Web search tool
- Subagents
