Skip to content

Quiz yourself locally

The vibecheck command runs the same walkthrough in your terminal, on your own machine, before you open the PR or while it's open. It asks the questions the server would and grades your answers with the same grader. There's no server, database or Docker involved, just your own Anthropic API key.

It's practice. Nothing is stored and nothing is posted to GitHub, so passing locally does not turn vibecheck/verdict green. The server is still the gate.

Install

brew install bhurghundii/tap/vibecheck

Or with any Python 3.12+ tool installer:

uv tool install "git+https://github.com/bhurghundii/vibecheck.dev"
pipx install "git+https://github.com/bhurghundii/vibecheck.dev"

Update with brew upgrade vibecheck (or uv tool upgrade vibecheck-dev).

Either way it only pulls in httpx and its small dependencies, none of the server's.

Then set your key:

export ANTHROPIC_API_KEY=sk-ant-...

MODEL_API_KEY, the server's name for it, works too.

Run it

From inside a repository:

vibecheck                    # this branch against origin's default branch
vibecheck --base develop     # ...or against another base
vibecheck --working-tree     # include uncommitted changes to tracked files
vibecheck --pr 123           # a GitHub PR (needs the gh CLI, logged in)
vibecheck --pr 123 --repo octo/other
vibecheck --diff change.diff # any diff file

The branch diff is a three-dot diff from the merge base, the same one the GitHub Action sends, so commits that landed on the base after you branched aren't counted as yours. New files only count once they're committed (or git added, with --working-tree).

Answering

Each question shows the slice of the diff it's about. Type your answer and finish it with an empty line, so answers can run over several lines. On the first line of an answer you can also type:

:explain A plain-language walkthrough of that part of the change. Doesn't use an attempt.
:skip Give up on the question and see the answer. Counts as a fail.
:quit Stop. Ctrl-C and Ctrl-D work too.

A wrong answer can be retried; after the last attempt the answer is shown and the question counts as a fail. The run stops as soon as you've passed or can no longer pass. If you fail, you can start over with fresh questions on the same change.

Options

The defaults are the server's defaults, so a local run is as strict as an untuned deployment.

Flag Default Server equivalent
--questions N 5 EXAM_QUESTION_COUNT
--pass N 3 PASSINGMARKS
--attempts N 3 MAX_QUESTION_ATTEMPTS
--max-lines N 1000 (0 turns it off) EVALUATOR's size.max_changed_lines
--mean off MEANIEMODE
--fake off FAKE_GRADER: canned questions, answers containing looks-good pass, no API calls

Like the server, a small change gets fewer questions: one scoped question per 15 changed lines.

Exit status

0 passed, 1 failed, 2 rejected (too big, empty) or couldn't run, 130 stopped. So it fits in a git hook, for example .git/hooks/pre-push:

#!/bin/sh
exec vibecheck < /dev/tty

Releasing the formula

For maintainers: the formula lives in bhurghundii/homebrew-tap and is generated by scripts/brew_formula.py from uv.lock. The release workflow regenerates it on every v* tag (bump version in pyproject.toml first) and pushes it to the tap when the HOMEBREW_TAP_TOKEN secret is set: a fine-grained token with "Contents: write" on the tap repo only.