Install

One binary, no runtime.

Repo Companion is a single Go binary with an embedded MCP server that speaks stdio. There is nothing to host, no port to open, and no service to keep running.

go install github.com/repocompanion/companion/cmd/companion@latest

Requires Go 1.27.3+ · or use a prebuilt binary below

Requirements

  • git — the store is a Git repository and every change is a commit.
  • gh — used for authentication and PR operations. Companion reads a token fromCOMPANION_FORGE_TOKEN, forge.token, or gh auth token.
  • Go 1.27.3+ — only if you install with go install or build from source.
  • Universal Ctags (optional) — adds symbol indexing for non-Go languages. The first line of ctags --version must read Universal Ctags.

Prebuilt binary

Every release publishes archives for macOS, Linux, and Windows. Each contains LICENSE, NOTICE, THIRD_PARTY_NOTICES.md, and SECURITY.md, alongside checksums.txt.

PlatformArchitectureArchive
macOSarm64 (Apple silicon)companion_0.2.0_darwin_arm64.tar.gz
macOSamd64 (Intel)companion_0.2.0_darwin_amd64.tar.gz
Linuxarm64companion_0.2.0_linux_arm64.tar.gz
Linuxamd64companion_0.2.0_linux_amd64.tar.gz
Windowsarm64companion_0.2.0_windows_arm64.zip
Windowsamd64companion_0.2.0_windows_amd64.zip
macOS arm64 example
gh release download v0.2.0 --repo repocompanion/companion \
  --pattern 'companion_0.2.0_darwin_arm64.tar.gz'
tar -xzf companion_0.2.0_darwin_arm64.tar.gz
sudo mv companion /usr/local/bin/
companion version

On Linux, move the binary to /usr/local/bin or ~/.local/bin. On Windows, extract the zip and add its folder to PATH. Verify a download against checksums.txt with shasum -a 256 -c checksums.txt.

With go install

The fastest path if you already have a Go toolchain. companion version reports the module version for go install builds and the release version for downloaded archives.

go install github.com/repocompanion/companion/cmd/companion@latest

Build from source

shell
git clone https://github.com/repocompanion/companion.git
cd companion
make build        # ./companion
make test

The build produces ./companion in the checkout. Nothing is installed outside the repository.

Verify the install

shell
companion version
companion doctor --strict

doctor checks git, the store, authentication, the local mirror, the state directory, and the code providers. --strict turns warnings into a non-zero exit, which makes it usable in CI.

Create your docs store

The store is one private GitHub repository. It can start empty: companion initcreates the initial main commit with .companion/registry.yaml when the repository has no commits.

shell
companion init --remote [email protected]:your-org/docs-store.git
companion context
companion guidance "implement an SQS consumer in Go" --lang go

context shows the resolved project, team, languages, and the source of each value.guidance ranks the patterns, ADRs, and standards that apply to a task, and attaches reference implementations when the code repository is available.

Recommended repository layout, branch protection, CODEOWNERS, and docs CI are covered in Store setup.

Connect a coding agent

The MCP server runs over stdio. No port is opened and no daemon is started.

Claude Code

claude mcp add --scope user companion -- companion mcp

Cursor

Add the server to ~/.cursor/mcp.json:

json
{
  "mcpServers": {
    "companion": {
      "command": "companion",
      "args": ["mcp"]
    }
  }
}

Agents without MCP

Export the same context as files the agent can read. agents-md writes a managed block between <!-- companion:begin --> markers, so repeated exports stay idempotent.

shell
companion export agents-md --output AGENTS.md
companion export llms-txt --output llms.txt
companion export context --format markdown --output context.md

Next steps