Skip to main content

Radarhound

A code reviewer that runs on your machine, investigates the repository instead of reading only the diff, and learns from your replies.

It drives a coding-agent CLI you already have (Claude Code by default) in read-only mode against a throw-away snapshot of your commit. It has no server and no third-party Python dependencies.

Status: early. It is used daily on its author's GitLab projects on Windows. The tests pass on Windows, Linux and macOS, but real reviews have only been run on Windows. GitHub pull requests are new in 0.1.2. See ROADMAP.md; help is welcome. What changed in each release: CHANGELOG.md.

How it works

  1. Scope. rh review resolves what changed (the whole merge request, or only what is new since the last review) and a router decides how deep to go. Docs-only changes can be skipped; high-risk files always get a deep review.
  2. Hunt. The model lists risky changed lines as checkable claims, then probes each claim with read, grep and glob tools on a snapshot of the head commit. Every finding must cite file:line evidence.
  3. Verify. A separate pass tries to refute each finding and drops the ones it cannot prove. Duplicates are grouped into one finding per root cause.
  4. Report. reviews/<id>.md and .json, with a severity, a proposed call (fix now, lean, backlog) and a fix cost on every finding.
  5. Learn. rh feedback <fingerprint> accept|decline records your call. Feedback is distilled into short project lessons that later hunts read, and a declined finding is not raised again.

Some checks need no model at all, for example predicting which source-text tests a change will break.

Does it find things?

These are the author's own records on private projects, side by side with a paid AI code review service that ran on the same commit ranges. The full tables are in docs/TRIAL.md.

Radarhound Paid reviewer
Confirmed defects found, 8 scored rounds (69 in total) 53 (77%) 33 (48%)
Rounds with the larger share, of those 8 8 0
Critical or Major defects that only the other one found 4 missed 13 missed (1 Critical, 12 Major)
A later scored round (12 in-scope defects) 11 0

It is not a clean sweep. On five later merge requests the paid reviewer caught a real defect that Radarhound missed, one of them a Major on a money path. Scored against an answer key made only of the paid reviewer's past findings, Radarhound raises 43% of them; the paid reviewer itself, run 4 times on one diff with 6 known defects, found 5, 2, 1.5 and 2.

Volume so far: 182 reviews on four private repositories. On one day of human triage, 35 of 48 findings were real (73%).

Requirements

  • Python 3.12 or newer
  • git
  • One engine CLI, signed in. The default is claude (Claude Code), which rh runs with Read, Grep and Glob only.
  • Optional: gh, for GitHub pull requests; glab, for GitLab merge requests

Install

uv tool install radarhound

or pipx install radarhound, or pip install radarhound inside a virtual environment. This gives you the rh command (radarhound is the same command). To try it without installing, run uvx radarhound --help.

For the newest unreleased code, install from GitHub instead: uv tool install git+https://github.com/mohammedsaif1990/radarhound.

Quick start

In your project:

rh setup

It asks which coding agent you work in (Claude Code, Codex or OpenCode), then in one go: creates .radarhound/, finds your target branch, keeps the state folder out of git, checks that the review engines can read but cannot write or run a shell, profiles the project, and installs a skill (plus slash commands for Claude Code). Re-running it is safe.

Then commit your work on a branch and run rh review, or in your agent say "review my branch". The review is written to .radarhound/reviews/.

The single steps are still there for scripts: rh init, rh canary, rh init --refresh, rh slash install --dir .claude/commands, and rh setup --yes --agent claude-code asks nothing.

docs/WALKTHROUGH.md follows one change through a full cycle: review, verdicts, fix, re-review and the lesson learned from it.

Useful variations:

rh review --dry-run            # print the decision and the chunks, write nothing
rh review --scope latest       # only what changed since the last review
rh review --mode scout         # material findings only (default: hound, everything real)
rh review --pr 42              # review GitHub pull request 42 (fetches it if needed)
rh review --pr 42 --post       # ...and post the review as one comment on the PR
rh review --pr 42 --post --scope latest   # after a push: a new comment, only if it found something
rh review --mr 123             # review GitLab merge request 123
rh follow --source origin --branch my-branch   # review every new push
rh feedback <fingerprint> decline --reason "by design"
rh page                        # an HTML page of every option and the recent runs
rh stats                       # reviews, findings, time and money

rh <command> --help lists every flag.

Use from your coding agent

rh setup installs a radarhound skill for the agent you choose: in .claude/skills for Claude Code, .agents/skills for Codex and .opencode/skills for OpenCode. Say "review my branch" and the agent runs the whole cycle: review, present the findings, record your verdicts, fix, review again.

For Claude Code it also installs slash commands into the project's .claude/commands. Each command file names one repository, so a shared folder such as ~/.claude/commands can serve only one project.

In a Claude Code session:

  1. /rh-review runs the review in the background, reads the report and lists every finding with its proposed call.
  2. Tell Claude which findings to fix and which to decline, in plain words. It records each verdict with rh feedback <fingerprint> accept|decline|fixed; the report ends with a ready-made command for every finding.
  3. /rh-review --scope latest reviews only the fix.

The other commands are /rh-status, /rh-config, /rh-mode, /rh-hunt, /rh-pre, /rh-depth, /rh-scope and /rh-page. Setup itself asks questions, so run rh setup in a terminal.

Commands

Command What it does
rh setup Set up a repo in one go: banner, agent chooser, init, canary, profile, skill (start here)
rh init Create .radarhound/ (config, memory, findings, state, reviews)
rh canary [engine...] Check that an engine can read and cannot write or run a shell
rh review Review the current change scope
rh follow Follow a branch and review every new push
rh feedback Accept or decline a finding, or record a miss
rh learn Distill feedback into lessons; import past review history
rh lessons List, show, add or retire lessons
rh eval <key.json> Score reviews against an answer key
rh stats Report reviews, findings, time and money
rh config Show, get or set a config value
rh slash install --dir <dir> Install /rh-* slash commands for Claude Code
rh page Write a page showing every option and the recent runs

Exit codes: 0 reviewed, 1 incomplete or failed calls, 2 refused or git error, 3 an engine has no passing canary or another review is already running.

Configuration

Everything is in .radarhound/config.toml, written by rh init with a comment on every key. The ones you will touch first:

Key Meaning
target_branch Base branch for the merge-base
hunt_engines, verify_engine Which engine runs each pass
high_risk Globs that always get a deep review
max_calls_per_review, max_minutes Budgets for one review
backlog_files Markdown backlogs; a finding that matches a row is listed as tracked
github_repo GitHub owner/name for --pr; empty: read from the origin remote
gitlab_project GitLab project path for --mr
review_bot_users Usernames of review bots on GitLab; rh learn --from-gitlab learns from their findings and your replies
rules_yaml_file A YAML file of per-path review instructions to load into every review

Engines

An engine is a command template in config ([engines.<name>]), so a new CLI can be added without code. Shipped templates:

Engine State
claude, claude-opus Default. Read-only tools
opencode, muse Experimental. Read-only tools
agy, codex Experimental. Tools off
gemini, qwen, kilo Templates only, never run

Every engine call is logged to .radarhound/calls.jsonl with its duration and, when the engine reports it, token usage and cost. The review report totals these on a Tokens: line.

Safety

  • Engines run in a detached git worktree of the head commit, removed after the review. They never run in your working tree.
  • The canary checks that an engine cannot write files or run shell commands before rh will use it.
  • --post prints the API calls it would make and posts nothing.

Tests

python -m unittest discover -s tests

The tests use a fake engine and temporary git repositories. They need git and no model, and take a few minutes.

Contributing

See CONTRIBUTING.md and ROADMAP.md.

Policies

License

MIT

Metadata

Release files for radarhound 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for radarhound 0.1.7
File Size Uploaded Provenance Actions
radarhound-0.1.7.tar.gz 442.3 kB With provenance Details for radarhound-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for radarhound 0.1.7
File Interpreter ABI Platform Actions
radarhound-0.1.7-py3-none-any.whl Python 3 none any Details for radarhound-0.1.7-py3-none-any.whl

Total release size: 701.5 kB

Release files / radarhound-0.1.7.tar.gz

Download URL radarhound-0.1.7.tar.gz
Size 442.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cdce9fb3a4c03043ae1dbc30ed8a26c9e0a8a9794a0d2f7d529d2a6d7b90a7f2
BLAKE2b-256 checksum
How to use checksums
f3127857860f548bacb21c3d2e52dc4dd2609e5bcf9d61142197420b904b0923
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / radarhound-0.1.7-py3-none-any.whl

Download URL radarhound-0.1.7-py3-none-any.whl
Size 259.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe86376545ba60f46175a1f06a1a934e33a0566027b870246f63d200031a99ed
BLAKE2b-256 checksum
How to use checksums
a027f92a9dd937bf1fd217d5b13584f4f2858a46a93b626fc596e385d2b9d05f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for radarhound 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for radarhound-0.1.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page