herdr-reviewr

persiyanovMIT活跃维护

在终端面板里审阅 AI 编码代理产出的代码 diff,把评论直接回传给 Claude Code、Codex 等代理,省去切换窗口的麻烦。

Review your agent's diff in a terminal pane and send comments back to Claude Code, Codex, OpenCode or Pi. A herdr plugin.

v0.52.1发布于 2026-11-08 16:32 UTC981star +5 / 7 天117fork同步于 2026-11-11 05:49 UTC

怎么上手

由 README 提炼,执行前请确认
herdr plugin install persiyanov/herdr-reviewr
硬件要求按 README 说明

README 未说明显存或 GPU 要求;需要支持 24 位色的终端,可在 macOS、Linux、Windows 上运行。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

在终端侧栏审阅 AI 代理的代码改动,逐行写评论并一键回传给代理

在终端面板里审阅 AI 编码代理产出的代码 diff,把评论直接回传给 Claude Code、Codex 等代理,省去切换窗口的麻烦。

核心能力

  • 在聊天旁并排显示代理改动并做语法高亮
  • 支持未提交、分支、上一轮、指定提交四种 diff 范围
  • 按行或按范围写评论,一次性发送给代理
  • 内置文件搜索、文件内查找与 Markdown 渲染预览
  • 支持统一/分栏视图、20 套主题与鼠标拖选复制

容易踩的坑

需先安装 herdr ≥ 0.9.3 和 git;PR 标签页还需登录 gh、glab 或 az(含 azure-devops 扩展);脱离 herdr 单独运行 release 二进制时,Send 和 last turn 范围不可用;分栏视图需要终端至少 137 列。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.52.1
  1. v0.52.1herdr-reviewr 0.52.1最新正式版2026-11-08 · 2026-11-08 16:32 UTC

    Changed

    • Dependencies refreshed and built with Rust 1.99.1, including the file watcher's macOS and Linux fixes (notify 9.0.0-rc.7). Thanks @mitja-kleider (#164).
  2. v0.52.0herdr-reviewr 0.52.02026-11-08 · 2026-11-08 11:06 UTC
    查看更新说明

    Changed

    • Toggle, open and close act on your own reviewr: the one in the focused tab, or with tab placement your worktree's reviewr tab. Toggle closes a reviewr you can see, takes you to one you can't, and opens one if there's none. Thanks @jmoreno-blr (#114).
    • Send goes straight to the agent beside reviewr: the only agent in the workspace, else the only one in reviewr's tab. Otherwise the picker opens as before. Thanks @black-snow (#160).
    • The agent picker names agents by their pane's label, so several Claude Code panes no longer all read claude. Thanks @199nishikawa (#133).
    • Breaking: S opens the agent picker (send-to) instead of sending. A config that binds S to any action now collides with it and must move one of them.

    Added

    • A collapsed folder in Changes shows its line totals, +N −M for everything inside it. Thanks @Zahlii (#161).

    Fixed

    • reviewr no longer opens with stray borders. The toggle asks herdr to size a fresh pane at once (herdr#3799 left it cropped for its first frames), and the repo loads in the background, so the pane answers keys and resizes while it loads. Until the repo is in, the file list shows nothing rather than "no changes", and a failed load says so.
  3. v0.51.0herdr-reviewr 0.51.02026-11-07 · 2026-11-07 19:54 UTC
    查看更新说明

    Added

    • switch-pane rebinds the pane switch, tab by default, so h or any other key can move between the file list and the diff. Thanks @ianptkcs (#89).
    • scrolloff keeps lines of context around the diff cursor: 3 by default, 0 for the old edge, 999 to stay mid-pane. Thanks @AnteWall (#166).

    Changed

    • Find steps, hunk steps and comment jumps center a target off screen, as :N and search picks do. Thanks @spion (#156).

    Fixed

    • alt+backspace, alt+delete and alt+d delete a word in every text field, the : line field included, and other alt chords no longer type a letter. Thanks @reobin (#145).
  4. v0.50.1herdr-reviewr 0.50.12026-11-07 · 2026-11-07 16:23 UTC
    查看更新说明

    Security

    • reviewr's git calls run no fsmonitor program and no git hooks, so a planted .git/config or hook no longer runs when a pane refreshes. Thanks @mitja-kleider (#163).

    Fixed

    • With toggle_placement = "tab", toggle and open show reviewr's new tab again. Since herdr 0.9 the tab opened behind the one on screen. Thanks @jfmainville (#132).
    • The PR tab finds the pull request behind an SSH host alias, such as git@github-work:owner/repo.git for a second GitHub account. reviewr reads the real host from your ssh config, as gh does. Thanks @csjoshc (#169).
    • The PR tab finds a gh, glab, or az installed by Homebrew on Linux, even when herdr's server started without your shell's PATH. Thanks @baozich (#165).
  5. v0.50.0herdr-reviewr 0.50.02026-11-07 · 2026-11-07 15:04 UTC
    查看更新说明

    Changed

    • Switching between Changes and All files keeps your file and line when the other tab lists the file. follow_file_across_tabs = false gives each tab its own place, as before.
    • Picking the open file in search keeps your place, as a click in the file tree does.

    Fixed

    • A search hit inside a collapsed <details> opens it and lands on its line.
    • A search pick of a file created moments ago stays open when the file tree catches up.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Moshi: Terminals weren’t made for phones. Moshi is.

    A mobile terminal designed for AI coding agents.

    herdr-reviewr

    CI Release License

    A code-review pane for herdr. Read your agent's diff beside the chat, comment on lines, and send the comments back.

    demo

    • Diff review — the agent's changes, syntax-highlighted.
    • Unified and split views — one column or side by side, flip with |.
    • Four diff scopes — uncommitted, branch, last turn, commits.
    • Last-turn diff — only what the agent's latest turn changed.
    • Line comments — on a line or a range, sent to the agent in one go.
    • Text selection — drag to copy, like an editor.
    • File viewer — any file in the worktree.
    • Worktree switch — follow your agent into another worktree with W.
    • Search — files by name and code by content, powered by fff.
    • Find in file — step through every match.
    • PR view — the branch's pull request, read-only.
    • Markdown review — m renders a .md file.
    • Themes — 20, dark and light.

    reviewr never edits your files, never sends on its own, and never posts to your PR.

    Requirements

    • herdr ≥ 0.9.3 and git.
    • A terminal with 24-bit color.
    • macOS, Linux, or Windows.
    • For the PR tab only: gh, glab, or az (with the azure-devops extension), logged in.

    Install

    herdr plugin install persiyanov/herdr-reviewr
    

    reviewr opens on its own when herdr creates a workspace for a worktree. To open it yourself:

    herdr plugin action invoke open --plugin persiyanov.reviewr
    

    To update, reinstall. Your config stays:

    herdr plugin uninstall persiyanov.reviewr && herdr plugin install persiyanov/herdr-reviewr
    

    Without herdr, run a release binary on any repo. Everything but Send and the last turn scope works:

    herdr-reviewr ~/some/repo
    

    Quick start

    1. Pick a file. j / k in the file list, or ] to jump from change to change.
    2. Focus the diff. Tab.
    3. Select lines. v, then j / k, or drag the line numbers.
    4. Comment. c, type, Enter.
    5. Send. s puts every comment in the agent's input: the only agent, or the one beside reviewr. S lets you pick.

    The footer shows the next step, and the worktree you're on at its right. ? lists every key.

    To toggle reviewr with a key, add this to ~/.config/herdr/config.toml:

    [[keys.command]]
    key = "cmd+r"   # many macOS terminals swallow alt+
    type = "plugin_action"
    command = "persiyanov.reviewr.toggle"
    

    On Windows, cmd is the Windows key, and Windows takes cmd+r first. Use another key, such as prefix+f. A key for a remote machine goes in that machine's config.toml, because custom commands belong to the server where the panes run. Choose reload config in herdr's menu to apply it.

    Controls

    Every key can be rebound (Keybindings).

    Getting around

    KeyAction
    1 2 3Tab: Changes / All files / PR
    u b t gScope: uncommitted / branch / last turn / commits
    BPick the base branch
    GPick commits
    WSwitch to another worktree of this repo
    j k · ↑ ↓Move
    ] [Next / previous change
    f FNext / previous file
    PageUp PageDownPage
    Ctrl+U Ctrl+DHalf page
    TabSwitch pane
    → ←Expand / collapse, or scroll sideways
    /Search files and code
    Ctrl+FFind in file
    :Go to line (:0 first, :$ last)
    wWrap lines
    mRendered / source markdown
    |Unified / split diff (needs 137 columns)
    pMove the file list
    zHide / show the file list
    < >Widen / narrow the file list
    rRefresh
    ?All keys
    qQuit (asks if comments are unsent)
    QQuit and drop unsent comments

    Reviewing

    KeyAction
    vSelect lines
    cComment
    eEdit the comment, or open the file in your editor
    dDelete comment
    n NNext / previous comment
    lList comments
    sSend comments to the agent beside reviewr, or pick one
    SPick the agent, then send
    yCopy comments
    escClear selection

    Comment box

    KeyAction
    EnterSave
    EscCancel
    Shift+Enter · Alt+Enter · Ctrl+JNew line

    The usual editing keys work: arrows, Home / End, Ctrl+A / Ctrl+E, Alt+b / Alt+f, Ctrl+W / Ctrl+U / Ctrl+K.

    PR tab

    KeyAction
    j kMove through description and comments
    PageUp PageDownScroll
    oOpen in browser
    rRefresh

    Mouse: drag to copy, double-click a word, triple-click a line. Click or drag line numbers to comment. Click files, tabs, and links. Scroll with the wheel.

    The three tabs

    • Changes — files the current scope changed.
    • All files — every file in the worktree. You can comment here too. Git-ignored files are dimmed.
    • PR — the branch's pull request (merge request on GitLab): state, checks, description, comments.

    Switching between Changes and All files keeps your file and line when the other tab lists the file. follow_file_across_tabs = false gives each tab its own place instead.

    Diff scopes

    • uncommitted — changes since the last commit, including new files.
    • branch — everything since the branch left its base, commits included. The base is the default branch until you pick another (Base branch).
    • last turn — changes since the agent's latest turn started.
    • commits — one commit or a range, picked with G.

    reviewr starts in uncommitted (default_scope changes that). Git-ignored files never show in Changes.

    Configuration

    Flags on the pane command:

    FlagDefaultMeaning
    --base <ref>autobase for the branch scope, overrides the pick
    --theme <name>catppuccincolor theme
    --wrap <on|off>onwrap long lines

    Everything else goes in ~/.config/herdr/plugins/config/persiyanov.reviewr/config.toml. Saving it applies at once. An invalid file blocks the pane with the error until you fix it.

    theme = "tokyo-night"
    default_scope = "branch"            # uncommitted | branch | last-turn
    markdown_view = "rendered"          # source | rendered
    diff_view = "split"                 # unified | split
    navigator_position = "bottom"       # right | bottom | left | top
    toggle_placement = "overlay"        # split | overlay | zoomed | tab
    toggle_direction = "down"           # right | down, for split
    auto_open = false
    follow_file_across_tabs = false
    scrolloff = 0                       # lines kept around the diff cursor, 3 by default; 999 centers
    editor = "code -g {file}:{line}"
    url_opener = "browser-bridge --new-tab {url}"
    review_prefix = "Fix each comment, then run the tests."
    github_host = "github.example.com"
    gitlab_host = "git.corp.example"
    azure_devops_host = "tfs.corp.example"
    
    [keybindings]
    comment = ["c", "ㅊ"]
    

    Theme

    Dark: catppuccin, catppuccin-frappe, catppuccin-macchiato, dracula, nord, gruvbox, one-dark, solarized, monokai, tokyo-night, rose-pine, ayu, everforest.

    Light: catppuccin-latte, gruvbox-light, one-light, solarized-light, github-light, tokyo-night-day, rose-pine-dawn.

    Pick one that matches your terminal's background. Shared names match herdr's colors.

    Markdown and diff view

    m and | stick for every file you open until you press them again. markdown_view and diff_view set how a new pane starts.

    Split needs a diff pane 137 columns wide: hide the file list (z), move it below (p), or open reviewr zoomed or as an overlay. A narrower pane shows unified until it widens.

    File list

    navigator_position or p moves it. < / > or dragging its edge resizes it. z hides it.

    Base branch

    The branch scope compares against the repo's default branch. To pick another, press B or click the base name in the header. Type to filter, or type any commit reference like HEAD~2. The pick holds for this worktree until you change it. --base overrides it.

    Editor

    e opens the file at your line in $VISUAL, $EDITOR, or git's core.editor. Common editors open at the right line. A terminal editor takes the pane until you quit. For anything else, set editor; {file} and {line} are filled in.

    URL opener

    Links open with open, xdg-open, or the Windows default browser. Under herdr --remote, set url_opener to something that reaches your browser. The URL is passed as one argument, never through a shell, so don't use ssh host open {url}.

    Review prefix

    review_prefix goes above your comments on every send and copy. It arrives as pasted text, so Claude Code won't run a /command in it. To run one, type it in the agent's input before you press s.

    Keybindings

    Each action takes a list of keys that replaces its defaults. The footer shows the first. Extra keys help non-Latin layouts: bind the character your layout types on the same key.

    ActionDefault
    down / upj / k
    next-hunk / prev-hunk] / [
    next-file / prev-filef / F
    switch-panetab
    scope-uncommitted / scope-branch / scope-last-turn / scope-commitsu / b / t / g
    base-pick / commit-pickB / G
    worktree-pickW
    tab-changes / tab-all-files / tab-pr1 / 2 / 3
    wrapw
    renderedm
    split|
    navigator-positionp
    navigator-hidez
    navigator-grow / navigator-shrink< / >
    selectv
    commentc
    edit / deletee / d
    next-comment / prev-commentn / N
    commentsl
    search/
    findctrl+f
    goto-line:
    keys?
    sends
    send-toS
    copyy, Y
    open-pro
    refreshr
    quitq
    quit-discardQ

    A key is one character, a named key (tab, left, right, up, down, pageup, pagedown), or a ctrl+ / alt+ chord. Esc and Enter are fixed.

    GitHub, GitLab, and Azure DevOps

    The PR tab reads the upstream remote, else origin, so forks work. Self-hosted servers need github_host, gitlab_host, or azure_devops_host, matching the remote's hostname exactly. An SSH alias like github.com-work resolves through your ssh config to the host it stands for.

    Pane placement

    The toggle opens reviewr right of your agent. toggle_placement changes that: overlay covers the tab, zoomed fills it, tab opens a new one.

    Each tab gets its own reviewr; with tab placement, each worktree gets its own reviewr tab. The toggle closes your reviewr when you can see it, takes you to it when you can't, and opens one when there's none. close closes yours.

    reviewr opens on its own in a new worktree's workspace, with split or tab only, and leaves your agent focused. auto_open = false turns that off.

    Layouts

    To place reviewr in a herdr layout, give a pane command = "herdr-reviewr". If ~/.local/bin isn't on your PATH, use ~/.local/state/herdr/plugins/persiyanov.reviewr/bin/herdr-reviewr. On Windows, point it at the plugin's own bin folder.

    Limitations

    • Colors need a 24-bit terminal, and the theme must be matched to the background by hand.
    • Added and removed lines differ only by color.
    • Copying needs pbcopy, wl-copy, xclip, or xsel (Windows needs none). Send works without.
    • Windows: a reviewr started by hand in a PowerShell pane isn't recognized, so toggle opens another. Toggle may open on the pane's launch folder, not where you cd'd.
    • Network drives send no file events. macOS and Linux check every five seconds. On Windows, press r.
    • Send needs an agent in the workspace, and refuses one at a permission prompt. Your comments stay. With several agents, it goes to the only one in reviewr's tab, else it asks.
    • last turn shows all of a turn or nothing. If the agent writes the instant a turn starts, the scope shows nothing for that turn and says why.
    • The PR tab supports GitHub, GitLab, and Azure DevOps only. A merged or closed PR shows as history. Each comment list shows its newest 100.
    • A background pane catches up 30 seconds after a change, or at once when shown.
    • A rename can pair with the wrong file until you press r.
    • Comments live only in the pane. Closing it loses unsent ones. Send delivers all or none.
    • Comments don't follow moved code. reviewr marks them stale instead of dropping them.
    • Files over 2 MB or 50,000 lines aren't diffed. Neither are binary files.

    Building from source

    See CONTRIBUTING.md. To run your build in herdr:

    git clone https://github.com/persiyanov/herdr-reviewr
    cd herdr-reviewr
    just install   # build to bin/herdr-reviewr, re-signed on macOS
    herdr plugin uninstall persiyanov.reviewr
    herdr plugin link .
    

    Toggle the pane off and on after every just install.

    Roadmap

    JSON export, marking files reviewed, more named keys, automatic light/dark theme, more themes (kanagawa, vesper, a dark github), a theme that follows the terminal, copying through the terminal.

    Sponsors

    reviewr is built by one person. If it saves you time, sponsor it. Company sponsors get their logo here.

    License

    MIT. Syntax highlighting by syntect and two-face, whose bundled themes color most syntax.

    Bundled syntax themes in assets/, each under its own license:

    • Catppuccin Mocha — MIT.
    • Tokyo Night (tokyo-night, tokyo-night-day) — Apache-2.0.
    • Rosé Pine (rose-pine, rose-pine-dawn) — MIT.
    • ayu (ayu) — MIT, converted from its Sublime color scheme.
    • Everforest (everforest) — MIT, built from its palette and highlight groups.