Docs

Install once. Let agents read and write repo memory.

Mainline has a human CLI and an agent protocol. Humans inspect memory; agents retrieve context before editing and record durable intent after meaningful work.

Install

curl -fsSL https://raw.githubusercontent.com/mainline-org/mainline/main/install.sh | bash
mainline doctor --setup

The installer downloads the latest GitHub Release archive and verifies it against checksums.

Initialize a repo

cd your-repo
mainline init --actor-name "alice"

Init writes `.mainline/config.toml`, configures Git refs, creates an actor identity, and installs agent guidance.

Human quick start

mainline hub open
mainline log
mainline show <intent_id>
mainline gaps

Browse recent intent, inspect decisions, and find commits that still need coverage.

Agent protocol

mainline context --current --json
mainline start "Add JWT auth"
mainline append "Implemented JWT middleware"
mainline seal

Agents read before writing, record meaning rather than keystrokes, and leave reviewable intent.

When context is required

Agents call Mainline before non-trivial edits.

Context is required for architecture changes, refactors, migrations, deletions, auth, billing, data model, permissions, release, CI, and cross-file behavior changes.

Agents may skip Mainline only for narrow typo fixes, formatting-only edits, obvious one-line syntax fixes, or read-only inspection where the user explicitly asks to look at a single file.