ABDiff 帮助

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

安装

安装CLI

  1. 选择文件▸安装CLI…
  2. 选择一个安装文件夹。
  3. 将该文件夹添加到您的PATH中,以便abd在终端中可用。

PATH编辑

如何将文件夹添加到PATH中:

  1. 编辑启动文件。
nano ~/.zshrc
  1. 添加此行并保存:
export PATH="$HOME/installation/folder:$PATH"
  1. 重新加载启动(或重新启动外壳)。
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。