Lightweight coding agent written in Rust, optimized for memory footprint and performance
Lightweight coding agent written in Rust, optimized for memory footprint and performance
Minimal coding agent written in Rust, inspired by pi and opencode.
blogposts: what we built in 2 weeks memory design subagents design xavier's memory analysis
note: Want to support? Consider donating here; if you are a company interested in sponsoring zerostack, contact me here.
code, plan, review, debug, etc.) to tailor the agent's behavior to the task without having to manage Skills./worktree to move the agent from one worktree to another.settings.json schema largely compatible with Claude Code hooksNOTE: Windows support is not tested is any way, but feel free to try and open an issue if you encounter any bugs!
zerostack is one of the smallest and most performant coding agents on the market.
You can now read a complete Get Started guide for zerostack here!
curl -fsSL https://raw.githubusercontent.com/gi-dellav/zerostack/main/install.sh | bashOr pick a tarball manually from GitHub Releases.
# Default: loop, git-worktree, mcp, subagents, archmd, status-signals, multithread
cargo install zerostack
# With all features
cargo install zerostack --all-features
# With specific features
cargo install zerostack --features acp,memory,hooks,advisorbrew tap gi-dellav/tap
brew trust gi-dellav/tap # required for Homebrew 6.0.0+
brew install zerostack
# brew install multistack # Run this to also install multistack (parallel agent manager)Run directly with nix-run:
$ nix-run https://github.com/gi-dellav/zerostack/archive/refs/heads/main.tar.gzAdd to profile:
$ nix profile add --file https://github.com/gi-dellav/zerostack/archive/refs/heads/main.tar.gzAdd as an overlay to your system/project:
let
pkgs = import nixpkgs {
overlays = [
# src thru input pinning mechanism, or use builtins.fetchTarball
(import "${zerostack-src}/nix/overlay")
];
};
in
pkgs.zerostackOnce installed, run /prompt autoconfig inside zerostack to explore the documentation and configure the tool interactively.
note: If you have questions or you want to collaborate on the project, please join the dedicated Matrix chatroom.
If you want to orchestrate multiple zerostack agents from the terminal, also install multistack.
Install bubblewrap for --sandbox,
which runs every bash command inside an isolated environment to contain the
damage a mistaken command can do to your system (a seatbelt, not a boundary
against untrusted code):
# Debian/Ubuntu
apt install bubblewrap
# Fedora
dnf install bubblewrap
# Arch
pacman -S bubblewrapThere is also support for zerobox as an
alternative sandbox backend. bubblewrap is Linux only, so on macOS install
zerobox (cargo install zerobox) and set sandbox-backend = "zerobox".
--sandbox is best effort: when the selected backend binary is missing, bash
commands still run, but unsandboxed, with a warning in the logs. Add
--sandbox-required (or sandbox-required = true in the config) to turn that
into a guarantee: bash commands are refused whenever the backend is unavailable,
and the rest of the session keeps working. See SECURITY.md for
what the sandbox does and does not protect against.
With the bwrap backend, well-known credential directories (~/.ssh,
~/.aws, ~/.gnupg, ~/.kube, ~/.docker, and the gh, gcloud, op and
sops/age directories under the config base) are masked by default, so
sandboxed commands read them as empty rather than as your keys and tokens,
and the advertised ssh-agent is unreachable. sandbox-expose (config key or
repeatable --sandbox-expose <path> flag) restores read-only access to one
entry or a subpath of one. See docs/CONFIG.md for the key
and SECURITY.md for the full threat model.
Sandboxed commands keep the host network by default. sandbox-network = false
(or --sandbox-network=false) takes it away, which is what stops a command
that read something sensitive from sending it anywhere. Each bash call then
gets a fresh network namespace with only its own private loopback: a server the
command starts and uses within that same command still works, but the internet,
the LAN, and anything already listening on your machine (a dev server, a local
registry) are unreachable, and the namespace itself is gone by the next bash
call, taking anything bound to it (like a backgrounded server) with it; the
working directory, by contrast, is shared with the host and persists across
calls. That tradeoff is why the network stays open unless you ask.
# Set your API key (OpenRouter is default)
export OPENROUTER_API_KEY="[api_key]"
# Interactive session (default prompt: code)
zerostack
# Monochrome TUI
zerostack --no-color
# One-shot mode
zerostack -p "Explain this project"
# Continue last session
zerostack -c
# Explicit provider/model
zerostack --provider openrouter --model deepseek/deepseek-v4-flashSee docs/CONFIG.md for config file location, accepted keys, provider aliases, permission rules, and MCP server configuration.
You can run /prompt autoconfig in order to use a specialized agent that allows to navigate the documentation and customize your zerostack setup.
zerostack includes a set of built-in system prompts that change the agent's behavior and tone.
The idea is to build a complete suite of prompts that can fully substitute skills like superpower or the Claude's official skills.
You can switch between different prompts or list all registered prompts using /prompt.
Built-in prompts:
| Prompt | Description |
|---|---|
code (default) |
Coding mode with full file and bash tool access, TDD workflow |
plan |
Planning-only mode — explores and produces a plan without writing code |
review |
Code review mode — reviews for correctness, design, testing, and impact |
debug |
Debug mode — finds root cause before proposing fixes |
ask |
Read-only mode — only read/grep/find_files permitted, no writes or bash |
brainstorm |
Design-only mode — explores ideas and presents designs without code |
frontend-design |
Frontend design mode — distinctive, production-grade UI |
review-security |
Security review mode — finds exploitable vulnerabilities |
simplify |
Code simplification mode — refines for clarity without changing behavior |
write-prompt |
Prompt writing mode — creates and optimizes agent prompts |
refactor |
Refactoring mode — restructures code for design and maintainability while preserving behavior |
autoconfig |
Configuration mode — reads docs and edits your config/prompts, writes no code |
orchestrator |
Orchestration mode — combines direct tool use with parallel zerostack subprocess invocations for heavier work |
write-text |
Technical-writing mode — drafts and reviews unambiguous text in Simplified Technical English |
You can also create custom prompts by placing markdown files in
$XDG_CONFIG_HOME/zerostack/prompts/ and referencing them by name.
Additionally, the agent automatically loads AGENTS.md or CLAUDE.md from the
project root or any ancestor directory, injecting their contents into the
system prompt. When enabled (feature archmd), ARCHITECTURE.md is also loaded
the same way, providing high-level design context to speed up exploration.
Use -n / --no-context-files to disable all context file loading.
When brainstorm, plan, or code finishes, zerostack can offer to advance
to the next phase (brainstorm → plan → code → /review), asking
`Continue to plan? [Y/N/B
No open issues yet, or sync has not completed.