使用 GitButler 的 `but` 命令行工具管理版本控制:选择文件或差异片段提交,整理分支和提交历史,解决冲突、同步远程分支并创建拉取请求。
- 选择文件或差异片段提交
- 拆分、合并或调整提交顺序
- 按依赖关系排列分支
通过脚本在隐藏窗口中操作 GPUI 客户端,可点击、输入并截图,用于检查界面改动、复现界面故障或记录画面;应用数据使用临时隔离环境。
Use whenever you need to see, click through or screenshot the GPUI client (crates/but-gpui), to check a UI change works, reproduce a UI bug, or show what a change looks like. Drives the app from a script in a window that never shows on the user's screen, against throwaway app data. Never start the app with `cargo run` or the plain binary to look at it.
实测评分 未实测
查看安装方法本技能通过脚本启动 GPUI 客户端,并在用户看不到的窗口中执行点击、按键、等待和截图。它会报告应用给出的提示、警告和错误,便于检查界面改动、复现故障或记录画面。运行时使用单独的临时应用数据,不会触碰使用者的项目和设置。技能还支持放大截取屏幕局部,以及逐步执行操作。
想确认界面改动是否按预期工作,或用一组可重复的操作复现界面问题时,可以使用本技能。它也适合保存画面,以便比较改动前后的显示效果。还可以向应用添加一次性 Git 仓库,准备所需状态。
cargo 必须位于 PATH 中;否则需从仓库的开发环境中运行。测试真实仓库时请使用 APFS 克隆。焦点和失焦行为、复制到剪贴板,以及设置中的 AI 功能需要另外留意。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。
不计入评分。 由 AI(OpenAI Codex)于 2026年10月29日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
crates/but-gpui/scripts/drive.sh builds the client with --features dev-script and runs it
from a script. The window never shows, the app stays out of the Dock and never takes the
user's keys, and it runs against app data of its own, so none of the user's projects or
settings are touched. Starting the app any other way opens a window on the user's screen.
The app writes to what it opens: GitButler's workspace, refs, the oplog. Never add the
checkout you're working in, or any repository of the user's. Make a throwaway one:
repo=$(mktemp -d)/repo
git init -q -b main "$repo"
git -C "$repo" -c user.name=Tester -c user.email=t@example.com commit -q --allow-empty -m "Initial commit"
echo hello > "$repo/notes.txt"
Build whatever state the change needs (branches, commits, uncommitted edits) with git here,
or later with sh steps, which run while the app watches. To try a real repository, use an
APFS clone as crates/but-gpui/AGENTS.md (Sandboxes and fixtures) says.
Write a script, one command per line (src/dev.rs lists them all), and run it:
add /path/to/repo # the folder Add a repository would be given
wait 1000 # let the first loads land
shot /tmp/before.png
click 400 184 # window coordinates, see below
key cmd-k
type history
shot /tmp/after.png
crates/but-gpui/scripts/drive.sh run script.txt
It prints what the app reported (failed steps as script line N: …, prompts as PROMPT …,
warnings and errors) and where the app data and logs went. The run quits when the script
ends and is killed after --timeout seconds (300). Read the shots to check them.
To explore, or to find where to click from what's on screen:
crates/but-gpui/scripts/drive.sh start
crates/but-gpui/scripts/drive.sh step "add /path/to/repo" "wait 1000"
crates/but-gpui/scripts/drive.sh step "click 400 184" "key down"
crates/but-gpui/scripts/drive.sh stop
Each step runs its arguments as script lines, saves a shot, and prints its path (under
target/gpui-drive/shots) after anything the app reported and a KEYS line. A session quits
on its own after --timeout seconds (1800); always stop it when done. One session per
checkout.
KEYS Workspace > Navigator > TextInput says what typing reaches: here a text field in the
navigator. Check it before type or a single-letter key. In a list or the diff, letters run
shortcuts, so a query typed there makes branches (b), pushes (⇧P), opens menus (m), or opens
the user's editor on their screen (e) instead. After add the navigator has the keys, so click
the field you mean first. In a run script, a keys line prints the same.
The window is 1360×860 in logical pixels, which is what click, move, drag and scroll
take, and a shot is saved at that size: where something shows in it is where to click it.
shot path x y w h saves just that region, given in the same coordinates, at the display's
full resolution (2× on a Retina Mac) for a closer look, so a point read off it is the region's
origin plus half its pixel offset. size W H resizes the window.
cargo must be on the PATH. If it isn't, run inside the repository's dev shell:
nix develop --command crates/but-gpui/scripts/drive.sh … (needed for run and start;
step and stop don't build).GITBUTLER_GPUI_APPEARANCE=dark (or light) before the command picks the theme.run --release builds with optimizations, for perf and hold timings; see Measuring
performance in crates/but-gpui/AGENTS.md.on_focus and on_blur listeners never fire and carets don't
blink. Check those by hand.add: Add project's folder picker would open on the user's screen.crates/but-gpui/AGENTS.md has the rest: hover needs a second small
move, links in text need press then release, prompts need their buttons clicked, and
drags have their own commands.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
使用 GitButler 的 `but` 命令行工具管理版本控制:选择文件或差异片段提交,整理分支和提交历史,解决冲突、同步远程分支并创建拉取请求。
查看与 GitButler 分支、拉取请求或更改相关的已保存代理记录,按时间了解讨论和操作,再深入查看需要核实理由或依据的具体对话轮次。
为 `but` CLI 创建、修改、运行和排查基于 Shell 的性能测试场景。将数据准备与计时操作分开,使用 Hyperfine 测量,并按现有流程检查脚本和运行结果。
按照 GitButler 现有结构实现或修改 `but` 命令,涵盖参数定义、输入校验、操作执行和面向用户、Shell 或 JSON 的结果输出,并考虑 TUI 调用。
使用 `@gitbutler/ui-react` 调整 Lite 和 but.dev 中用户可见的界面,涵盖表单、弹窗、通知和文案,并参考现有组件与设计规范检查明暗主题效果。
为 GitButler 的 Ratatui 终端界面添加或修改测试,模拟按键并检查选择位置和屏幕显示,通过 SVG 快照对照预期画面,并按现有命令运行测试或更新快照。