# Prerequisites for Using no-mistakes: Complete Setup Guide

> Discover the essential prerequisites for using no-mistakes. Learn about necessary tools like Git, Go, Make, and supported operating systems for a smooth setup.

- Repository: [Kun Chen/no-mistakes](https://github.com/kunchenguid/no-mistakes)
- Tags: getting-started
- Published: 2026-06-28

---

**TLDR:** To use no-mistakes, you need Git (≥2.30), Go 1.25, GNU Make, and a supported OS (macOS, Linux, or Windows); optional AI agents require specific API keys like `NO_MISTAKES_CLAUDE_API_KEY` or `NO_MISTAKES_OPENAI_API_KEY`.

The `no-mistakes` CLI from the [kunchenguid/no-mistakes](https://github.com/kunchenguid/no-mistakes) repository acts as a Git gate that intercepts pushes to run automated checks and AI reviews. Understanding the prerequisites for using no-mistakes ensures you can compile the binary from [[`cmd/no-mistakes/main.go`](https://github.com/kunchenguid/no-mistakes/blob/main/cmd/no-mistakes/main.go)](https://github.com/kunchenguid/no-mistakes/blob/main/cmd/no-mistakes/main.go), initialize the tool in your repositories, and configure optional LLM agents without dependency failures.

## Core System Requirements

### Git Version 2.30 or Higher

`no-mistakes` creates disposable work-trees, fetches remote refs, and pushes branches via command-line Git operations. According to the workflow diagram in the README, the tool requires **Git ≥ 2.30** to handle these operations reliably.

### Go Toolchain 1.25

The project pins Go 1.25 in [`go.mod`](https://github.com/kunchenguid/no-mistakes/blob/main/go.mod). All source files, including the entry point at [`cmd/no-mistakes/main.go`](https://github.com/kunchenguid/no-mistakes/blob/main/cmd/no-mistakes/main.go), are built with this version, making it a hard requirement for compilation.

### Supported Operating Systems

The binary is built for **macOS**, **Linux**, and **Windows**, as indicated by the platform badges in the README.

### GNU Make

The repository supplies a [`Makefile`](https://github.com/kunchenguid/no-mistakes/blob/main/Makefile) with targets including `build`, `test`, and `e2e`. You need GNU Make to execute these build commands.

### cURL

The convenient one-liner installation script downloads the latest binary via `curl`, making it necessary for the scripted install path.

## Build Dependencies

### SQLite Driver and C Compiler

Persistent state—including run metadata and configuration—lives in a local SQLite database managed by the `internal/db/` package. The project depends on `modernc.org/sqlite`, which Go modules fetch automatically. However, building this driver requires a **working C compiler** on your system to compile the native bindings.

## Optional Runtime Configuration

### Network Connectivity

The tool contacts remote Git providers (GitHub, GitLab, Bitbucket) and LLM APIs through the orchestration logic in `internal/pipeline/`. A firewall blocking HTTPS will break the pipeline steps that fetch refs, run CI checks, and call AI services.

### Agent-Specific API Keys

`no-mistakes` can drive Claude, Codex, Opencode, Pi, Copilot, or custom ACX targets. Each requires an authentication token set as an environment variable. The exact variable names are defined in the respective agent source files under [`internal/agent/`](https://github.com/kunchenguid/no-mistakes/tree/main/internal/agent).

For example, Claude’s implementation reads `envAPIKey = "NO_MISTAKES_CLAUDE_API_KEY"` in [[`internal/agent/claude.go`](https://github.com/kunchenguid/no-mistakes/blob/main/internal/agent/claude.go)](https://github.com/kunchenguid/no-mistakes/blob/main/internal/agent/claude.go).

| Agent | Environment Variable | Example Value |
|-------|---------------------|---------------|
| Claude | `NO_MISTAKES_CLAUDE_API_KEY` | `sk-...` |
| Codex | `NO_MISTAKES_OPENAI_API_KEY` | `sk-...` |
| Opencode | `NO_MISTAKES_OPENCODE_API_KEY` | `...` |
| Pi | `NO_MISTAKES_PI_API_KEY` | `...` |
| Copilot | `NO_MISTAKES_GITHUB_TOKEN` | `ghp_...` |
| ACX (custom) | `NO_MISTAKES_ACPX_TARGET` | `...` |
| Bitbucket | `NO_MISTAKES_BITBUCKET_API_TOKEN` & `NO_MISTAKES_BITBUCKET_API_BASE_URL` | `...` |

## Installation and Verification

You can install `no-mistakes` via the official one-liner or build from source using the provided Makefile.

**Method 1: Install via cURL**

```bash
curl -fsSL https://raw.githubusercontent.com/kunchenguid/no-mistakes/main/docs/install.sh | sh

```

**Method 2: Build from Source**

```bash
git clone https://github.com/kunchenguid/no-mistakes.git
cd no-mistakes
make build

```

This produces the `./bin/no-mistakes` binary.

**Initialize the Gate**

Once installed, initialize the tool in your project to create the state directory:

```bash
cd my-project
no-mistakes init

```

This creates the `~/.no-mistakes` state directory and installs the Git integration. You can then push branches through the gate:

```bash
git checkout -b feature
git add .
git commit -m "my change"
git push no-mistakes

```

Or launch the interactive TUI:

```bash
no-mistakes

```

## Summary

- **Git ≥ 2.30** is required for work-tree operations and branch management.
- **Go 1.25** and **GNU Make** are mandatory for building from source.
- A **C compiler** is needed to build the SQLite driver dependency (`modernc.org/sqlite`).
- **cURL** is required only for the one-liner installation script.
- **API keys** are optional and agent-specific (e.g., `NO_MISTAKES_CLAUDE_API_KEY` for Claude).
- **Network access** to Git providers and LLM endpoints is required for full pipeline functionality.

## Frequently Asked Questions

### Do I need a C compiler to install no-mistakes?

Yes, if you build from source. The `modernc.org/sqlite` driver used for persistent state storage in `internal/db/` requires a working C compiler to build the native SQLite bindings. Pre-compiled binaries installed via the cURL one-liner do not require a compiler.

### Can I run no-mistakes without AI agents?

Yes. The core Git gate functionality in `internal/pipeline/` works without API keys. AI agents are optional enhancements that provide automated code review; you only need to configure the environment variables if you intend to use specific agents like Claude or Codex.

### What happens if my Git version is older than 2.30?

Versions prior to 2.30 may lack reliable support for the disposable work-tree operations that `no-mistakes` uses to isolate builds. While the tool might function on older versions, Git ≥ 2.30 ensures stable operation when creating temporary work-trees and fetching refs.

### How do I verify my prerequisites are met?

Run `git --version` to check Git, `go version` to verify Go 1.25, and `make --version` to confirm GNU Make. Then execute `no-mistakes init` in a test repository; successful initialization prints "Gate initialized" and confirms your environment is ready to intercept pushes.