# git-notes-cli (`git-notes`)
> **Command-line interface for `git-notes` ā decentralized code comments that live inside Git forever.**
[](https://crates.io/crates/gn-cli)
[](https://github.com/isaim0011/git-notes)
`git-notes` allows developers to add comments, reviews, and discussion threads directly to commits, files, and line numbers without altering Git commit history.
---
## ā” Installation
Install from crates.io via Cargo:
```bash
cargo install gn-cli --bin git-notes
```
Or download precompiled standalone binaries from [GitHub Releases](https://github.com/isaim0011/git-notes/releases).
---
## š Commands
### Add a Note
```bash
git-notes add -f src/main.rs -l 42 -m "Why is this O(n²)?"
```
### Reply to a Thread
```bash
git-notes reply 72818dac -m "Refactored to HashMap lookup!"
```
### Show Discussion Thread
```bash
git-notes show 72818dac --thread
```
### List Notes
```bash
git-notes list --namespace comments
git-notes list --namespace review
```
### Resolve / Approve
```bash
git-notes resolve 72818dac --status approved
```
### Quickies & Single-Letter Abbreviations (`gn`)
Save keystrokes with fast, ergonomic quickies:
- `gn a -f file.rs -l 42 -m "..."` ā Quickie add note
- `gn l` ā List notes with compact numbered index `[1]`, `[2]`
- `gn r 1 -m "Fixed!"` ā Reply directly using quick index number
- `gn ok 1` ā Resolve / approve note by number
- `gn s` ā Interactive terminal arrow-key thread picker
- `gn d` ā View git diff with inline notes
- `gn b -f file.rs` ā Blame with inline notes annotations
- `gn doc` ā Doctor health check & stale-note detector
### View & Customize Shortcuts
```bash
# View all abbreviations and keybindings
gn shortcuts
# Customize your own aliases
gn shortcuts --set c="add -m"
# Reset to defaults
gn shortcuts --reset
```
### Export Notes
```bash
git-notes export --format markdown # outputs NOTES.md
git-notes export --format json # outputs notes.json
git-notes export --format html # outputs index.html
```
---
## š Repository
- **GitHub**: [https://github.com/isaim0011/git-notes](https://github.com/isaim0011/git-notes)
- **Releases**: [https://github.com/isaim0011/git-notes/releases](https://github.com/isaim0011/git-notes/releases)