diffshot-1.0.1 is not a library.
diffshot
diffshot is a Rust CLI that takes a git diff and renders it as a presentable, shareable image
Installation · Usage · Options · Examples · Contact · License
Example output from running diffshot on a real git diff.
Installation
macOS / Linux
|
Windows (PowerShell)
powershell -c "irm https://github.com/faisalfakih/diffshot/releases/latest/download/diffshot-installer.ps1 | iex"
Via cargo
Usage
TARGET is an optional git ref or range. If omitted, diffshot renders your current uncommitted changes.
# Uncommitted changes
# Diff between two branches
# Last 3 commits
Options
| Flag | Short | Description |
|---|---|---|
--file <FILE> |
-f |
Restrict the diff to a specific file |
--output <FILE> |
-o |
Output filename. Extension sets the format: png, jpg, jpeg, svg (default: diffshot.png) |
--dir <DIR> |
-d |
Directory to write output into (default: current directory) |
--max-lines <N> |
-l |
Truncate the entire diff at N total lines |
--max-lines-per-chunk <N> |
-L |
Truncate each @@ chunk/hunk independently at N lines (shows a footer per truncated chunk) |
--resolution <N> |
-r |
Pixel scale multiplier for output resolution (default: 2) |
--split |
-s |
Render each changed file as a separate image |
--no-highlight |
Disable syntax highlighting | |
--compact |
Render all hunks of a file in one block (default: each chunk gets its own block) |
Examples
# Diff of a specific file vs main
# Save as SVG into an exports folder
# High-res PNG, split per file
# Cap at 100 lines, no syntax highlighting
# Cap each chunk at 50 lines (each @@ hunk gets its own truncation footer)
Contact
License
MIT © Faisal Fakih