How do you keep up with AI generated PRs? Answer: use AI assisted code reviews.
- List, comment, approve PRs involving your GitHub account;
- Start interactive AI assisted review session, let it learn your code review approach;
- Preview the launched tmux-backed review agent from the PR detail
Agenttab; - Run reviewer as daemon to kick off reviews as they are created;
# Homebrew (macOS)
brew tap daulet/tap
brew install reviewer
# From source
cargo install --git https://github.com/daulet/reviewer- GitHub CLI (
gh) - authenticated withgh auth login
| Tool | Purpose | Install |
|---|---|---|
| delta | Enhanced diff rendering (side-by-side, syntax highlighting) | brew install git-delta |
| Codex CLI | AI-assisted code reviews (OpenAI) | npm install -g @openai/codex |
| Claude Code | AI-assisted code reviews | npm install -g @anthropic-ai/claude-code |
| tmux | Launch and preview review agent sessions | brew install tmux |
The diff tries to use delta if installed. Choice of code reviewer tool can be configured in ~/.config/reviewer/config.json.
For AI-assisted reviews, set up a code-review skill and pick a provider.
We keep a single skill definition under .claude/skills/code-review/SKILL.md and reuse it
for both providers. This repo includes .codex/skills/code-review/SKILL.md, so Codex will
pick it up when you run Codex from the repo root. If you prefer a global install, copy it
into ~/.codex/skills:
mkdir -p ~/.claude/skills/code-review
cp .claude/skills/code-review/SKILL.md ~/.claude/skills/code-review/
mkdir -p ~/.codex/skills/code-review
cp .claude/skills/code-review/SKILL.md ~/.codex/skills/code-review/Restart Codex after adding skills. In a Codex session, run /skills to confirm the
code-review skill is available, then invoke it with $code-review.
Note: Reviewer launches the AI tool from the PR worktree, so repo-local .codex/skills
in this repo won't be visible to Codex unless you install the skill globally.
Claude Code
Add to ~/.claude/settings.json:
{
"permissions": {
"allow": [
"Read(path:~/.config/reviewer/**)"
]
},
"sandbox": {
"excludedCommands": ["gh"]
}
}Codex CLI
This repo includes .codex/config.toml and .codex/rules/reviewer.rules with conservative
defaults and allowlists for common review commands. If you want global defaults, mirror
them in ~/.codex/config.toml and ~/.codex/rules.
prefix_rule(
pattern = ["gh", "pr", ["view", "comment", "review"]],
decision = "allow",
)
prefix_rule(
pattern = ["gh", "api"],
decision = "allow",
)
prefix_rule(
pattern = ["gh", "repo", "view"],
decision = "allow",
)
prefix_rule(
pattern = ["git", ["diff", "merge-base", "rev-parse"]],
decision = "allow",
)
Create ~/.config/reviewer/review_guide.md to customize what the AI looks for:
## Focus Areas
- Security vulnerabilities
- Performance issues
- Error handling
## Skip These
- Unused imports
- Minor style issuesThe AI learns from skipped comments and offers to update this file automatically.
reviewer # Open PR list tabs (defaults to "Involving Me")
reviewer -d # Include draft PRs
reviewer -r ~/dev # Specify local repos root for worktrees
reviewer -e archived -e old # Exclude directories for repo-scan commands
reviewer --my # Start on "My PRs" tab (same as -m)
reviewer trigger https://github.com/org/repo/pull/1234
reviewer trigger org/repo#1234
reviewer trigger --repo org/repo --pr 1234
reviewer trigger --repo-path ~/dev/org-repo --pr 1234
reviewer daemon init # Pick repos to monitor
reviewer daemon run # Start daemon polling loop
reviewer daemon status # Show daemon state/countersThe interactive PR list loads directly from GitHub for Involving Me and My PRs
and does not scan local clones on startup. The Watching Repos tab uses local
repo discovery plus daemon repo/path filters. Local clones are also used by daemon
polling, explicit reviewer trigger runs, and worktree-backed AI review launches.
The list view has three tabs:
Involving Me: open PRs involving your account.My PRs: open PRs authored by your account (enablesmin detail view to squash-merge mergeable PRs).Watching Repos: open PRs from repos/paths configured byreviewer daemon init(daemon.exclude_repos+daemon.repo_subpath_filters).
In list view, use Tab/Shift+Tab (or ←/→, or 1/2/3) to switch tabs.
Use --my (or -m) to start directly on the My PRs tab.
reviewer trigger launches a review session for an explicit PR and bypasses
the list-mode draft/approved filters.
Daemon notes:
- On first daemon setup, reviewer shows an interactive checkbox list of repos and saves exclusions by
owner/repo. - In daemon init UI, press
fon a selected repo to open a subdirectory tree popup. Usej/k(or arrows) to move,Enterto expand/collapse, andSpaceto mark paths. - Existing open PRs are seeded as already seen during init, so only newly opened PRs trigger.
- PR updates do not retrigger review; tracking is persisted in
~/.config/reviewer/daemon_state.json. - Failed launches are retried on subsequent polls until they succeed.
- Long-running daemon processes auto-restart after binary upgrades (detected on poll boundaries).
- Optional
daemon.repo_subpath_filterslets you restrict a repo to PRs touching specific subpaths. Omit a repo (or set an empty list) to monitor all PRs in that repo. - Optional
daemon.auto_approverules auto-approve PRs when both repo and author match. Matching is case-insensitive, supports*(any sequence) and?(single character), and applies only to non-self-review daemon triggers. - Optional
daemon.only_new_prs_on_startcontrols first-run behavior: whentrue(default), daemon init seeds currently open PRs as seen so only PRs opened after first launch are processed. Later restarts still process PRs opened while daemon was down. - Daemon also triggers self-reviews for PRs authored by your account (non-drafts only).
Set
ai.launch.self_review_stepsto customize launch commands for those sessions.
Testing-only utility to validate terminal launch behavior (tab/window/session execution).
reviewer harness --terminal-app Ghostty --terminal-launch-mode same-space --runs 3
reviewer harness --terminal-app Ghostty --terminal-launch-mode new-tab --runs 3Config is stored at:
- macOS/Linux:
~/.config/reviewer/config.json - Windows:
%APPDATA%\reviewer\config.jsonUnknown fields are rejected on startup (for example, config key typos).
AI settings are optional. prompt_template supports {pr_number}, {repo}, {title},
{review_guide}, and {skill} placeholders.
Review launching is configured via ai.launch.steps, an ordered list of commands.
Each step runs with the PR worktree as cwd. Common placeholders:
{workdir},{workdir_shell}{repo},{repo_slug},{pr_number},{title}{prompt},{review_guide}{tool}(AI CLI binary),{tool_command}(shell-escaped full invocation with prompt){session_title},{timestamp_ms}{provider},{skill_name},{skill_invocation}
Reviewer no longer has built-in launcher presets; define launcher behavior in config. Daemon state is stored separately in:
- macOS/Linux:
~/.config/reviewer/daemon_state.json - Windows:
%APPDATA%\reviewer\daemon_state.json
{
"repos_root": "/path/to/your/repos",
"exclude": ["archived", "vendor"],
"exclude_users": ["@apps/*", "dependabot", "github-actions"],
"daemon": {
"poll_interval_sec": 60,
"exclude_repos": ["org/legacy-repo"],
"repo_subpath_filters": {
"org/monorepo": ["services/payments", "infra/terraform"],
"org/full-repo": []
},
"auto_approve": [
{"repo": "org/reviewer", "user": "dependabot[bot]"},
{"repo": "org/*", "user": "*[bot]"},
{"repo": "org/monorepo", "user": "renovate[bo?]"}
],
"only_new_prs_on_start": true,
"initialized": true,
"include_drafts": false
},
"ai": {
"provider": "codex",
"command": "codex",
"args": [],
"skill": "code-review",
"prompt_template": "Review PR #{pr_number} in {repo}. Title: \"{title}\". Use {skill}. Follow {review_guide}",
"launch": {
"backend": "tmux",
"tmux": {
"session": "reviewer",
"reuse_existing": true
}
}
}
}The native tmux launcher creates one window per PR using a stable name like nvidia-lpu-cyborg-pr-199. The TUI Agent tab previews that pane with tmux capture-pane; press Enter or A from the tab to attach/switch to it.
exclude_users filters PR authors from the TUI list and daemon review/self-review triggers. Patterns are case-insensitive, a leading @ is optional, and */? wildcards are supported. Exact user entries are also sent to GitHub search as -author:<login> and -author:app/<login> so excluded users do not consume page slots. @apps/* only matches GitHub bot/app actors, so it will not hide normal users. Auto-approve rules are evaluated before this filter, so excluded users can still be auto-approved when they match daemon.auto_approve.
Terminal.app (macOS, new window) launch example:
{
"ai": {
"provider": "codex",
"command": "codex",
"launch": {
"steps": [
{
"command": "osascript",
"args": [
"-e",
"tell application \"Terminal\" to activate",
"-e",
"tell application \"Terminal\" to do script \"cd {workdir_shell} && exec {tool_command}\""
]
}
]
}
}
}Ghostty (macOS, new instance) launch example:
{
"ai": {
"provider": "codex",
"command": "codex",
"launch": {
"steps": [
{
"command": "open",
"args": [
"-na",
"Ghostty",
"--args",
"-e",
"bash",
"-lc",
"cd {workdir_shell} && exec {tool_command}"
]
}
]
}
}
}Linux terminal launch example (gnome-terminal):
{
"ai": {
"provider": "codex",
"command": "codex",
"launch": {
"steps": [
{
"command": "gnome-terminal",
"args": [
"--",
"bash",
"-lc",
"cd {workdir_shell} && {tool_command}; exec bash"
]
}
]
}
}
}MIT
