Web-based side-by-side git diff viewer
Project description
gdiff
A web-based side-by-side git diff viewer. Generates a self-contained HTML page with syntax highlighting and opens it in your browser.
Installation
pip install gdiff
For syntax highlighting (recommended):
pip install gdiff[highlight]
Usage
# Diff a specific file
gdiff path/to/file.py
# Staged changes
gdiff --staged path/to/file.py
# All unstaged changes
gdiff
# Pipe mode
git diff | gdiff
# Save without opening browser
gdiff --no-open -o diff.html
# Compare branches/commits
gdiff main..feature -- path/to/file.py
Features
- Side-by-side view with old code on the left, new code on the right
- Syntax highlighting for 500+ languages (via pygments)
- Dark theme inspired by GitHub
- Line numbers on both sides
- File navigation header with clickable links
- Keyboard navigation (
j/kto jump between files) - Zero config - works out of the box
- Fully offline - generates a self-contained HTML file
Requirements
- Python 3.8+
- Git
License
MIT - Younes Boukdir
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gdiff-0.1.0.tar.gz
(7.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
gdiff-0.1.0-py3-none-any.whl
(9.2 kB
view details)
File details
Details for the file gdiff-0.1.0.tar.gz.
File metadata
- Download URL: gdiff-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
730b374673e6632a11c0e4f6af308569fd1c12e718ab24d9844f5c996149cc24
|
|
| MD5 |
041c1a101c55c77c0a42810e7270880d
|
|
| BLAKE2b-256 |
f29b2ebce984aa610724bacbe06aa84b86cf6209493dc7dcb8813fab43abcc09
|
File details
Details for the file gdiff-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gdiff-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12632e7083bfc756df74890ef35efd386a713aa19f583d89456b926a0ecec7fd
|
|
| MD5 |
c4c7ffc16aae2087bc26b35fc8f06b3b
|
|
| BLAKE2b-256 |
0fcc49e96de03b4581c6079b007611a0a678faefb342d9ef2832322ac9c471e9
|