Kerpeten

AI code review in your terminal, where a second model checks every finding.

Kerpeten reads the change on your branch and lets a reviewer model look for defects in it. Then a judge model takes each finding on its own and tries to refute it against the code. What you get is a list of findings, each with a verdict, a score and a note on how to fix it.

npm install -g kerpeten
Read the docs

Status Kerpeten is at an early stage. Today it reviews on your machine and prints the findings. It does not post the review to a merge request yet.

What a review looks like

kerpeten review --dry-run
review: 524f2b14fb27..69435fefd9f2, 2 changed files, prompt reviewer v4
findings: 4
- src/flows/partialRefund.ts:10-10 [bug] The handling fee is not rounded down to whole cents.
verdict verified, priority P1, nature critical, fix_effort easy, score 70, action inline
For a request of 100 cents the 1.5% fee is taken as 1.5 cents instead of being rounded down to 1 cent. The flow returns 98.5 cents instead of 99.
fix Round the handling fee down to whole cents before you take it from the refund.
rationale A request of 100 cents passes the check for a positive amount, and the fee of 1.5 cents is taken without rounding, so the flow returns 98.5 cents instead of 99.
evidence src/flows/partialRefund.ts:10: The percentage is stored without rounding, so it can be a part of a cent.
evidence src/flows/partialRefund.ts:12: The fee is taken from the requested amount as it is.
evidence AGENTS.md:6: Money must be a whole number of cents.
- src/flows/partialRefund.ts:6-6 [convention] The id of the partial refund flow is not in snake_case.
verdict verified, priority P2, nature critical, fix_effort easy, score 45, action summary
The `id` of the new flow is `partialRefund`; the project rule says that flow ids are written in snake_case.
fix Change the `id` to `partial_refund`.
rationale `AGENTS.md` says that the ids of the flows under `src/flows/` are in snake_case; the `id` of the new flow is `partialRefund`, which is camelCase.
evidence AGENTS.md:5: The `id` fields of the flows under `src/flows/` must be in snake_case.
evidence src/flows/partialRefund.ts:6: The `id` of the new flow is `partialRefund`, in camelCase.

Two of the four findings of a real run on a small test repository. The comments were written in Turkish and are translated here.

How a review works

  1. 1 Change

    Kerpeten takes the diff between the base and HEAD.

    • diff
  2. 2 Reviewer

    The reviewer model reads the diff and the rule files, looks into the repository with its read-only tools and reports findings.

    • file
    • lines
    • category
    • evidence
    • fix
  3. 3 Filter

    Findings that point to a file or to lines that do not exist are dropped.

    • kept findings
  4. 4 Judge

    Each finding goes to the judge model in its own call. The judge checks it against the code and labels it.

    • verified
    • unverified
    • refuted
  5. 5 Scorer

    The labels become a score from 0 to 100. The score decides what a posted review would do with the finding.

    • inline
    • summary
    • stored
  6. 6 Comment plan

    For a pull request or merge request, Kerpeten decides what it would write: which findings become comments on lines of the diff, which go to the one summary comment and which are already written. Nothing is posted yet.

    • line comments
    • summary comment

a model call no model. Nothing is posted in a dry run, so the action only tells what a posted review would do.

Two models, not one.
The reviewer finds, the judge doubts. A finding the judge refutes gets a score of 0, so a wrong guess does not look like a real defect.
Read-only.
The models can read and search the files of your repository, and nothing else. They cannot change a file or run a command.
Your rules.
A change that breaks a rule written in your AGENTS.md or CLAUDE.md is a finding too.
No silent fallback.
A missing key stops the review with a clear error. When a limit ends the review early or a long input is cut, Kerpeten reports it. It never switches to another model on its own.

Install and first run

  1. Install Kerpeten. It also needs ripgrep (rg) on your PATH; the models search your code with it.
  2. Run kerpeten init inside the repository you want to review. It asks for the models and the language of the review comments, then writes .kerpeten.yml.
  3. Give Kerpeten the key of your provider, or sign in with kerpeten auth login when you chose your ChatGPT plan. Put your key in the place of <your key>.
  4. Commit your work, then run the review from inside the repository.
shell
npm install -g kerpeten
cd /path/to/your-repository
kerpeten init
export ANTHROPIC_API_KEY="<your key>"
kerpeten review --dry-run

The npm package brings a ready binary for Linux (x64 and arm64, glibc) and for macOS (arm64). There is no build yet for Windows, for Intel Macs or for a musl Linux such as Alpine. Getting started has the details.

Models

providerWhat it needs
anthropicANTHROPIC_API_KEY
openaiOPENAI_API_KEY
openrouterOPENROUTER_API_KEY
chatgpt A sign-in with kerpeten auth login; the requests count against your ChatGPT plan

The reviewer and the judge can be different models. A model of anthropic, openai or openrouter can also send its requests to another endpoint that speaks the same API; a chatgpt model cannot. See Configuration and ChatGPT plan.