agavra / tuicr
agavra / tuicr
tuicr is a code review TUI (Terminal User Interface) with Vim keybindings. It allows you to export reviews to GitHub, GitLab, or your clipboard. It is pronounced “tweaker.” tuicr 是一款带有 Vim 快捷键的代码审查终端用户界面(TUI)。它支持将审查结果导出到 GitHub、GitLab 或剪贴板。其发音为“tweaker”。
What it does
功能概述
- GitHub-style continuous diff in the terminal: Scroll through every changed file in one stream. 终端内 GitHub 风格的连续差异对比: 在一个流中滚动查看所有已更改的文件。
- PR-style comments: Supports comments at the line, range, file, and review level. PR 风格的评论: 支持在行、范围、文件和审查级别进行评论。
- Review tracking: File or hunk granularity, persisted across sessions. 审查追踪: 支持文件或代码块粒度的追踪,并可在会话间持久化保存。
- Three export targets: Push a real review to GitHub or GitLab, copy structured markdown to your clipboard, or pipe to stdout. 三种导出目标: 将真实的审查结果推送到 GitHub 或 GitLab,将结构化 Markdown 复制到剪贴板,或通过管道输出到标准输出(stdout)。
- Compatibility: Works with git, jj, and mercurial. Reviews uncommitted changes, commit ranges, or any GitHub PR or GitLab MR. 兼容性: 支持 git、jj 和 mercurial。可审查未提交的更改、提交范围,或任何 GitHub PR 和 GitLab MR。
Install
安装
curl -fsSL tuicr.dev/install.sh | sh
# or brew install agavra/tap/tuicr
Other install methods: 其他安装方式:
- Cargo:
cargo install tuicr - Mise:
mise use github:agavra/tuicr - Nix:
nix run github:agavra/tuicr - Pre-built binaries: GitHub Releases
- From source:
git clone https://github.com/agavra/tuicr.git cd tuicr cargo install --path .
Quick start
快速开始
tuicr: Pick from a commit selector (从提交选择器中选择)tuicr tui: Same TUI, explicit subcommand (相同的 TUI,显式子命令)tuicr -w: Uncommitted changes (未提交的更改)tuicr -r main..HEAD: Commit range (提交范围)tuicr pr 125: GitHub PRtuicr mr 125: GitLab MRtuicr --stdout: Pipe the review to stdout (将审查结果通过管道输出到 stdout)tuicr review list: List saved local review sessions (列出已保存的本地审查会话)tuicr update: Update the active installation (更新当前安装版本)
Inside tuicr, navigate with j/k, press c to comment, then y to copy the review or :submit to push it to GitHub or GitLab.
在 tuicr 中,使用 j/k 进行导航,按 c 进行评论,按 y 复制审查内容,或输入 :submit 将其推送到 GitHub 或 GitLab。
How it compares
对比分析
| Feature | tuicr | hunk | lumen | gh pr review | git diff |
|---|---|---|---|---|---|
| TUI diff viewer | ✅ | ✅ | ✅ | ❌ | ❌ |
| Write comments in TUI | ✅ | ✅ | ✅ | ❌ | ❌ |
| Vim keybindings | ✅ | ❌ | partial¹ | ❌ | ❌ |
| Push inline review to GitHub | ✅ | ❌ | ❌ | partial² | ❌ |
| Push inline review to GitLab | ✅ | ❌ | ❌ | ❌ | ❌ |
| Agent-ready markdown export | ✅ | via CLI | ❌ | ❌ | ❌ |
| git support | ✅ | ✅ | ✅ | ❌ | ✅ |
| jj support | ✅ | ✅ | ✅ | ❌ | ❌ |
| Mercurial (hg) support | ✅ | ❌ | ❌ | ❌ | ❌ |
| Single static binary | ✅ | (needs Node) | ✅ | ✅ | ✅ |
¹ Lumen has j/k navigation but no broader vim model (visual mode, {N}G, Ctrl-d/Ctrl-u, etc.). ¹ Lumen 拥有 j/k 导航,但没有更广泛的 Vim 模型(如可视模式、{N}G、Ctrl-d/Ctrl-u 等)。 ² gh pr review posts approve/comment/request-changes at the review level only. No inline line comments. ² gh pr review 仅在审查级别发布批准/评论/请求更改,不支持行内评论。
Export your review
导出你的审查
To GitHub / GitLab:
:submit opens a picker for Comment, Approve, Request changes, or Draft. Inline comments land on the right lines as a real PR review.
推送到 GitHub / GitLab:
:submit 会打开一个选择器,用于选择“评论”、“批准”、“请求更改”或“草稿”。行内评论会作为真实的 PR 审查出现在对应的行上。
To your coding agent:
y or :clip copies a structured markdown block to your clipboard, which can be pasted into any coding agent (Claude, Codex, Cursor, etc).
推送到你的编程助手:
y 或 :clip 会将结构化的 Markdown 块复制到剪贴板,你可以将其粘贴到任何编程助手(如 Claude、Codex、Cursor 等)中。
Configuration
配置
Path: ~/.config/tuicr/config.toml (Linux/macOS), %APPDATA%\tuicr\config.toml (Windows).
路径:~/.config/tuicr/config.toml (Linux/macOS), %APPDATA%\tuicr\config.toml (Windows)。
theme = "catppuccin-mocha"
diff_view = "side-by-side" # or "unified"
ignore_whitespace = false # ignore all whitespace in local VCS diffs
appearance = "system" # or "dark" / "light"
mouse = true