Skip to main content

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/k to 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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gdiff-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

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

Hashes for gdiff-0.1.0.tar.gz
Algorithm Hash digest
SHA256 730b374673e6632a11c0e4f6af308569fd1c12e718ab24d9844f5c996149cc24
MD5 041c1a101c55c77c0a42810e7270880d
BLAKE2b-256 f29b2ebce984aa610724bacbe06aa84b86cf6209493dc7dcb8813fab43abcc09

See more details on using hashes here.

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

Hashes for gdiff-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12632e7083bfc756df74890ef35efd386a713aa19f583d89456b926a0ecec7fd
MD5 c4c7ffc16aae2087bc26b35fc8f06b3b
BLAKE2b-256 0fcc49e96de03b4581c6079b007611a0a678faefb342d9ef2832322ac9c471e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page