Automic VaultAutomic Vault

brew

使用 Homebrew, apt, dnf, MacPorts, Nix 安装 ydiff

查看 ydiff 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install ydiff

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install ydiff

MacPorts ports tree · textproc/ydiff/Portfile · 来源: api.github.com

概览

软件包摘要

View colored diff with side by side and auto pager support

命令和别名

  • ydiff

历史

项目历史与用法

Ydiff is a terminal diff viewer for colored, incremental diffs from version-control workspaces or stdin. It is best known for side-by-side display, automatic pager use, and a single-file Python implementation with no external Python dependencies.

项目历史

The GitHub repository was created on 2013-01-29, and the changelog begins with early PyPI-era releases in February 2013 under the original `cdiff` name. Within weeks it gained support for patch files, pipes, revision-control output, two-file comparison, color control, logs, and more robust diff parsing.

During 2013 and 2014, the project moved from a small colored-diff helper into a workspace-oriented reviewer: it added Git/SVN/Hg log handling, automatic terminal-width behavior, pager tuning, Python 3.4 support, and fixes for difficult unified diffs.

The 2018 1.1 release renamed the command from `cdiff` to `ydiff` to avoid a binary-name conflict on major distributions. Later releases added Perforce and Windows support, wide-character handling, word-level change blocks, default side-by-side behavior, and customizable themes.

采用历史

Ydiff adopted well for a small terminal tool because it solved a common packaging pain point: colorful side-by-side diffs without a GUI and without a heavy dependency stack. Its README documents installation from source, PyPI, Homebrew, Fedora, and FreeBSD.

Distribution adoption is visible in Homebrew, Fedora, FreeBSD/OpenBSD, Debian-derived package naming, and Nix-style package indexes. The rename from cdiff to ydiff is especially package-nerd relevant because it was driven by command-name collision management across distributions.

使用方式

Users run `ydiff` inside Git, Mercurial, Perforce, or Subversion workspaces to view current changes, staged Git changes via passed-through options such as `--cached`, or revision logs via `-l`. It can also consume `git show`, `git log -p`, `svn diff`, `diff -u`, directory diffs, and GitHub pull-request `.diff` URLs from stdin.

The practical attraction is that ydiff wraps ordinary unified diffs with readable terminal presentation: side-by-side or unified layout, automatic width detection, line wrapping controls, pager selection, themes, color modes, and safe redirection back to patch files.

为什么软件包爱好者会关心

Ydiff is a neat package-manager case study because almost all of its value ships as one Python command. Packaging it is mostly about naming, executable placement, and keeping terminal behavior consistent across Unix-like systems.

The cdiff-to-ydiff rename captures a real packaging concern: a project can be technically simple and still need an upstream identity change once distribution command namespaces collide.

时间线

  • 2013-01-29: The ymattw/ydiff repository is created.
  • 2013-02-04: Early PyPI-oriented changelog entries appear for cdiff.
  • 2013-02-18: The changelog adds log-reading support for SVN and Mercurial patch logs.
  • 2014-06-04: Python 3.4 support appears in the changelog.
  • 2018-06-05: The project is renamed from cdiff to ydiff to avoid binary-name conflicts on major distributions.
  • 2020-08-08: Perforce workspace and pager-customization support are added.
  • 2024-11-13: Word-level change blocks and theme selection land in the 1.4 line.
  • 2025-12-06: The changelog records INI-based custom themes and source/wheel publication changes.

Related projects

  • Related tools include cdiff, colordiff, diff, git diff, git show, git log -p, svn diff, hg log -p, Perforce diff tooling, icdiff, delta, diff-so-fancy, less, patchutils, and terminal pager workflows.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 1 个平台目标。
  • 安装时包含 1 个运行时依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
ydiffcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-08
管理器版本1.5
管理器更新时间
本地数据OK
上游not checked
检测到的最新版本未检测到

https://github.com/ymattw/ydiff

  • 信息No package-manager update timestamp was available.低 置信度
  • 信息No cached GitHub release or tag data was available.https://github.com/ymattw/ydiffnone 置信度

安装元数据

软件包元数据

软件包键brew:ydiff
版本1.5
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/ydiff
主页https://github.com/ymattw/ydiff
仓库https://github.com/ymattw/ydiff
上游文档https://github.com/ymattw/ydiff#readme
许可证BSD-3-Clause
源码归档https://files.pythonhosted.org/packages/25/08/93b7e744645d94ae2f5dcddbbd2cfd5ec1420768994987a21a10b226be86/ydiff-1.5.tar.gz
依赖python@3.14
Bottle可用 (于 all)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nameydiff
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Debian apt95%

python3-cdiff 1.4.2-1

Colored, incremental diff (transitional package)

sudo apt install python3-cdiff
  • Section: python
  • Architecture: all
  • Source Package: ydiff
  • 1 依赖
  • normalized package name match
  • 匹配方式:Ydiff
Debian stable package indexes · deb.debian.org · Debian stable package indexes: python3-cdiff from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

python3-ydiff 1.4.2-1

Colored, incremental diff with side by side and auto pager support (Python 3)

sudo apt install python3-ydiff
  • Section: python
  • Architecture: all
  • Source Package: ydiff
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Ydiff
Debian stable package indexes · deb.debian.org · Debian stable package indexes: python3-ydiff from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

ydiff

nix profile install nixpkgs#ydiff
  • normalized package name match
  • 匹配方式:Ydiff
nixpkgs package indexes · raw.githubusercontent.com · nixpkgs package indexes: ydiff from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
dnf95%

python3-ydiff 1.5-8.fc45

View colored, incremental diff

https://github.com/ymattw/ydiff

sudo dnf install python3-ydiff
  • License: BSD-3-Clause
  • Category: Unspecified
  • Architecture: noarch
  • Source Package: ydiff
  • 1 依赖
  • 5 提供
  • normalized package name match
  • 匹配方式:Ydiff
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: python3-ydiff from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
dnf95%

ydiff 1.5-8.fc45

View colored, incremental diff

https://github.com/ymattw/ydiff

sudo dnf install ydiff
  • License: BSD-3-Clause
  • Category: Unspecified
  • Architecture: noarch
  • Source Package: ydiff
  • 3 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Ydiff
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: ydiff from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
MacPorts95%

ydiff

sudo port install ydiff
  • normalized package name match
  • 匹配方式:Ydiff
MacPorts ports tree · api.github.com · MacPorts ports tree: textproc/ydiff/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment