Skip to main content

Independent AI peer review of git diffs for Claude Code and other coding agents

Project description

fresh-eyes

Independent AI peer review of git diffs, designed for use alongside Claude Code (or any coding agent). Sends your latest changes to a different model so you get a second opinion with different blind spots from the one that wrote the code.

Install

uv tool install fresh-eyes

Or from a local checkout:

uv tool install --from . fresh-eyes

This installs two equivalent commands: fresh-eyes (canonical) and fe (typeable alias).

Setup

fresh-eyes calls three independent reviewers (Gemini, Mistral, DeepSeek). Export a key for each one you want to use — the tool runs whichever providers have keys set. At least one is required.

export GEMINI_API_KEY=your-key-here       # https://aistudio.google.com/apikey  (free tier)
export MISTRAL_API_KEY=your-key-here      # https://console.mistral.ai          (paid)
export DEEPSEEK_API_KEY=your-key-here     # https://platform.deepseek.com       (paid)

Reviewer selection

  • Whichever *_API_KEY env vars are set decides which reviewers run. Set all three for the strongest review (different blind spots compound); set one for a quick check.
  • --only <gemini|mistral|deepseek> runs a single reviewer for the current invocation, even if other keys are set.
  • Override the default model for any reviewer with FRESH_EYES_GEMINI_MODEL, FRESH_EYES_MISTRAL_MODEL, or FRESH_EYES_DEEPSEEK_MODEL.

Activation

fresh-eyes is opt-in per repo, so it doesn't fire in every git repo you cd into. Enable it once per repo:

fresh-eyes --init      # enables fresh-eyes in this repo (writes .git/fresh_eyes_enabled)
fresh-eyes --disable   # disables it again

Running any other command in a non-activated repo prints a friendly message and exits without making API calls.

Usage

From inside an activated git repository:

fresh-eyes                      # review the last commit (HEAD~1..HEAD)
fresh-eyes --since HEAD~3       # review the last 3 commits
fresh-eyes --since abc1234      # review since a specific commit
fresh-eyes --since main         # review everything on this branch since it diverged from main
fresh-eyes --full               # shortcut: diff entire branch against the default branch
fresh-eyes --all                # one-time baseline: review the entire current codebase
fresh-eyes --staged             # review staged-but-uncommitted changes

fe is the short alias — fe --since HEAD~3 works identically.

--since accepts anything git rev-parse resolves: SHAs, branch names, tags, HEAD~N. This is how Claude Code can scope a review around the actual unit of work rather than a fixed window.

Adding intent and trimming context

By default the reviewer sees the diff hunks and the full post-change content of every changed file, so it can see callers, types, and surrounding code without hallucinating about what's outside the hunk. What it does not know is what the change is supposed to do — pass --context for that.

fresh-eyes --context "Adds rate limiting to the /login endpoint. Should reject >5 req/min per IP."
fresh-eyes --context-file SPEC.md          # read intent from a file (relative to CWD)
fresh-eyes --diff-only                     # send only diff hunks, skip full files (trim tokens)
fresh-eyes --since HEAD~3 --context "Refactors auth to use the new token store"

Use --context to tell the reviewer the author's stated goal — the prompt asks it to use this for grading "does the diff do what the author claims?" while still surfacing out-of-scope issues. Use --diff-only to drop the full-file attachments when you know the diff is self-contained or the changed files are very large (cuts token cost on paid providers).

Claude Code integration

Copy the slash command files from this repo into your Claude Code commands directory:

cp commands/fresh-eyes.md commands/fe.md ~/.claude/commands/

You can now invoke /fresh-eyes or /fe in a Claude Code session. The command tells Claude to run the CLI (forwarding flags like --since HEAD~3 when the request implies a specific baseline), read its output, synthesize the findings against the current task context, and raise genuine concerns before continuing.

How it works

  • Stateless: every invocation is explicit about scope. Default is the last commit; pass --since <commit> for anything else. No review-history markers, no hidden state about previous runs.
  • One model per run today (Gemini 2.5 Flash). The output is emitted under a ## Gemini 2.5 Flash header so a future second reviewer can be added without changing the format.
  • Noise filtering: lockfiles, minified assets, and dist//build/ are excluded from the diff so they don't burn tokens.
  • Size guard: bails out with a message (exit 0) if the assembled prompt (diff + optional intent + optional full files) exceeds ~100k estimated tokens.

Exit codes

Code Meaning
0 Review ran successfully, OR diff was too large to send (the tool reports; it does not gate)
1 --since commit not found, or other git error
2 Missing/invalid GEMINI_API_KEY

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fresh_eyes-0.5.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fresh_eyes-0.5.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file fresh_eyes-0.5.0.tar.gz.

File metadata

  • Download URL: fresh_eyes-0.5.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fresh_eyes-0.5.0.tar.gz
Algorithm Hash digest
SHA256 77c62030dadb0ddd494822dacb3231da69ec5a81537570114cbab28f1a490bfc
MD5 eb7c454278f312a86b5fcff87d43bf79
BLAKE2b-256 7c6951595ca9cd24e5115c6312f073657aae8bebcb02d7e06bffe59b4178c9c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for fresh_eyes-0.5.0.tar.gz:

Publisher: release.yml on lucasgerads/fresh-eyes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fresh_eyes-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: fresh_eyes-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fresh_eyes-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ad1c24c27cd3adca577b27d73d8034ba1ed2ead06ce6d8771c3dde7f79d7cfc
MD5 8390aa02f62c659766ee9c781a5ef768
BLAKE2b-256 bca4837116fe615456e15b1a7725eddef0754124e30b78edc931d7c1240ae33f

See more details on using hashes here.

Provenance

The following attestation bundles were made for fresh_eyes-0.5.0-py3-none-any.whl:

Publisher: release.yml on lucasgerads/fresh-eyes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page