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 from
COMPANION_FORGE_TOKEN,forge.token, orgh auth token. - Go 1.27.3+ — only if you install with
go installor build from source. - Universal Ctags (optional) — adds symbol indexing for non-Go languages. The first line of
ctags --versionmust readUniversal 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.
| Platform | Architecture | Archive |
|---|---|---|
| macOS | arm64 (Apple silicon) | companion_0.2.0_darwin_arm64.tar.gz |
| macOS | amd64 (Intel) | companion_0.2.0_darwin_amd64.tar.gz |
| Linux | arm64 | companion_0.2.0_linux_arm64.tar.gz |
| Linux | amd64 | companion_0.2.0_linux_amd64.tar.gz |
| Windows | arm64 | companion_0.2.0_windows_arm64.zip |
| Windows | amd64 | companion_0.2.0_windows_amd64.zip |
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 versionOn 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@latestBuild from source
git clone https://github.com/repocompanion/companion.git
cd companion
make build # ./companion
make testThe build produces ./companion in the checkout. Nothing is installed outside the repository.
Verify the install
companion version
companion doctor --strictdoctor 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.
companion init --remote [email protected]:your-org/docs-store.git
companion context
companion guidance "implement an SQS consumer in Go" --lang gocontext 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 mcpCursor
Add the server to ~/.cursor/mcp.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.
companion export agents-md --output AGENTS.md
companion export llms-txt --output llms.txt
companion export context --format markdown --output context.md