AI/TLDR

Zerostack

A terminal coding agent in Rust with a tiny memory footprint

Autonomous Coding AgentsOpen source
Latest
1.0
Updated
16 May 2026
Language
Rust
License
GPL-3.0
Coverage
1 story

What's new

1.016 May 2026

Zerostack shipped 1.0: a Rust terminal coding agent running in roughly 8 to 12 MB of RAM, with OpenRouter, OpenAI, Anthropic, Gemini and Ollama support, git-worktree workflows, MCP and runtime prompt modes.

Latest news

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.

bashbash
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 zerostack

Set 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.

bashbash
zerostack                    # interactive session
zerostack -p "Prompt text"   # one-shot mode
zerostack -c                 # resume last session

Pick a provider and model per run

Both are command-line flags, so switching backends does not need a config edit.

bashbash
zerostack --provider openrouter --model deepseek/deepseek-v4-flash

Commands 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.

ToolStarsWhat it does
opencode★ 206kOpenCode 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★ 145kAnthropic'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★ 123kOpenAI's cloud and CLI coding agent that writes features, fixes bugs, and proposes code changes across a repo, running tasks in parallel.
Gemini CLI★ 107kAn 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★ 103kMinimal terminal coding agent harness with four built-in tools, extended through TypeScript extensions, skills and prompt templates instead of forks.
OpenHands★ 87kAn 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.7kOpen-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.7kA terminal coding agent in Rust with a tiny memory footprint