[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75908":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},75908,"zerostack","gi-dellav\u002Fzerostack","gi-dellav","Minimal coding agent written in Rust, optimized for memory footprint and performance","",null,"Rust",1239,86,3,1,0,5,142,567,31,93.82,"GNU General Public License v3.0",false,"main",true,[],"2026-06-12 04:01:19","# zerostack\n\nMinimal coding agent written in Rust, inspired by [pi](https:\u002F\u002Fpi.dev\u002Fdocs\u002Flatest\u002Fusage) and [opencode](https:\u002F\u002Fopencode.ai\u002F).\n\n## Features\n\n- **Multi-provider**: OpenRouter, OpenAI, Anthropic, Gemini, Ollama, plus custom providers\n- **Standard tools**: all of the standard tools exposed to coding agents, as described by the opencode documentation.\n- **Permission system**: four configurable modes with per-tool patterns, session allowlists, and external directory policies\n- **Session management**: save\u002Fload\u002Fresume sessions, auto-compaction to stay within context windows\n- **Terminal UI**: crossterm-based, markdown rendering, mouse selection\u002Fcopy, scrollback, reasoning visibility toggle\n- **Prompts system**: switch between system prompt modes at runtime (`code`, `plan`, `review`, `debug`, etc.) to tailor the agent's behavior to the task without having to manage Skills.\n- **MCP support**: connect MCP servers for extended tooling (exposed as an optional compile-time feature)\n- **Integrated Exa search**: allows for WebFetch and WebSearch tools\n- **Integrated Ralph Wiggum loops**: looping capabilities for long-horizon tasks\n- **Integrated Git Worktrees integration**: Use `\u002Fworktree` to move the agent from one worktree to another.\n- **ACP support** (gated): Agent Communication Protocol server — lets editors (Zed, etc.) connect to zerostack as an ACP agent\n\n**NOTE**: Windows support is not tested is any way, but feel free to try and open an issue if you encounter any bugs!\n\n## Performance\n\n_zerostack_ is one of the smallest and most performant coding agents on the market.\n\n- Lines of code: ~9k LoC\n- Binary size: 8.9MB\n- RAM footprint: ~10MB on an empty session, ~13MB when working (vs ~300MB for opencode or other JS-based coding agents)\n- CPU usage: 0.0% on idle, ~1.5% when using tools (measured on an Intel i5 7th gen, vs ~2% on idle and ~20% when working for opencode)\n\n## Installation\n\nIn order to install _zerostack_, you must have Cargo and git installed. Then, run:\n\n```bash\n# Default — MCP, loop, and git-worktree included\ncargo install zerostack\n\n# With ACP (Agent Communication Protocol) support for editor integration\ncargo install zerostack --features acp\n```\n\nYou are now ready to work with a lightweight coding agent! (Note: you can also find pre-built binaries on Github Releases)\n\n### Optional: sandbox mode\n\nInstall [bubblewrap](https:\u002F\u002Fgithub.com\u002Fcontainers\u002Fbubblewrap) for `--sandbox`,\nwhich runs every bash command inside an isolated environment to protect your\nsystem from accidental or malicious damage:\n\n```bash\n# Debian\u002FUbuntu\napt install bubblewrap\n\n# Fedora\ndnf install bubblewrap\n\n# Arch\npacman -S bubblewrap\n```\n\n## Quick start\n\n```bash\n# Set your API key (OpenRouter is default)\nexport OPENROUTER_API_KEY=\"[api_key]\"\n\n# Interactive session (default prompt: code)\nzerostack\n\n# Monochrome TUI\nzerostack --no-color\n\n# One-shot mode\nzerostack -p \"Explain this project\"\n\n# Continue last session\nzerostack -c\n\n# Explicit provider\u002Fmodel\nzerostack --provider openrouter --model deepseek\u002Fdeepseek-v4-flash\n```\n\n## Configuration\n\nSee [CONFIG.md](CONFIG.md) for config file location, accepted keys, provider\naliases, permission rules, and MCP server configuration.\n\n## Prompts system\n\n_zerostack_ includes a set of built-in system prompts that change the agent's behavior and tone.  \nThe idea is to build a complete suite of prompts that can fully substitute skills like [superpower](https:\u002F\u002Fgithub.com\u002Fobra\u002Fsuperpowers) or the [Claude's official skills](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-plugins-official\u002Ftree\u002Fmain).  \nYou can switch between different prompts or list all registered prompts using `\u002Fprompt`.\n\nBuilt-in prompts:\n\n| Prompt                | Description                                                              |\n| --------------------- | ------------------------------------------------------------------------ |\n| **`code`** (default)  | Coding mode with full file and bash tool access, TDD workflow            |\n| **`plan`**            | Planning-only mode — explores and produces a plan without writing code   |\n| **`review`**          | Code review mode — reviews for correctness, design, testing, and impact  |\n| **`debug`**           | Debug mode — finds root cause before proposing fixes                     |\n| **`ask`**             | Read-only mode — only read\u002Fgrep\u002Fglob permitted, no writes or bash        |\n| **`brainstorm`**      | Design-only mode — explores ideas and presents designs without code      |\n| **`frontend-design`** | Frontend design mode — distinctive, production-grade UI                  |\n| **`review-security`** | Security review mode — finds exploitable vulnerabilities                 |\n| **`simplify`**        | Code simplification mode — refines for clarity without changing behavior |\n| **`write-prompt`**    | Prompt writing mode — creates and optimizes agent prompts                |\n\nYou can also create custom prompts by placing markdown files in\n`$XDG_CONFIG_HOME\u002Fzerostack\u002Fprompts\u002F` and referencing them by name.\n\nAdditionally, the agent automatically loads `AGENTS.md` or `CLAUDE.md` from the\nproject root or any ancestor directory, injecting their contents into the\nsystem prompt. Use `-n` \u002F `--no-context-files` to disable this.\n\n## Permission system\n\nzerostack has four permission modes, from safest to most permissive:\n\n1. **restrictive** (`-R`): every tool action prompts for approval unless\n   explicitly allowed in config\n2. **standard** (default): safe commands (ls, cd, git log, cargo check) are\n   auto-approved; writes and destructive operations ask\n3. **accept-all** (`--accept-all`): auto-approves all operations inside the\n   working directory; external paths prompt for confirmation\n4. **yolo** (`--yolo`): auto-approves everything without prompting\n\nPermissions can be configured per-tool with granular glob patterns in the\nconfig file. For example, you can allow `write **.rs` automatically while\nalways asking before writing to other files.\n\nA **session allowlist** persists approved decisions for the duration of the\nsession, so you don't have to repeatedly confirm the same operation.\n\n**Doom-loop detection**: identical tool calls repeated 3+ times trigger a\nwarning prompt (or denial depending on your config), preventing runaway agents\nfrom spamming destructive operations.\n\n## Slash commands\n\nThis is a list of the most important slash commands:\n\n- `\u002Fmodel` — Switch model\n- `\u002Fthinking` — Set thinking level\n- `\u002Fclear` — Clear conversation\n- `\u002Fsession` — List\u002Fsave\u002Fload sessions\n- `\u002Floop` — Schedule recurring prompts\n- `\u002Fprompt` — List or change the agent's prompt\n- `\u002Fmode` — Set the permission system's mode\n\nTo see all of the commands, use `\u002Fhelp`.\n\n## Session management\n\nSessions are saved to `$XDG_DATA_HOME\u002Fzerostack\u002Fsessions\u002F`. Use `-c` to\nresume the most recent session, `-r` to browse and select one, or\n`--session \u003Cid>` to load a specific session.\n\n## Loop system\n\n_zerostack_ includes an iterative coding loop for long-horizon tasks. The agent repeatedly reads the task, picks an item from the plan, works on it, runs tests, updates the plan, and loops until the task is complete or the iteration limit is reached.\n\n**NOTE** The loop system is an _experimental_ feature.\n\n### Loop usage\n\n```\n\u002Floop Implement the user authentication system\n\u002Floop stop\n\u002Floop status\n```\n\n- `\u002Floop \u003Cprompt>` — Start a loop with the given prompt\n- `\u002Floop stop` — Stop the active loop\n- `\u002Floop status` — Show current loop state\n\nEach iteration includes the original task, the evolving `LOOP_PLAN.md`, a summary of the previous iteration, and any validation output. Non-slash input is blocked while a loop is active.\n\n### Headless loops via CLI\n\n```\nzerostack --loop --loop-prompt \"Refactor the API\" --loop-max 10 --loop-run \"cargo test\"\n```\n\n| Flag                   | Description                                     |\n| ---------------------- | ----------------------------------------------- |\n| `--loop`               | Enable headless loop mode                       |\n| `--loop-prompt \u003Ctext>` | Prompt for each iteration                       |\n| `--loop-plan \u003Cpath>`   | Custom plan file path (default: `LOOP_PLAN.md`) |\n| `--loop-max \u003CN>`       | Maximum iterations (default: unlimited)         |\n| `--loop-run \u003Ccmd>`     | Validation command to run after each iteration  |\n\n## Git worktrees integration\n\n_zerostack_ provides a branch-per-task workflow using git worktrees. You can create, work in, merge, and exit worktrees entirely from the chat UI.\n\n**NOTE** The git worktrees integration is an _experimental_ feature.\n\n### Git worktree usage\n\nThe worktrees integrations offers 3 slash commands:\n\n| Command              | Description                                                                                                       |\n| -------------------- | ----------------------------------------------------------------------------------------------------------------- |\n| `\u002Fworktree \u003Cname>`   | Create a git worktree on branch `\u003Cname>` and move into it (skips creating it if it already exists)                |\n| `\u002Fwt-merge [branch]` | Merge the worktree branch into `[branch]` (default: `main`\u002F`master`), push, clean up, and return to the main repo |\n| `\u002Fwt-exit`           | Return to the main repo without merging                                                                           |\n\n### Example workflow for git worktrees\n\n1. **Create** — `\u002Fworktree feature-x` creates a new branch and worktree directory and moves you there.\n2. **Work** — Use zerostack normally; changes stay on the feature branch.\n3. **Merge** — `\u002Fwt-merge` tells the agent to merge the branch, push, clean up, and return to the main repo.\n4. **Exit** — `\u002Fwt-exit` immediately returns to the main repo without merging.\n\n## ACP (Agent Communication Protocol) support\n\n**ACP** is a JSON-RPC based protocol that standardizes communication between code editors\n(IDEs, text-editors, etc.) and coding agents. With the `acp` feature enabled, zerostack\nacts as an ACP **Agent** server, allowing editors like **Zed** to connect to it as a\ncoding agent backend.\n\n**NOTE:** ACP support is gated behind the `acp` feature and is not included in the\ndefault build.\n\n### ACP usage\n\n```bash\n# Start zerostack in ACP stdio mode (editor spawns this as a subprocess)\nzerostack --acp\n\n# Start zerostack in ACP TCP mode (listen on 0.0.0.0:7243)\nzerostack --acp --acp-host 0.0.0.0 --acp-port 7243\n```\n\n### ACP config\n\nIn `$XDG_CONFIG_HOME\u002Fzerostack\u002Fconfig.json`:\n\n```json\n{\n  \"acp_servers\": {\n    \"my-editor\": {\n      \"host\": \"127.0.0.1\",\n      \"port\": 7243\n    }\n  }\n}\n```\n\nACP mode requires setting up an LLM provider (the standard `--provider`, `--model`,\nand API key env vars apply). Without it, zerostack cannot process prompts.\n\n## Supported providers\n\n- OpenRouter (default)\n- OpenAI-compatible (vLLM, LiteLLM, etc.)\n- Anthropic\n- Gemini\n- Ollama\n\nCustom providers can be configured with any base URL and API key environment\nvariable in  `$XDG_CONFIG_HOME\u002Fzerostack\u002Fconfig.json`.\n\n## License\n\nGPL-3.0-only\n","zerostack 是一个用 Rust 编写的极简编码代理，旨在优化内存占用和性能。其核心功能包括多提供商支持（如 OpenRouter、OpenAI 等）、标准工具集、权限系统、会话管理和基于 crossterm 的终端 UI。此外，它还支持 MCP 服务器连接、集成 Exa 搜索、循环执行长任务的能力以及 Git Worktrees 集成。相比其他 JS 基础的编码代理，zerostack 在空会话时仅占用约 10MB 内存，在工作状态下也只消耗约 13MB，CPU 使用率在闲置时几乎为零，使用工具时约为 1.5%。适合对资源敏感且需要高效执行编码辅助任务的开发者或团队使用。",2,"2026-06-11 03:53:41","CREATED_QUERY"]