Review your changes from the terminal, before the pull request.
The HeyDeer CLI is an AI code review CLI for the moment before you open a pull request. Run heydeer review with a sentence about what the change is meant to do, and HeyDeer reviews your branch and your uncommitted changes, verifies each finding against the code, and prints what it found in the terminal.
No seat fees · 2-click install · Free plan
$ heydeer review "Retry failed uploads. Fixes #123."Repository acme/uploaderBase origin/main, merge base 3f9c2a1eHead retry-uploads at 8b1d07c4, with uncommitted changesCovers all the changes, as it's the branch's first reviewDepth standard Sending 3 files (+86 −14) M src/upload/retry.ts +61 −9 M src/upload/client.ts +12 −5 A src/upload/retry.test.ts +13 −0 1 finding ─────────────────────────────High Retry loop never stops on a 404src/upload/retry.ts:42
From install to your first local code review
- 1
Install
npm install -g heydeer. The CLI needs Node.js 22 or later. - 2
Sign in
heydeer loginprints a link and a code. Sign in to HeyDeer with GitHub and enter the code;heydeer statusshows who the CLI acts as. - 3
Describe the change
heydeer review "Retry failed uploads. Fixes #123."HeyDeer reads the description like a pull request’s, including the issues it mentions. - 4
Fix and run again
The next run rechecks the findings the last one left open, so you see what your fix resolved.
What a local review covers
heydeer review compares your work with the merge base against origin’s default branch: the commits on your branch plus uncommitted changes to tracked files. That makes it a way to review code before a pull request exists, and even before you commit.
Uncommitted changes
Staged and unstaged edits to tracked files are reviewed with your commits. Add
--include-untrackedto bring in new files that aren’t gitignored.Another base
--base release/2.4compares against another branch or commit, for work that targets something other than the default branch.Only what changed since
When the repository reviews only new changes, later runs on a branch cover just what changed since its last full review, and every few runs HeyDeer reviews it all again.
--fulldoes that at any time.Standard or Deep
The CLI uses the repository’s review depth.
--depth deepor--depth standardpicks another for one run; Deep is on paid plans.A preview first
--dry-runlists the files that would be sent and the ones that stay on your machine, without signing in or using credits.Secrets stay local
.envfiles, private keys, diffs with a detected credential and binary files are left out and listed under “Left on this machine”.
Let your coding agent review its own work
With --json, the finished review goes to stdout as JSON and the progress goes to stderr, so a script or a coding agent reads exactly one object. Each finding has a severity, a title, a file and line, and a body that explains it. Put an instruction like this in your AGENTS.md or CLAUDE.md, and Claude Code, Codex or Cursor runs the review and fixes what it finds before it opens the pull request.
## Before opening a pull request
Run `heydeer review --json "<what this change does and the issue it fixes>"`
from the repository root. Fix every finding in `result.publicationFindings`
that you agree with, then run it again. Mention any finding you leave open,
and why, in the pull request description.In a script, the same JSON lists the findings in one line each. The command exits with 0 once the review finishes, findings or not, so read the findings rather than the exit code when deciding whether a branch is ready.
heydeer review --json --description-file pr.md > review.json
jq -r '.result.publicationFindings[]? | "\(.severity) \(.path // "-"):\(.line // "-") \(.title)"' review.jsonThe same reviewer on the pull request
A local review is a head start, and the pull request still gets its full review. When you push, HeyDeer reviews the pull request on GitHub with the same REVIEW.md, AGENTS.md and checks, posts inline comments with fixes you can commit, and can turn findings into a tested fix with Fix with HeyDeer.
Requirements
A repository on GitHub with HeyDeer installed, and write access to it. Each review uses your workspace’s credits.
Built for agent branches
Code from coding agents gets a second look from a reviewer separate from the agent that wrote it. See AI-generated code review.
Cancel any time
Ctrl+C cancels the review on HeyDeer as well as in your terminal. A second Ctrl+C stops the CLI at once.
Frequently asked questions
What does heydeer review send to HeyDeer?
heydeer review sends the diff of your branch and its uncommitted changes against the merge base with origin’s default branch, plus your description. The merge base is already on GitHub, so only the patch leaves your machine. Credential files such as .env and private keys, diffs that contain a detected secret, binary files and very large changes stay local. Run heydeer review --dry-run to see the exact list first.
Does the HeyDeer CLI review uncommitted changes?
The HeyDeer CLI reviews uncommitted changes to tracked files together with the commits on your branch, so you can review before you commit. Add --include-untracked to also review new files you haven’t added to Git yet, as long as they aren’t gitignored.
How are local reviews charged?
A local review uses your workspace’s credits and is charged like any HeyDeer review: for the work it does, with Deep using more than Standard. Local reviews are billed as private code in every repository. A dry run, and a run where nothing changed since the branch’s last review, start no review and use no credits.
Can I run the HeyDeer CLI as a pre-commit hook?
The HeyDeer CLI is built for the step before a pull request rather than for every commit. A review investigates the change and verifies each finding, so it takes minutes, longer than a pre-commit hook should hold up a commit. Run it when the branch is ready to push, or have your coding agent run it before it opens the pull request.
What do the exit codes mean?
heydeer review exits with 0 when the review finished, whether or not it has findings, and with 1 when it failed or every changed file had to stay on your machine. Usage errors exit with 2, and canceling with Ctrl+C exits with 130. To act on findings in a script, read them from --json.
What do I need to use the HeyDeer CLI?
You need Node.js 22 or later, a repository on GitHub with HeyDeer installed, and write access to that repository. Install with npm install -g heydeer, then sign in with heydeer login using your GitHub account.
More from HeyDeer
- Pull request reviewsEvery finding checked against your code before it’s posted.
- Fix with HeyDeerTurn findings into a tested fix pull request.
- AutopilotFixes findings, requests, failing checks and conflicts until the PR is ready.
- Rules and checksREVIEW.md, AGENTS.md and checks HeyDeer verifies on every PR.
- Security reviewSecurity findings, leaked secrets and a security count on every PR.
- Coding agent PRsReview what Claude Code, Codex and Cursor write before it merges.
- Teams with reviewersHeyDeer checks the details so reviewers can focus on design.