# Quickstart

Source: https://www.zerd.si/docs/quickstart

zerd is a coding agent for your terminal. It edits your code, checks its own work and reports how the run ended. It is one native binary, so there is no Python or Node to install first.

### Install

```bash
curl -fsSL https://www.zerd.si/install.sh | sh          # macOS and Linux
irm https://www.zerd.si/install.ps1 | iex               # Windows 10/11, PowerShell
```

On Windows, install [Git for Windows](https://git-scm.com/download/win) first. More in [Windows](/docs/windows).

### Start it in a repo

```bash
cd your-project
zerd
```

With no model configured yet, setup starts on its own and asks for four things:

1. Where your models come from, and saving the key.
2. A live test call to check the key.
3. Which model to use.
4. How often zerd should ask before it acts.

Run it again any time with `zerd setup`. Models can come from:

- a ChatGPT/Codex login (model ids start with `codex/`)
- a key for Anthropic, OpenAI, Gemini, OpenRouter, Groq, DeepSeek, Mistral, xAI, Together, Fireworks, Cerebras, Moonshot or Z.ai
- a local Ollama or LM Studio, which needs no key
- the Command Code gateway, using `API_KEY`

### Ask for something you can check by eye

```text
> rename the helper parse_date to parse_iso_date and update its callers
```

Read the last line when it finishes. zerd always ends with a status line that says what was checked:

```text
status: verified   checks: 1 passed   review: clean   citations: 4 checked, 0 unverified
```

The five statuses are explained in [How a run works](/docs/how-a-run-works).

### Undo it if you don't like it

```text
> /undo
```

zerd puts back what the last request changed and removes the files it created. Your git history and staging area are left alone.

## What zerd creates

The first interactive run in a git repo writes a `.zerd/config.toml` if there isn't one. Every line in it is commented out, so it changes nothing until you edit it.

It lists the model for each job: `fast`, `strong`, `explore`, `summarize`, `review`, `advisor` and `challenge`. To change one, delete the leading `# ` and set the model you want.

In a repo with 15 or more source files it also starts building the [code graph](/docs/code-graph) in the background.

## Pick a model

```bash
zerd -m anthropic:claude-sonnet-5-5       # provider:model goes straight to that provider (ANTHROPIC_API_KEY)
zerd -m groq:llama-3.3-70b                # same idea, uses GROQ_API_KEY
zerd -m ollama:qwen3:8b                   # local, only the first colon splits
zerd -m codex/gpt-5.6-luna                # ChatGPT/Codex login
zerd -m MiniMaxAI/MiniMax-M3              # no known prefix: goes through the gateway (API_KEY)
```

Inside a session, `/model` shows the current model and `/model <id>` switches to another (Tab completes ids). A new session starts on the model you used last time. More in [Models and routing](/docs/models).

## First things to try

| Type this | What happens |
|---|---|
| `review my changes` | A second agent reviews your working tree and a verifier tries to disprove each finding. See [Reviews](/docs/reviews). |
| `/verify` | Runs the tests, lint and type checks on the files the last request changed. |
| `/cost` | Shows tokens, cache hit rate and estimated cost. |
| `/undo` | Puts back what the last request changed. |
| `@src/app.ts explain this` | Attaches a file to your message. Tab completes paths. |
| `/help` | Lists every command. |

## One shot, for scripts and CI

```bash
zerd -m anthropic:claude-haiku-5-5 --approval auto "fix the failing test in tests/test_paging.py"
zerd --continue          # pick up the last session in this folder
```

Checks run automatically after edits, with repair rounds, and zerd saves nothing it learns into your repo. The exit code is 1 if the run ended `failed` or `verification_failed`, so CI can fail the build on it. More in the [CLI reference](/docs/cli).

## Build from source

```bash
git clone https://github.com/Adityaadpandey/zerd.si && cd zerd.si
cargo build --release                  # target/release/zerd
```

## If something looks wrong

Run `zerd doctor`. It checks your credentials with a live provider call, then looks at git, the sandbox, your terminal and the data folder. Each problem it finds comes with the fix beside it. More in [Troubleshooting](/docs/troubleshooting).
