{"id":51476085,"url":"https://github.com/gitlawb/zero","last_synced_at":"2026-07-06T21:01:20.554Z","repository":{"id":368794678,"uuid":"1252432466","full_name":"Gitlawb/zero","owner":"Gitlawb","description":"The coding agent that answers to you, your model, your machine, your rules.","archived":false,"fork":false,"pushed_at":"2026-07-02T08:15:48.000Z","size":5543,"stargazers_count":53,"open_issues_count":4,"forks_count":8,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-02T09:18:28.470Z","etag":null,"topics":["ai","ai-agent","anthropic","cli","code-assistant","coding-agent","developer-tools","gemini","llm","mcp","ollama","openai","terminal"],"latest_commit_sha":null,"homepage":"https://zero.gitlawb.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gitlawb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.MD","dco":null,"cla":null}},"created_at":"2026-05-28T14:11:35.000Z","updated_at":"2026-07-02T09:17:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Gitlawb/zero","commit_stats":null,"previous_names":["gitlawb/zero"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Gitlawb/zero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gitlawb%2Fzero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gitlawb%2Fzero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gitlawb%2Fzero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gitlawb%2Fzero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gitlawb","download_url":"https://codeload.github.com/Gitlawb/zero/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gitlawb%2Fzero/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35205739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agent","anthropic","cli","code-assistant","coding-agent","developer-tools","gemini","llm","mcp","ollama","openai","terminal"],"created_at":"2026-07-06T21:01:19.542Z","updated_at":"2026-07-06T21:01:20.535Z","avatar_url":"https://github.com/Gitlawb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/zero-logo.png\" alt=\"Zero\" width=\"385\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cstrong\u003eA terminal coding agent you own.\u003c/strong\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg alt=\"license\" src=\"https://img.shields.io/badge/license-MIT-blue\"\u003e\u003c/a\u003e\n  \u003cimg alt=\"Go 1.25+\" src=\"https://img.shields.io/badge/Go-1.25+-00ADD8?logo=go\u0026logoColor=white\"\u003e\n  \u003cimg alt=\"25+ providers\" src=\"https://img.shields.io/badge/providers-25+-34E2EA\"\u003e\n  \u003cbr\u003e\n  \u003cstrong\u003eEnglish\u003c/strong\u003e | \u003ca href=\"README_ZH.md\"\u003e中文\u003c/a\u003e\n\u003c/p\u003e\n\nZero is an AI coding agent for your local terminal. It can inspect a repository,\nedit files, run commands, use browser/terminal helpers, and keep durable local\nsessions while you choose the model and the permission level.\n\n```bash\nzero\nzero exec \"fix the failing test in ./pkg\"\nzero exec --output-format stream-json \u003c turns.jsonl\n```\n\n## Why Zero\n\n- **Use the model you want.** Bring OpenAI, Anthropic, Gemini, Groq, OpenRouter,\n  DeepSeek, Mistral, xAI, Qwen, Kimi, GitHub Models, Ollama, LM Studio, or any\n  OpenAI-/Anthropic-compatible endpoint.\n- **Stay in control.** File writes, shell commands, network access, and\n  out-of-workspace writes go through Zero's permission and sandbox policy.\n- **Works in the terminal.** The TUI has model/provider pickers, image input,\n  slash commands, live plan/tool rendering, scrollback, themes, and resume/fork\n  support.\n- **Works without the TUI.** `zero exec` is scriptable, supports text/JSON/\n  stream-JSON I/O, isolated worktrees, spec-first runs, and meaningful exit\n  codes for CI.\n- **Keeps context local.** Sessions are stored on disk, searchable, resumable,\n  and never uploaded as telemetry by Zero.\n- **Extensible when you need it.** Use MCP servers, skills, plugins, hooks, and\n  specialist subagents from the same CLI.\n\n## Install\n\n### npm\n\n```bash\nnpm install -g @gitlawb/zero\nzero\n```\n\nThe npm package installs a small wrapper plus the matching Zero binary for your\nplatform from GitHub Releases. It supports Linux, macOS, and Windows on x64 and\narm64.\n\n### Bun\n\nBun does not run dependency lifecycle scripts by default, so the `postinstall`\nthat fetches the Zero binary is skipped and the first run fails with\n`No native binary found next to the npm wrapper`.\n\nThe simplest fix is to trust the package after installing, which runs the\nblocked postinstall. This works for project and global installs:\n\n```bash\n# project install\nbun add @gitlawb/zero\nbun pm trust @gitlawb/zero\n\n# global install\nbun add -g @gitlawb/zero\nbun pm -g trust @gitlawb/zero\n```\n\nAlternatives: allow the postinstall up front by adding\n`\"trustedDependencies\": [\"@gitlawb/zero\"]` to your project's package.json\nbefore `bun add`, or run the installer manually\n(`node node_modules/@gitlawb/zero/scripts/postinstall.mjs`) on Bun versions\nthat do not have `bun pm trust`.\n\n### Install scripts\n\nLinux/macOS:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Gitlawb/zero/main/scripts/install.sh | bash\n```\n\nWindows PowerShell:\n\n```powershell\nirm https://raw.githubusercontent.com/Gitlawb/zero/main/scripts/install.ps1 | iex\n```\n\n### From source\n\nSource builds require Go 1.25+.\n\n```bash\ngit clone https://github.com/Gitlawb/zero.git\ncd zero\ngo run ./cmd/zero\n```\n\nRelease installers and the npm wrapper require published GitHub Release assets.\nIf you are testing before the first public release, build from source:\n\n```bash\ngo build -o zero ./cmd/zero\n```\n\nOn Linux, build the sandbox helper too if you want native sandboxing:\n\n```bash\ngo build -o zero-linux-sandbox ./cmd/zero-linux-sandbox\ngo build -o zero-seccomp ./cmd/zero-seccomp   # optional compatibility wrapper\n```\n\nPut `zero` and `zero-linux-sandbox` in the same directory on `PATH`\n(`~/.local/bin` is a good default). macOS does not need an extra helper binary.\nWindows source builds can use the main `zero.exe` as their sandbox helper; release\narchives still ship standalone Windows helper executables.\n\nMore install details: [docs/INSTALL.md](docs/INSTALL.md).\n\n## First Run\n\nStart the TUI:\n\n```bash\nzero\n```\n\nThe setup wizard helps you pick a provider and model. You can also configure\nproviders from the command line:\n\n```bash\nzero setup\nzero providers list\nzero models list\nzero doctor\n```\n\nFor API providers, set the matching environment variable before setup or enter\nthe key in the wizard:\n\n```bash\nexport OPENAI_API_KEY=sk-...\nexport ANTHROPIC_API_KEY=...\nexport GEMINI_API_KEY=...\nexport LONGCAT_API_KEY=...\n```\n\nTo configure Meituan LongCat (LongCat-2.0) directly, run:\n\n```bash\nzero providers setup longcat --set-active\n```\n\nFor local models, run Ollama or LM Studio and then use `zero setup` or\n`zero providers detect`.\n\n## Daily Use\n\n### Interactive TUI\n\n```bash\nzero\n```\n\nUseful controls:\n\n| Control | Action |\n|---|---|\n| `Enter` | send the prompt |\n| `/` | open slash-command suggestions |\n| `Shift+Tab` | cycle permission mode |\n| `Ctrl+B` | show/hide the sidebar |\n| `Ctrl+C` | cancel or exit |\n\nCommon slash commands:\n\n| Command | Purpose |\n|---|---|\n| `/model`, `/provider` | switch the active model/provider |\n| `/spec`, `/plan` | draft and review a plan before building |\n| `/image` | attach an image for vision-capable models |\n| `/resume`, `/rewind` | continue or roll back local sessions |\n| `/loop` | repeat a prompt or custom `/command` on an interval (`/loop 5m /babysit-prs`) or self-paced |\n| `/compact`, `/context` | manage context usage |\n| `/permissions`, `/tools` | inspect available tools and policy |\n| `/add-dir` | allow an extra write directory for this session |\n| `/theme`, `/doctor`, `/config` | adjust appearance and inspect setup |\n\n### Headless `exec`\n\n```bash\nzero exec \"explain internal/agent/loop.go\"\nzero exec --model claude-sonnet-4.5 \"refactor the config loader\"\nzero exec --use-spec \"add rate limiting to the API client\"\nzero exec --worktree \"try the migration in an isolated worktree\"\nzero exec --resume\nzero exec --fork \u003csession-id\u003e \"try the other approach\"\n```\n\nProgrammatic use:\n\n```bash\nzero exec --input-format stream-json --output-format stream-json \u003c turns.jsonl\n```\n\nThe stream-JSON contract is documented in\n[docs/STREAM_JSON_PROTOCOL.md](docs/STREAM_JSON_PROTOCOL.md).\n\n## Safety Model\n\nZero is designed to make side effects visible.\n\n- Workspace reads are allowed by default.\n- File writes are limited to the workspace unless you grant another directory.\n- Shell commands, network access, destructive commands, and elevated actions are\n  permission-gated.\n- `--add-dir \u003cpath\u003e` and `/add-dir \u003cpath\u003e` grant additional write roots without\n  giving the agent the whole filesystem.\n- Unsafe/autonomous modes are explicit opt-ins.\n- Secrets are redacted from tool output and logs where Zero controls the surface.\n\nExample:\n\n```bash\nzero --add-dir ../docs-site\nzero exec --add-dir ../shared \"update both repos\"\n```\n\nSandbox behavior can be inspected with:\n\n```bash\nzero sandbox policy\nzero sandbox grants list\n```\n\n## Web And Local Control\n\nZero includes local file/search/edit/shell tools, `web_fetch` for public URLs,\nand MCP support for additional tools.\n\nFor local dev servers, use shell commands such as `curl` through `exec_command`\nso the normal sandbox and permission policy applies. Long-running commands stay\nattached to a background terminal session and can be listed or stopped from the\nTUI.\n\nThe npm package also includes browser and terminal helper packages used by local\nbrowser/terminal tools. Source builds can use the same helpers when they are on\n`PATH` or configured in Zero's local-control settings.\n\n## Common Commands\n\n```text\nzero                  interactive TUI\nzero exec             one-shot or scripted agent run\nzero setup            first-run provider setup\nzero auth             OAuth/login helpers for supported providers\nzero models           model registry and capabilities\nzero providers        provider profiles and detection\nzero doctor           setup, key, and connectivity checks\nzero context          context-budget report\nzero repo-map         deterministic repository map\nzero repo-info        local repository summary\nzero search | find    search local session history\nzero sessions         inspect, resume, fork, and rewind sessions\nzero spec             manage spec-mode drafts\nzero specialist       manage specialist subagents\nzero skills           manage markdown instruction skills\nzero plugins          manage plugins\nzero hooks            manage lifecycle hooks\nzero mcp              manage MCP servers and tools\nzero serve --mcp      expose Zero tools over MCP stdio\nzero sandbox          inspect sandbox policy and grants\nzero worktrees        prepare isolated git worktrees\nzero verify           detect and run local verification checks\nzero changes          inspect and commit local git changes\nzero usage            token usage and estimated cost\nzero cron             scheduled agent jobs\nzero update           check for newer releases\n```\n\n## Extending Zero\n\n### Project and personal instructions\n\nZero appends project-specific guidance to the system prompt from the first\n`AGENTS.md`, `ZERO.md`, or `.zero/AGENTS.md` file found in each directory from\nthe git root down to your current working directory (checked in that order\nper directory). Files are injected general-to-specific, capped at 8 KiB per\nfile and 32 KiB total.\n\nA personal `ZERO.md` under `config.UserConfigDir()/zero/ZERO.md`\n(`$XDG_CONFIG_HOME/zero/ZERO.md` or `~/.config/zero/ZERO.md` on Linux/macOS,\n`%AppData%\\Roaming\\zero\\ZERO.md` on Windows) applies across every workspace, ahead of any project guidelines.\n\n### Plugins\n\nPlugins are discovered from `~/.config/zero/plugins/\u003cname\u003e/plugin.json` (user\nscope — `$XDG_CONFIG_HOME` or `~/.config` on every OS, independent of the\n`config.UserConfigDir()` path used above) and `\u003ccwd\u003e/.zero/plugins/\u003cname\u003e/plugin.json`\n(project scope — resolved from the current working directory, not the repo\nroot), and managed with `zero plugins`. A manifest can declare:\n\n- `tools` — custom tools (`command`, `args`, `inputSchema`, and a\n  `permission` of `prompt` or `deny`; `allow` is honored only when manifest tool\n  auto-approval is enabled)\n- `hooks` — commands run on `beforeTool`, `afterTool`, `sessionStart`, or\n  `sessionEnd`\n- `prompts` and `skills` — additional prompt/skill files\n\nMCP servers (`zero mcp`) and standalone markdown skills (`zero skills`) use\nthe same extension points and can also be wired up outside of a plugin\nmanifest.\n\n## Appearance And Accessibility\n\n| Control | Effect |\n|---|---|\n| `NO_COLOR=\u003canything\u003e` | disables color output |\n| `ZERO_THEME=\u003cname\u003e` | selects the startup theme (`auto`, `dark`, `light`, or a color theme like `dracula`, `nord`, `gruvbox`, `tokyo-night`, `catppuccin`, `one-dark`, `solarized-dark`, `rose-pine`, `everforest`, `solarized-light`) |\n| `--theme \u003cname\u003e` | selects the TUI theme from the CLI (same names) |\n| `/theme` | opens the theme picker inside the TUI (live preview; `/theme \u003cname\u003e` switches directly) |\n| `ZERO_NO_FADE=1` | disables streaming fade animation |\n\nMeaning does not rely on color alone; diffs, permissions, and statuses also use\ntext or glyph markers.\n\n## Development\n\n```bash\ngo test ./...\ngo run ./cmd/zero-release build\ngo run ./cmd/zero-release smoke\ngo run ./cmd/zero-perf-bench\n```\n\nCross-compile examples:\n\n```bash\ngo run ./cmd/zero-release build --goos linux --goarch amd64\ngo run ./cmd/zero-release build --goos windows --goarch amd64 --output dist/zero.exe\n```\n\n## Documentation\n\n- [Install](docs/INSTALL.md)\n- [Update flow](docs/UPDATE.md)\n- [Stream-JSON protocol](docs/STREAM_JSON_PROTOCOL.md)\n- [Specialists](docs/SPECIALISTS.md)\n- [GitHub Action](docs/GITHUB_ACTION.md)\n- [Benchmarks](docs/BENCHMARK.md)\n- [Performance](docs/PERFORMANCE.md)\n- [Agent evals](docs/AGENT_EVALS.md)\n\n## Contributing\n\nContributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md), run the\nrelevant tests, and open a focused pull request.\n\nSecurity reports should follow [SECURITY.md](SECURITY.md).\n\n## License\n\nZero is released under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitlawb%2Fzero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitlawb%2Fzero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitlawb%2Fzero/lists"}