{"id":20945028,"url":"https://github.com/dlvhdr/diffnav","last_synced_at":"2026-01-16T10:29:42.481Z","repository":{"id":257783606,"uuid":"859366716","full_name":"dlvhdr/diffnav","owner":"dlvhdr","description":"A git diff pager based on delta but with a file tree, à la GitHub.","archived":false,"fork":false,"pushed_at":"2026-01-12T22:21:45.000Z","size":577,"stargazers_count":578,"open_issues_count":15,"forks_count":13,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-13T02:44:47.897Z","etag":null,"topics":["cli","delta","diff","git","github","golang","tui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlvhdr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["dlvhdr"]}},"created_at":"2024-09-18T14:41:16.000Z","updated_at":"2026-01-12T22:21:49.000Z","dependencies_parsed_at":"2024-09-20T06:43:20.342Z","dependency_job_id":"fd2cd45c-d53b-4902-9e7e-2dce23ccdfcc","html_url":"https://github.com/dlvhdr/diffnav","commit_stats":null,"previous_names":["dlvhdr/diffnav"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/dlvhdr/diffnav","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlvhdr%2Fdiffnav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlvhdr%2Fdiffnav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlvhdr%2Fdiffnav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlvhdr%2Fdiffnav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlvhdr","download_url":"https://codeload.github.com/dlvhdr/diffnav/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlvhdr%2Fdiffnav/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","delta","diff","git","github","golang","tui"],"created_at":"2024-11-18T23:46:28.447Z","updated_at":"2026-01-16T10:29:42.466Z","avatar_url":"https://github.com/dlvhdr.png","language":"Go","readme":"# diffnav\n\nA git diff pager based on [delta](https://github.com/dandavison/delta) but with a file tree, à la GitHub.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"750\" src=\"https://github.com/user-attachments/assets/3148be62-830a-484c-9256-2129ff10ca13\" /\u003e\n\u003c/p\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eDemo\u003c/summary\u003e\n  \u003cimg src=\"https://github.com/dlvhdr/diffnav/blob/74c3f341797ab121ce8edf785ef63e00075ce040/out.gif\" /\u003e\n\u003c/details\u003e\n\n## Installation\n\nHomebrew:\n\n```sh\nbrew install dlvhdr/formulae/diffnav\n```\n\nGo:\n\n```sh\ngo install github.com/dlvhdr/diffnav@latest\n```\n\n\u003e [!NOTE]\n\u003e To get the icons to render properly you should download and install a Nerd font from https://www.nerdfonts.com/. Then, select that font as your font for the terminal.\n\u003e\n\u003e _You can install these with brew as well: `brew install --cask font-\u003cFONT NAME\u003e-nerd-font`_\n\n## Usage\n\n### Pipe into diffnav\n\n- `git diff | diffnav`\n- `gh pr diff https://github.com/dlvhdr/gh-dash/pull/447 | diffnav`\n\n### Set up as global git diff pager\n\n```bash\ngit config --global pager.diff diffnav\n```\n\n## Flags\n\n| Flag | Description |\n|------|-------------|\n| `--side-by-side, -s` | Force side-by-side diff view |\n| `--unified, -u` | Force unified diff view |\n\nExample:\n\n```sh\ngit diff | diffnav --unified\ngit diff | diffnav -u\n```\n\n## Configuration\n\nThe config file is searched in this order:\n\n1. `$DIFFNAV_CONFIG_DIR/config.yml` (if env var is set)\n2. `$XDG_CONFIG_HOME/diffnav/config.yml` (if set, macOS only)\n3. `~/.config/diffnav/config.yml` (macOS and Linux)\n4. OS-specific config directory (e.g., `~/Library/Application Support/diffnav/config.yml` on macOS)\n\nExample config file:\n\n```yaml\nui:\n  # Hide the header to get more screen space for diffs\n  hideHeader: true\n\n  # Hide the footer (keybindings help)\n  hideFooter: true\n\n  # Start with the file tree hidden (toggle with 'e')\n  showFileTree: false\n\n  # Customize the file tree width (default: 26)\n  fileTreeWidth: 30\n\n  # Customize the search panel width (default: 50)\n  searchTreeWidth: 60\n\n  # Icon style: \"nerd-fonts\" (default), \"nerd-fonts-alt\", \"unicode\", or \"ascii\"\n  icons: nerd-fonts\n\n  # Color filenames by git status (default: true)\n  colorFileNames: false\n\n  # Use side-by-side diff view (default: true, set false for unified)\n  sideBySide: true\n```\n\n| Option              | Type   | Default | Description                           |\n| :------------------ | :----- | :------ | :------------------------------------ |\n| `ui.hideHeader`     | bool   | `false` | Hide the \"DIFFNAV\" header             |\n| `ui.hideFooter`     | bool   | `false` | Hide the footer with keybindings help |\n| `ui.showFileTree`   | bool   | `true`  | Show file tree on startup             |\n| `ui.fileTreeWidth`  | int    | `26`    | Width of the file tree sidebar        |\n| `ui.searchTreeWidth`| int    | `50`    | Width of the search panel             |\n| `ui.icons`          | string | `nerd-fonts` | Icon style: `nerd-fonts`, `nerd-fonts-alt`, `unicode`, or `ascii` |\n| `ui.colorFileNames` | bool   | `true`  | Color filenames by git status |\n| `ui.sideBySide`     | bool   | `true`  | Use side-by-side diff view (false for unified) |\n\n### Delta\n\nYou can also configure the diff rendering through delta. Check out [their docs](https://dandavison.github.io/delta/configuration.html).\n\nIf you want the exact delta configuration I'm using - [it can be found here](https://github.com/dlvhdr/diffnav/blob/main/cfg/delta.conf).\n\n## Keys\n\n| Key               | Description          |\n| :---------------- | :------------------- |\n| \u003ckbd\u003ej\u003c/kbd\u003e      | Next file            |\n| \u003ckbd\u003ek\u003c/kbd\u003e      | Previous file        |\n| \u003ckbd\u003eCtrl-d\u003c/kbd\u003e | Scroll the diff down |\n| \u003ckbd\u003eCtrl-u\u003c/kbd\u003e | Scroll the diff up   |\n| \u003ckbd\u003ee\u003c/kbd\u003e      | Toggle the file tree |\n| \u003ckbd\u003et\u003c/kbd\u003e      | Search/go-to file    |\n| \u003ckbd\u003ey\u003c/kbd\u003e      | Copy file path       |\n| \u003ckbd\u003ei\u003c/kbd\u003e      | Cycle icon style     |\n| \u003ckbd\u003eo\u003c/kbd\u003e      | Open file in $EDITOR |\n| \u003ckbd\u003es\u003c/kbd\u003e      | Toggle side-by-side/unified view |\n| \u003ckbd\u003eTab\u003c/kbd\u003e    | Switch focus between the panes |\n| \u003ckbd\u003eq\u003c/kbd\u003e      | Quit                 |\n\n## Under the hood\n\n`diffnav` uses:\n\n- [Bubble Tea](https://github.com/charmbracelet/bubbletea) for the TUI\n- [`delta`](https://github.com/dandavison/delta) for viewing the diffed file\n\nScreenshots use:\n\n- [kitty](https://sw.kovidgoyal.net/kitty/) for the terminal\n- [tokyonight](https://github.com/folke/tokyonight.nvim) for the color scheme\n- [CommitMono](https://www.nerdfonts.com/font-downloads) for the font\n","funding_links":["https://github.com/sponsors/dlvhdr"],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlvhdr%2Fdiffnav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlvhdr%2Fdiffnav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlvhdr%2Fdiffnav/lists"}