Getting started
co-maintainer learns a GitHub repo, writes review guides on your machine, then
reviews a PR or local diff. Start with the CLI. serve and
remote-review are optional later.
Overview
Need: Node.js 24+, a repo you can read, gh auth login, an
OpenRouter key. Details: Authentication.
1. Install
npm install -g co-maintainer
co-maintainer help
co-maintainer --version
PATH issues or general install notes: README install.
2. Save defaults (once)
co-maintainer set --auth=gh --ai=openrouter --token=YOUR_OPENROUTER_KEY --low-model=openai/gpt-oss-120b --high-model=openai/gpt-5.6-luna
3. One repo
co-maintainer probe owner/repo
co-maintainer init owner/repo --auth=gh --ai=openrouter \
--low-model=openai/gpt-oss-120b --high-model=openai/gpt-5.6-luna \
--include-codebase --include-pull-requests --include-pull-request-changes \
--include-commit-history --include-how-repo-works
Run probe first and copy the init line it prints. That line is
bounded to this repository, and it comes with a cost and time estimate. init
takes time and API cost, so prefer the printed line over guessing flags.
--improve-matrix=N is the rework pass count: 1 is the default, and each step
up adds another audit pass over the same diff and raises the output budget, so
it costs more. Use 2 when a repository needs a sharper guide and the budget
allows it. See Review: Depth and Cost.
init writes SKILL.md, CODEBASE.md, and the review guides under the config
directory. codegraph is an optional local index that lets the review ask
structural questions such as who calls a symbol. It is free and stays on your
machine. See Caching for where everything is written.
4. Review
co-maintainer review # local changes
co-maintainer review owner/repo 123 # pull request
Ways to use it (after init)
The same repo guides can power three different setups. You can mix them over
time (for example CLI on your laptop plus serve for the team), and a hosted
instance is a managed version of the same server. See Cloud.
How each path runs
| You want | Where it runs | Typical entry | Read |
|---|---|---|---|
| Try a PR or local branch quickly | Your machine | review or review owner/repo 123 |
local-review · PR review |
| Team-wide PR reviews without everyone running the CLI | Your server + GitHub App | set App credentials, then serve |
serve |
| Operate repos, tokens, concurrency | Browser on the server | Dashboard after serve |
dashboard |
| Review a local diff without every developer running init/sync | Laptop + server | set --remote-host then review --remote |
remote-review |
| Refresh guides after main moves | Same place as init |
sync owner/repo |
sync |
Guides and cache paths: Caching. Flags and co-maintainer set:
Configuration.
CLI guides and dashboard guides are separate
A CLI init writes guides on the machine that ran it. A dashboard server keeps
its own guides for the repositories it was given. The two do not share a folder,
and one does not update the other. To use the server's copy from a laptop, run
review --remote. To read what the server holds, run
view owner/repo --remote. See Remote review.
Adding a repository to the dashboard needs the GitHub App, because the server reads the repository on its own and receives webhooks. A CLI-only setup never needs the App. See GitHub App and Dashboard: Adding a repository.
If something breaks
Every failure has an exit code and a message that names the fix. Start with Troubleshooting, which maps each code and message to a cause. The short version:
- Run
probeonly after install. - Run
initbeforereview. - co-maintainer does not run
gh auth loginfor you. - Use
--debugon failures.