Dev & Engineering rustterminal-uimulti-providermcpgit-worktreessession-managementcoding-agent

zerostack

A lightweight Rust terminal coding agent for multi-provider, permission-controlled local development.

FollowAgents review · FARS-2.0
Not yet reviewed
See the full review method →

What does this agent do, and when should you use it?

zerostack is an interactive Rust coding agent for the terminal, described as inspired by pi and opencode. It accepts work through a terminal UI and uses standard coding-agent file and command tools under configurable permission controls. It supports OpenRouter, OpenAI, Anthropic, Gemini, Ollama, and custom providers, while preserving sessions and compacting them as context windows fill. The default build includes loops, Git worktrees, MCP, subagents, ARCHITECTURE.md support, and status signals; ACP, persistent memory, hooks, advisor, and multimodal input are feature-gated. It is aimed at developers who want a local CLI agent with multiple model-provider paths and a documented low-memory design.

Running zerostack opens a crossterm terminal UI where a user submits a task; the agent sends it to the selected LLM provider and invokes coding-agent tools such as file reads, writes, edits, directory operations, and bash according to its permission mode. /prompt switches between built-in prompts including code, plan, review, debug, and ask, while /mode changes the permission policy. /session manages saved sessions, -c resumes the latest one, and automatic compaction helps keep sessions inside context limits. /loop iterates on a task using LOOP_PLAN.md and an optional validation command, while /worktree, /wt-merge, and /wt-exit manage a Git worktree workflow. With applicable features enabled, it can connect MCP servers, run as an ACP Agent server through zerostack --acp, and accept image or PDF attachments.

  1. A solo developer with an OpenRouter API key who wants to inspect, edit, and validate a local codebase from a terminal.
  2. An engineer who needs to switch a coding workflow between OpenAI, Anthropic, Gemini, Ollama, OpenRouter, or a configured custom provider.
  3. A developer handling a long implementation task who wants resumable sessions, context compaction, and an iterative `/loop` workflow with tests.
  4. A programmer who wants to ask a read-only repository question through `/btw` without interrupting the main agent run.
  5. A Git user who wants a chat-driven branch-per-task workflow using worktree creation, merging, cleanup, and return to the main repository.
  6. A user of an ACP-capable editor, such as the documented Zed example, who wants zerostack to act as a local coding-agent backend.

What are this agent's strengths and limitations?

Pros
  • A Rust CLI with a crossterm terminal UI and a documented low-resource target; the project reports a roughly 26MB binary and about 16MB average RAM use.
  • Supports OpenRouter, OpenAI, Anthropic, Gemini, Ollama, and configurable custom providers instead of tying the workflow to one model service.
  • Five permission modes, per-tool glob patterns, session allowlists, and repeated-call detection provide several levels of control over local operations.
  • Combines session resumption, automatic compaction, iterative loops, subagents, and Git worktree operations in one terminal-oriented workflow.
  • MCP is in the default build, and the optional ACP feature exposes zerostack as an Agent server for compatible editors.
Limitations
  • Windows support is explicitly untested, so cross-platform adoption requires independent validation.
  • An LLM provider and its API key must be configured; ACP mode cannot process prompts without a provider setup.
  • ACP, persistent memory, hooks, advisor, image input, and PDF input are not in the default build and require feature selection at installation time.
  • The loop system and Git worktree integration are marked experimental; merge conflicts during automatic worktree merging may still require human intervention.
  • `--sandbox` is best effort: if its backend is missing, bash commands run unsandboxed with a warning unless `--sandbox-required` is enabled.

How do you install or deploy this agent?

Recommended installation: curl -fsSL https://raw.githubusercontent.com/gi-dellav/zerostack/main/install.sh | bash. Cargo installation is also documented: cargo install zerostack; its default feature set includes loop, git-worktree, mcp, subagents, archmd, status-signals, and multithread. For ACP, memory, hooks, or advisor, run cargo install zerostack --features acp,memory,hooks,advisor, or use cargo install zerostack --all-features. Before the first default-provider session, set export OPENROUTER_API_KEY="[api_key]".

How do you use this agent?

From a project directory, run zerostack for an interactive session or zerostack -p "Explain this project" for a one-shot request. Select a provider and model explicitly with zerostack --provider openrouter --model deepseek/deepseek-v4-flash, and resume the most recent session with zerostack -c. Use /prompt autoconfig to navigate the documentation and configure the installation interactively, and /help for the complete command list. For isolated bash commands, install bubblewrap and pass --sandbox; add --sandbox-required when bash commands must be refused if the sandbox backend is unavailable.

How does this agent compare with similar options?

zerostack is presented as inspired by pi and opencode, with a Rust-first lightweight positioning. Its README reports approximately 16MB average RAM and 24MB peaks, compared there with roughly 300MB average and 700MB peaks for opencode or other JavaScript-based coding agents; these are project-reported measurements.

FAQ

Which credential is needed for the default setup?
The default provider is OpenRouter, and the quick start uses `OPENROUTER_API_KEY`. OpenAI, Anthropic, Gemini, Ollama, and configured custom providers are also supported.
Can it edit files or run commands without asking?
That depends on the permission mode. Default `standard` auto-allows path tools inside the current directory and some safe bash commands; `restrictive` asks for every operation, while `readonly` denies writes, edits, and bash. `--dangerously-skip-permissions` bypasses all checks.
Does sandbox mode make untrusted code safe to run?
No. The documented sandbox is a measure to contain damage from mistaken commands, not a security boundary for untrusted code. Only `--sandbox-required` refuses bash commands when the sandbox backend is unavailable.
Can an editor connect to it?
Yes, when built with the `acp` feature. Use `zerostack --acp` for stdio or add `--acp-host` and `--acp-port` for TCP; Zed is the documented editor example.

Related agents