ABDiff附带一个命令行工具(abd),用于打开比较/合并和CI图像比较。
安装

- 选择文件▸安装CLI…。
- 选择一个安装文件夹。
- 将该文件夹添加到您的
PATH中,以便abd在终端中可用。
PATH编辑
如何将文件夹添加到PATH中:
- 编辑启动文件。
nano ~/.zshrc- 添加此行并保存:
export PATH="$HOME/installation/folder:$PATH"- 重新加载启动(或重新启动外壳)。
source ~/.zshrc快速CLI用法
这些是常见的CLI操作的例子。
# Open one file in the app
abd left.txt
# Open two files (ABDiff infers viewer mode)
abd left.txt right.txt
# Explicit two-way compare
abd --local left.txt --remote right.txt
# Explicit three-way merge
abd --base Base.txt --local Ours.txt --remote Theirs.txt --result Merged.txt
# Compare images in CI (no UI)
abd image left.png right.png --metric ssim --threshold 0.98
# Launch without blocking
abd --no-wait left.txt right.txt运行abd image打印分数,在相似(在阈值内)时输出0,在不同时退出1。