Overview
Zerostack is a minimal coding agent written in Rust, described by its author as inspired by pi and opencode. It gives you the usual agent loop — read files, write files, run shell commands, search — inside a crossterm-based terminal UI with Markdown rendering, mouse selection and copy, and scrollback, and it is built to stay small: roughly 30,000 lines of core code, a 26MB binary, about 16MB of RAM in normal use and 0.0% CPU while idle.
Control over what the agent may do is explicit. Five permission modes — restrictive, readonly, guarded, standard and yolo — set the baseline, with granular overrides on top, and an optional sandbox isolates execution through bubblewrap on Linux or zerobox on macOS. For parallel work it supports a branch-per-task flow using git worktrees, and sessions can be saved, loaded and resumed with automatic compaction so a long task survives a restart.
It is provider-agnostic: OpenRouter, OpenAI, Anthropic, Gemini, Ollama and any custom OpenAI-compatible endpoint, selected per run from the command line. Prompt modes such as code, plan, review and debug can be switched at runtime, a Markdown memory system persists notes across sessions, and MCP and ACP support let you extend the tool set.
What it does
- Small by design: ~30,000 lines of core code, a 26MB binary, ~16MB average RAM and 0.0% CPU at idle
- Five permission modes — restrictive, readonly, guarded, standard, yolo — with granular control
- Optional sandboxing via bubblewrap (Linux) or zerobox (macOS)
- Git-worktree branch-per-task workflow for parallel work
- Sessions save, load and resume with auto-compaction
- Runtime-switchable prompt modes: code, plan, review, debug
- MCP and ACP support for extra tooling, plus a persistent Markdown memory system
- Providers: OpenRouter, OpenAI, Anthropic, Gemini, Ollama and custom OpenAI-compatible endpoints
Getting started
Install the binary through the install script, cargo, Homebrew or Nix, then set the API key for whichever provider you want to use.
Install Zerostack
The install script is the documented recommendation; cargo, Homebrew and Nix are all supported.
curl -fsSL https://raw.githubusercontent.com/gi-dellav/zerostack/main/install.sh | bash
# or
cargo install zerostack
cargo install zerostack --all-features
# or
brew tap gi-dellav/tap
brew install zerostackSet a provider key
Export the API key for your chosen provider as an environment variable. Ollama needs no key.
Start a session
Run it interactively, or pass a one-shot prompt. `-c` resumes your last session.
zerostack # interactive session
zerostack -p "Prompt text" # one-shot mode
zerostack -c # resume last sessionPick a provider and model per run
Both are command-line flags, so switching backends does not need a config edit.
zerostack --provider openrouter --model deepseek/deepseek-v4-flashCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Run a coding agent on a small or resource-constrained machine where an Electron or Node-based agent is too heavy
- Keep tight control over what an agent may touch, using readonly or guarded permissions plus a sandbox
- Work several tasks in parallel on one repository with git-worktree branch-per-task sessions
- Switch between hosted and fully local models — the same agent runs against OpenRouter or a local Ollama endpoint
How Zerostack compares
Zerostack alongside other open-source autonomous coding agents tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| opencode | ★ 206k | OpenCode is an open source AI coding agent that runs in your terminal, with built-in build and plan agents and an optional desktop app. |
| Claude Code | ★ 145k | Anthropic's agentic coding tool for the terminal, IDE and GitHub: it understands your codebase, executes routine tasks, explains code and handles git workflows from natural-language commands. |
| OpenAI Codex | ★ 123k | OpenAI's cloud and CLI coding agent that writes features, fixes bugs, and proposes code changes across a repo, running tasks in parallel. |
| Gemini CLI | ★ 107k | An open-source command-line AI agent from Google that connects your terminal to Gemini models for reading code, editing files, running shell commands, and searching the web. |
| Pi | ★ 103k | Minimal terminal coding agent harness with four built-in tools, extended through TypeScript extensions, skills and prompt templates instead of forks. |
| OpenHands | ★ 87k | An open-source AI software-development agent that plans tasks, edits files, runs commands, and tests code, usable from a terminal CLI, a local web GUI, or a Python SDK. |
| Cline | ★ 67.7k | Open-source coding agent that runs as a VS Code or JetBrains extension, a terminal CLI, or an embeddable Node SDK, editing code and running commands with human-in-the-loop approval. |
| Zerostack | ★ 1.7k | A terminal coding agent in Rust with a tiny memory footprint |