--- id: ydiff version: "1.5" license: BSD-3 license_treatment: permissive maintenance: active --- # ydiff — View colored, incremental diff in a workspace or from stdin, in side-by-side or unified moded, and auto paged. License: permissive · Maintenance: active · Downloads: 97.6K/mo ## What it is and what it does Ydiff is a terminal-based diff viewer that renders diffs with color and formatting, supporting both side-by-side (similar to diff -y) and unified modes. It integrates with version control systems (Git, Mercurial, Perforce, Svn) to display workspace changes, commit logs, or arbitrary diffs piped from stdin. The tool auto-detects terminal width, wraps or truncates lines as configured, and pages output through less or another pager of your choice. The package requires only Python built-in libraries and less, making it lightweight and portable. It supports customized color themes via INI configuration files and respects environment variables for default options. Ydiff is designed for developers who want a quick, colored alternative to standard diff output without installing heavy dependencies. Use it for: - Review git diffs with color and side-by-side formatting before committing changes. - Examine commit history with inline changes using ydiff -l in a version-controlled workspace. - Pipe arbitrary diffs (from git show, svn diff, or patch files) into ydiff for colored viewing. - Compare two files or directories with unified or side-by-side output and custom text width. - Inspect GitHub pull request diffs by piping curl output directly to ydiff. - Redirect colored diff output to a patch file while preserving formatting. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Ydiff displays colored, incremental diffs in a terminal with side-by-side or unified formatting, auto-paging support, and no external dependencies beyond Python and less. Yes. Ydiff is a lightweight, actively maintained tool with no external dependencies, permissive licensing, and a clear use case for developers who want colored, formatted diffs in the terminal. Install it if you regularly review diffs and prefer a simpler alternative to full-featured diff tools. ## Install pip install ydiff uv add ydiff poetry add ydiff ## Installing ydiff Before you install: Installation is straightforward with low friction—the package is a pure Python wheel with no runtime dependencies, only requiring Python >= 3.3 and less as a pager. The project is actively maintained with a recent release and 930 repository stars. License in practice: Ydiff is licensed under BSD-3 (permissive), so you can use, modify, and distribute it freely in both open-source and commercial projects with minimal restrictions. Quickstart: pip install ydiff # View colored diff in a git workspace cd your-project ydiff # Or pipe a diff directly git diff | ydiff Requires less as a pager (or another pager specified via -p flag); Python >= 3.3. Verify before relying: - Whether wide-character alignment issues in side-by-side mode affect common use cases or only edge cases. - Performance characteristics when viewing very large diffs or log histories. ## Package facts - License: BSD-3 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 97.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags colored diff viewer terminal, side-by-side diff display, incremental diff tool, git diff colorizer, unified diff formatter, terminal diff pager, syntax-highlighted diffs, diff-viewer, terminal-ui, vcs-integration [View on SkillFed](https://skillfed.io/packages/ydiff) · [View on PyPI](https://pypi.org/project/ydiff/)