This commit is contained in:
Tommy Guo 2026-02-01 23:50:06 -05:00
commit 41e1ea0731
2 changed files with 39 additions and 13 deletions

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2026 Tommy Guo Copyright (c) 2026 Xiyuan Guo
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -8,39 +8,42 @@
<img src="https://img.shields.io/github/license/oug-t/difi?style=for-the-badge&color=2e3440" /> <img src="https://img.shields.io/github/license/oug-t/difi?style=for-the-badge&color=2e3440" />
</p> </p>
<img width="1024" height="576" alt="image" src="https://github.com/user-attachments/assets/ae68aebd-46ed-49d3-90c1-ec0ba7a727d5" /> <p align="center">
<img src="https://github.com/user-attachments/assets/70c177cb-9ad8-4e53-8837-f5e7b3f22fa0" alt="difi" />
</p>
## Why difi? ## Why difi?
- ⚡️ **Instant startup** — Built in Go, no background daemon. **git diff** shows changes. **difi** helps you *review* them.
- 🎨 **Structured review** — Tree view + side-by-side diffs.
- 🧠 **Editor-aware** — Jump to the exact line in `nvim` / `vim`.
- ⌨️ **Keyboard-first** — Designed for `h j k l`, no mouse.
## Why not `git diff`? - ⚡️ **Instant** — Built in Go. Launches immediately with no daemon or indexing.
- 🎨 **Structured** — A clean file tree and focused diffs for fast mental parsing.
- 🧠 **Editor-Aware** — Jump straight to the exact line in `nvim`/`vim` to fix issues.
- ⌨️ **Keyboard-First** — Navigate everything with `h j k l`. No mouse required.
- `git diff` is powerful, but its optimized for output — not review. <p align="right">(<a href="#readme-top">back to top</a>)</p>
- difi is designed for the *moment before you push or open a PR*:
## Installation ## Installation
### Homebrew (macOS & Linux) #### Homebrew (macOS & Linux)
```bash ```bash
brew tap oug-t/difi brew tap oug-t/difi
brew install difi brew install difi
``` ```
### Go Install #### Go Install
```bash ```bash
go install github.com/oug-t/difi/cmd/difi@latest go install github.com/oug-t/difi/cmd/difi@latest
``` ```
### Manual (Linux / Windows) #### Manual (Linux / Windows)
- Download the binary from Releases and add it to your `$PATH`. - Download the binary from Releases and add it to your `$PATH`.
<p align="right">(<a href="#readme-top">back to top</a>)</p>
## Workflow ## Workflow
- Run difi in any Git repository. - Run difi in any Git repository.
@ -51,6 +54,8 @@ cd my-project
difi difi
``` ```
<p align="right">(<a href="#readme-top">back to top</a>)</p>
## Controls ## Controls
| Key | Action | | Key | Action |
@ -61,8 +66,26 @@ difi
| `e` / `Enter` | Edit file (opens editor at selected line) | | `e` / `Enter` | Edit file (opens editor at selected line) |
| `?` | Toggle help drawer | | `?` | Toggle help drawer |
| `q` | Quit | | `q` | Quit |
<p align="right">(<a href="#readme-top">back to top</a>)</p> <p align="right">(<a href="#readme-top">back to top</a>)</p>
## Integrations
#### Neovim
Get the ultimate review experience with **[difi.nvim](https://github.com/oug-t/difi.nvim)**.
- **Auto-Open:** Instantly jumps to the file and line when you press `e` in the CLI.
- **Visual Diff:** Renders diffs inline with familiar green/red highlights—just like reviewing a PR on GitHub.
- **Interactive Review:** Restore a "deleted" line by simply removing the `-` marker. Discard an added line by deleting it entirely.
- **Context Aware:** Automatically syncs with your `difi` session target.
<p align="left">
<a href="https://github.com/oug-t/difi.nvim">
<img src="https://img.shields.io/badge/Get_difi.nvim-57A143?style=for-the-badge&logo=neovim&logoColor=white" alt="Get difi.nvim" />
</a>
</p>
## Contributing ## Contributing
```bash ```bash
@ -72,9 +95,10 @@ go run cmd/difi/main.go
``` ```
Contributions are especially welcome in: Contributions are especially welcome in:
- diff rendering edge cases - diff.nvim rendering edge cases
- UI polish and accessibility - UI polish and accessibility
- Windows support - Windows support
<p align="right">(<a href="#readme-top">back to top</a>)</p> <p align="right">(<a href="#readme-top">back to top</a>)</p>
## Star History ## Star History
@ -87,6 +111,7 @@ Contributions are especially welcome in:
</picture> </picture>
</a> </a>
</div> </div>
<p align="right">(<a href="#readme-top">back to top</a>)</p> <p align="right">(<a href="#readme-top">back to top</a>)</p>
--- ---
@ -99,3 +124,4 @@ Contributions are especially welcome in: