# Main Dependencies for Building no-mistakes: Complete Build Guide

> Discover the main dependencies for building no-mistakes, including Charm TUI, Cobra CLI, and SQLite. Learn the essential Go prerequisites for this robust project.

- Repository: [Kun Chen/no-mistakes](https://github.com/kunchenguid/no-mistakes)
- Tags: how-to-guide
- Published: 2026-07-11

---

**The main dependencies for building no-mistakes are declared in the `go.mod` file and include the Charm TUI stack (Bubble Tea, Bubbles, Lipgloss), Cobra for CLI parsing, modernc.org/sqlite for data persistence, and YAML parsing libraries, requiring only Go 1.25 or newer as the external prerequisite.**

*no-mistakes* is a pure-Go command-line tool developed in the `kunchenguid/no-mistakes` repository. All build-time requirements are declared in the repository's **`go.mod`** file, which lists both direct first-party imports and indirect transitive packages pulled in automatically by Go modules.

## Core Build Dependencies in `go.mod`

The `go.mod` file at the repository root defines eleven direct dependencies that power the interactive CLI, configuration management, and data persistence layers.

### TUI Framework Stack (Charm Bracelet)

The terminal user interface relies on three complementary Charm libraries:

- **`github.com/charmbracelet/bubbletea`** — The core TUI framework that powers the interactive CLI, handling event loops and rendering (referenced at line 7).
- **`github.com/charmbracelet/bubbles`** — Provides UI components including dialogs, spinners, and progress indicators (referenced at line 6).
- **`github.com/charmbracelet/lipgloss`** — Declarative styling library for terminal output, enabling rich color and layout control (referenced at line 8).

Supporting these are **`github.com/muesli/termenv`** for advanced terminal color handling and environment detection (line 10), and **`github.com/mattn/go-isatty`** for detecting whether stdout/stderr is a TTY (line 9), which determines color and interaction capabilities.

### CLI and Configuration Libraries

Command-line parsing and configuration handling depend on:

- **`github.com/spf13/cobra`** — The entry point framework providing command parsing and sub-command scaffolding (line 12).
- **`gopkg.in/yaml.v3`** — YAML parsing and serialization for the [`.no-mistakes.yaml`](https://github.com/kunchenguid/no-mistakes/blob/main/.no-mistakes.yaml) configuration files (line 15).
- **`github.com/toon-format/toon-go`** — Implements the *Toon* code-formatting language used during the document-generation step (line 13).

### Data Persistence and Utilities

For internal state management and system integration:

- **`modernc.org/sqlite`** — Embedded SQLite driver used by the internal DB layer in `internal/db/*` to persist run metadata without requiring external database servers (line 16).
- **`github.com/oklog/ulid/v2`** — Generates universally-unique IDs for run tracking (line 11).
- **`golang.org/x/sys`** — Low-level OS primitives for process and signal handling (line 14).

## Build Requirements and Toolchain

Because *no-mistakes* is pure Go, the only external prerequisite is a **Go toolchain** of version **1.25** or newer, as declared on line 3 of `go.mod`. No additional system-level libraries, C compilers, or build tools are required; the `go` command handles all dependency resolution automatically.

Indirect dependencies listed under the second `require` block in `go.mod` are transitive packages pulled in by the direct imports. These do not need manual installation; `go build` resolves them automatically.

## How to Build no-mistakes from Source

To compile the binary from a fresh checkout:

```bash

# Clone the repository

git clone https://github.com/kunchenguid/no-mistakes.git
cd no-mistakes

# Verify Go version (must be ≥ 1.25)

go version

# Download dependencies (optional, validates go.mod)

go mod tidy

# Build the CLI binary

go build -o ./bin/no-mistakes ./cmd/no-mistakes

# Verify installation

./bin/no-mistakes --help

```

For global installation:

```bash
go install github.com/kunchenguid/no-mistakes/cmd/no-mistakes@latest

```

## Key Source Files and Their Roles

The following files consume the dependencies and form the build surface:

- **[`cmd/no-mistakes/main.go`](https://github.com/kunchenguid/no-mistakes/blob/main/cmd/no-mistakes/main.go)** — Entry point for the CLI; wires up `cobra` commands and initializes the application.
- **`internal/cli/*`** — Implements user-facing commands (run, status, daemon control) and interacts with the core pipeline.
- **`internal/db/*`** — Persists run metadata in SQLite, demonstrating why `modernc.org/sqlite` is required.
- **`internal/pipeline/*`** — Core pipeline logic that orchestrates agents, steps, and hooks, utilizing the TUI components.
- **`internal/agent/*`** — Adapter layer for different AI agents (Claude, Codex, etc.).

## Summary

- **Pure Go toolchain**: Only requires Go 1.25+; no external system dependencies.
- **Core UI stack**: Charm Bracelet libraries (Bubble Tea, Bubbles, Lipgloss) power the terminal interface.
- **CLI framework**: Cobra handles command parsing in [`cmd/no-mistakes/main.go`](https://github.com/kunchenguid/no-mistakes/blob/main/cmd/no-mistakes/main.go).
- **Data layer**: `modernc.org/sqlite` provides embedded database functionality in `internal/db/*`.
- **Configuration**: `gopkg.in/yaml.v3` parses [`.no-mistakes.yaml`](https://github.com/kunchenguid/no-mistakes/blob/main/.no-mistakes.yaml) files.
- **Build commands**: Use `go build ./cmd/no-mistakes` or `go install` for compilation.

## Frequently Asked Questions

### What Go version is required to build no-mistakes?

Go 1.25 or newer is required, as specified on line 3 of the `go.mod` file. The project uses modern Go features and module semantics that depend on this version baseline.

### Does building no-mistakes require external libraries like gcc or sqlite-dev?

No. Because `modernc.org/sqlite` is a pure-Go implementation of SQLite, the project compiles without CGO or external C libraries. The `golang.org/x/sys` package handles low-level OS primitives directly through Go system calls.

### How do I update the dependencies for no-mistakes?

Run `go mod tidy` to clean up unused dependencies and update `go.mod`, or `go get -u` to upgrade to the latest versions. The `go` toolchain automatically downloads indirect dependencies; you do not need to manage them manually.

### Can I build no-mistakes on Windows, macOS, and Linux?

Yes. As a pure-Go project relying only on standard Go modules and the `golang.org/x/sys` package for cross-platform system calls, it compiles cleanly on any platform supported by Go 1.25, including Windows, macOS, and Linux.