lazydiff-0.2.1 is not a library.
LazyDiff
A terminal-based diff viewer written in Rust that makes it easier to compare files. The tool not only shows you nicely formatted diffs, it allows you to copy the patch content to the clipboard or export it as a file.
Getting Started
Installation
You can install lazydiff using Cargo:
Prerequisites
- Rust 1.70 or higher
- A terminal emulator with support for modern terminal features
Building from Source
If you prefer to build from source:
The binary will be available at target/release/lazydiff.
Usage
Basic Usage
Launch lazydiff with two files to compare:
Or start lazydiff and interactively select files:
You can also specify just the source file:
Keyboard Shortcuts
In Diff View:
q- Quit the applications- Select a new source filet- Select a new target filec- Copy diff to clipboarde- Export diff as a patch file↑/↓- Scroll through the diff
In File Browser:
↑/↓- Navigate files and directoriesEnter- Select file or enter directoryEscorq- Cancel selection (or exit if no files selected)
Features
- Interactive File Browser: Navigate your filesystem and select files to compare
- Syntax Highlighting: Color-coded diff output (green for additions, red for deletions)
- Clipboard Integration: Copy diffs directly to your clipboard with a single keypress
- Patch Export: Generate standard unified diff patch files
- Intuitive Interface: Clean, distraction-free TUI built with ratatui
Documentation
For information on contributing to lazydiff, please see the Contributing Guide.
License
This project is licensed under the MIT License - see the LICENSE file for details.