A local code review tool for giving structured, line-level feedback to AI coding agents — without opening a PR.
Review uncommitted changes in a GitHub-style diff view, leave inline comments, and export a Markdown file you can feed directly back to your AI agent.
After an AI coding agent edits files in your repo, there's no lightweight way to give it precise, line-level feedback. Opening a GitHub PR just to leave review comments on local changes is overkill. Copy-pasting file paths and line numbers into chat is error-prone and loses context.
review-for-agent gives you a familiar PR review UI that runs entirely on your machine and outputs a structured Markdown file the agent can consume.
- GitHub-style diff view — unified or split, powered by @pierre/diffs
- Inline comments — click a line number to comment; shift-click to select a range
- File-level comments — feedback on an entire file, not tied to a specific line
- Global review comment — overall feedback at the top of the review
- Structured export — outputs both JSON and agent-friendly Markdown with diff context snippets
-
Clipboard integration — copies
review my comments on these changes in @rfa/comments_xxxx.mdto your clipboard on submit, ready to paste into your agent - Local — no GitHub, no PRs. Single binary runtime with embedded frontend bundle
Download the latest binary for your platform from the GitHub Releases page.
# macOS (Apple Silicon)
# This creates: dist/review-for-agent-darwin-arm64
unzip review-for-agent_darwin_arm64.zip
mv dist/review-for-agent-darwin-arm64 /usr/local/bin/review-for-agent
# Linux (x86_64)
tar -xzf review-for-agent_*_linux_amd64.tar.gz
mv review-for-agent /usr/local/bin/
# Linux (ARM64)
tar -xzf review-for-agent_*_linux_arm64.tar.gz
mv review-for-agent /usr/local/bin/Requires Go 1.23+.
go install github.com/Waraq-Labs/review-for-agent@v0.5.2git clone https://github.com/Waraq-Labs/review-for-agent.git
cd review-for-agent
make setup
make buildRequires Go 1.23+, Node.js, and pnpm.
# terminal 1
make dev-api
# terminal 2
make dev-webmake dev-web runs Vite and proxies /api/* to http://localhost:4000.
Run from the root of any Git repo with uncommitted changes:
$ review-for-agent
Listening on localhost:4000
Opening http://localhost:4000/review
To bind to a specific host, set RFA_HOST.
$ RFA_HOST=0.0.0.0 review-for-agent
Listening on 0.0.0.0:4000
Opening http://localhost:4000/review
Your browser opens with a diff of all uncommitted changes. Leave comments, then click Submit Review.
Wrote rfa/comments_5ae2.json
Wrote rfa/comments_5ae2.md
The Markdown file path is copied to your clipboard as:
review my comments on these changes in @rfa/comments_5ae2.md
Paste that into your AI agent's chat to have it address your feedback.
| Flag | Description |
|---|---|
--no-open |
Don't auto-open the browser (useful when re-running and refreshing an already open tab) |
-
RFA_HOST: IP/interface to bind the server to. Defaults to all interfaces.- Set
RFA_HOST=0.0.0.0to allow access from other machines on your network.
- Set
Use this to quickly render a template sample without going through the web UI:
# prints sample markdown to stdout
review-for-agent sample-templateIf you use pi, install/load the PI extension from
https://github.com/theonejb/pi-extensions/blob/main/review-for-agent.ts and run /reload.
The extension auto-starts review-for-agent in Git repos and adds /rfa-open to quickly jump back to the active review session in the browser.
- Click a line number to add a single-line comment
- Click a line, then shift-click another to comment on a range
- Click "+ File comment" in a file header for file-level feedback
- Type a global comment in the textarea at the bottom
- Click "Submit Review" to export
The server tries port 4000 first, then increments until it finds a free port.
If there are paths you never want in local review diffs (for example generated frontend bundles), add a .rfaignore file at repo root.
Example:
frontend/build/review-for-agent reads .rfaignore at startup and excludes matching paths when generating tracked and untracked diffs.
Use one pattern per line. Empty lines and lines beginning with # are ignored.
Lockfiles are always excluded by the server, even if they are not listed in .rfaignore:
package-lock.jsonpnpm-lock.yaml
| Command | Description |
|---|---|
make setup |
Install frontend dependencies (pnpm install) |
make dev-api |
Run Go API/server (go run . --no-open) |
make dev-web |
Run Vite dev server |
make build-frontend |
Build frontend/build bundle |
make build |
Build frontend then build Go binary |
make verify-frontend-build |
Rebuild frontend and fail if frontend/build differs from git state |
Comments are written to the rfa/ directory (created if it doesn't exist).
The Markdown output is generated from templates/comments.md.tmpl and is intended for AI-agent consumption.
The exact wording and layout are intentionally template-defined and may evolve over time.
review-for-agent treats Markdown as a human/agent-readable handoff artifact, not a strict machine contract. For exact current output, use:
-
templates/comments.md.tmpl(source template) -
review-for-agent sample-template(quick preview)
The JSON file contains the raw structured data for programmatic use:
{
"globalComment": "Overall, nice progress but a few things to address.",
"comments": [
{
"file": "src/api/handler.ts",
"startLine": 42,
"endLine": 42,
"side": "right",
"body": "Add error handling here — what happens if the fetch fails?"
}
]
}- Git
- A modern web browser
MIT
