# Zero

> A Go terminal coding agent with your choice of model and a permission-gated sandbox

- Category: AI Coding / Autonomous Coding Agents
- Language: Go
- Licence: MIT
- Repository: https://github.com/Twigpine/zero
- Website: https://zero.gitlawb.com
- Canonical page: https://ai-tldr.dev/tools/gitlawb-zero/
- Updated: 2026-09-15

## In short

Zero is an AI coding agent for the local terminal, written in Go and released under the MIT license by Gitlawb (the team behind OpenClaude, a separate TypeScript CLI). It sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in Go and licensed MIT.

## Overview

Zero is an AI coding agent for the local terminal, written in Go and released under the MIT license by Gitlawb (the team behind OpenClaude, a separate TypeScript CLI). It inspects a repository, edits files, runs commands, uses browser and terminal helpers, and keeps durable local sessions, while you choose the model and the permission level. It ships as a single `zero` binary, installable from npm, an install script or a Go source build.

It is provider-agnostic by design: OpenAI, Anthropic, Gemini, Groq, OpenRouter, DeepSeek, Mistral, xAI, Qwen, Kimi, GitHub Models, Ollama, LM Studio, Atomic Chat, or any OpenAI- or Anthropic-compatible endpoint. A setup wizard picks a provider and model on first run, and `zero providers` / `zero models` / `zero doctor` manage and check them from the command line.

Side effects are meant to be visible. Workspace reads are allowed by default, file writes are limited to the workspace unless you grant another directory with `--add-dir`, and shell commands, network access and destructive actions go through Zero's permission and sandbox policy (with a native sandbox helper on Linux). The same agent runs without the TUI through `zero exec`, which speaks text, JSON or stream-JSON, can work in an isolated git worktree, and returns meaningful exit codes for CI. Sessions stay on disk, searchable and resumable, and Zero does not upload them as telemetry.

## What it does

- Bring your own model: 25+ providers including OpenAI, Anthropic, Gemini, OpenRouter, DeepSeek, xAI, GitHub Models and local Ollama / LM Studio / Atomic Chat
- Permission and sandbox policy for file writes, shell commands, network access and out-of-workspace writes, with explicit opt-in for unsafe/autonomous modes
- Interactive TUI with model/provider pickers, image input, slash commands (`/spec`, `/plan`, `/resume`, `/rewind`, `/loop`), live plan/tool rendering and themes
- Headless `zero exec` with text/JSON/stream-JSON I/O, isolated worktrees, spec-first runs and CI-friendly exit codes
- Local, searchable sessions that can be resumed, forked and rewound
- Extensible through MCP servers, markdown skills, plugins, lifecycle hooks and specialist subagents; `zero serve --mcp` exposes its own tools over MCP

## Getting started

The npm package bundles platform builds for Linux and macOS (x64/arm64) and Windows (x64). Source builds need Go 1.26.6 or newer.

1. Install

   Use npm, or the install script on Linux/macOS (PowerShell has an equivalent `install.ps1`).

```bash
npm install -g @gitlawb/zero

# or on Linux/macOS
curl -fsSL https://raw.githubusercontent.com/Gitlawb/zero/main/scripts/install.sh | bash
```

2. Pick a provider and model

   Set the API key for your provider (or run Ollama / LM Studio locally), then let the setup wizard configure it. `zero doctor` checks setup, keys and connectivity.

```bash
export ANTHROPIC_API_KEY=...
zero setup
zero providers list
zero models list
zero doctor
```

3. Work in the TUI

   Start the interactive agent in your repository. `Shift+Tab` cycles the permission mode and `/` opens slash-command suggestions.

```bash
zero
```

4. Run it headless

   One-shot and scripted runs for automation and CI, including spec-first runs and isolated worktrees.

```bash
zero exec "fix the failing test in ./pkg"
zero exec --use-spec "add rate limiting to the API client"
zero exec --worktree "try the migration in an isolated worktree"
zero exec --input-format stream-json --output-format stream-json < turns.jsonl
```

5. Grant an extra directory

   Writes stay inside the workspace unless you add another write root; the sandbox policy can be inspected at any time.

```bash
zero --add-dir ../docs-site
zero sandbox policy
```

## When to use it

- Pair with a coding agent in the terminal while choosing between hosted APIs and a local model
- Run scripted agent tasks in CI through `zero exec` with stream-JSON output and exit codes
- Let an agent try a risky change in an isolated git worktree under a permission-gated sandbox
- Extend one agent with MCP servers, skills, plugins and hooks shared across projects

## Version history

- 2026-09-15 v0.9.0: Adds a richer session browser with list/resume, makes configured MCP tools callable with OAuth discovery, and uses a dedicated summarizer model for cheaper compaction.
