ydiff is a terminal viewer for coloured incremental diff output. It can work within a version-controlled workspace or consume unified diff data from standard input, presenting changes either side by side or in a colourised unified layout.
It is deliberately lightweight and depends only on Python’s standard library. This makes it useful as a pager or formatting layer around existing version-control and diff commands rather than as a replacement comparison engine.
This is free and open source software.
Key Features
- Displays unified diffs in a colourised side-by-side view.
- Can switch to a colourised unified layout when a two-column presentation is not desirable.
- Automatically detects a suitable display width from the terminal.
- Wraps long lines or can leave them unwrapped according to user preference.
- Automatically feeds output to a pager and lets users select the pager and its options.
- Works from standard input, making it suitable for Git logs, Git show output, patches and ordinary diff output.
- Can inspect local modifications and revision history from supported version-control workspaces.
- Supports Git, Mercurial, Subversion and Perforce workflows.
- Supports Jujutsu version-control workflows.
- Provides built-in light, dark and default colour themes.
- Allows additional themes to be defined in an INI configuration file.
- Supports configurable tab width and terminal colour behaviour.
- Passes unrecognised command-line options through to the underlying revision-control command.
- Can compare files and directories when supplied with suitable unified diff input.
Website: github.com/ymattw/ydiff
Support:
Developer: Matt Wang
License: BSD 3-Clause ‘New’ or ‘Revised’ License
ydiff is written in Python. Learn Python with our recommended free books and free tutorials.
Related Software
| Terminal-Based Diff Tools | |
|---|---|
| difftastic | Structural diff tool that compares files based on their syntax |
| hunk | Terminal diff viewer with syntax highlighting and side-by-side views |
| diff-so-fancy | Attractive diffs with diff-highlight and more |
| delta | Viewer for git and diff output |
| icdiff | An improved colored diff |
| diffoscope | In-depth comparison of files, archives, and directories |
| colordiff | Wrapper for diff with pretty syntax highlighting |
| diffsitter | Semantic diff tool |
| objdiff | Local diffing tool for decompilation project |
| ydiff | Tool to view colored, incremental diff in a version controlled workspace |
| diffr | Word-by-word diff highlighting utility |
| dyff | diff tool for YAML files |
| Wdiff | Wordwise implementation of diff |
| dwdiff | diff program that operates at the word level |
| diffyml | Compares YAML documents by their structure |
| oyo | Step-through diff viewer |
| diff2html-cli | Generate HTML diffs |
| biodiff | Terminal-based binary diff viewer |
| dirdiff | Compute the differences between two directories |
| csvdiff | Fast diff tool for comparing CSV files |
| VBinDiff | Visual binary diff |
| riff | Wrapper around diff |
| csv-diff | Diffing CSV and JSON files |
| xmldiff | Compare XML documents |
| Patdiff | File diff using the Patience Diff algorithm |
| dead-ringer | Binary diff utility |
| sesdiff | Generates a shortest edit script |
| semdiff | Semantic diff tool written in Rust |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.