nit-cli 0.2.1__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nit_cli-0.2.1/src/nit_cli.egg-info → nit_cli-0.4.0}/PKG-INFO +32 -2
- {nit_cli-0.2.1 → nit_cli-0.4.0}/README.md +31 -1
- {nit_cli-0.2.1 → nit_cli-0.4.0}/pyproject.toml +1 -1
- {nit_cli-0.2.1 → nit_cli-0.4.0}/src/nit/app.py +498 -24
- {nit_cli-0.2.1 → nit_cli-0.4.0}/src/nit/cli.py +32 -3
- {nit_cli-0.2.1 → nit_cli-0.4.0}/src/nit/comments.py +25 -0
- nit_cli-0.4.0/src/nit/diff_parser.py +252 -0
- nit_cli-0.4.0/src/nit/git.py +154 -0
- {nit_cli-0.2.1 → nit_cli-0.4.0}/src/nit/models.py +7 -0
- nit_cli-0.4.0/src/nit/syntax.py +33 -0
- {nit_cli-0.2.1 → nit_cli-0.4.0/src/nit_cli.egg-info}/PKG-INFO +32 -2
- {nit_cli-0.2.1 → nit_cli-0.4.0}/src/nit_cli.egg-info/SOURCES.txt +1 -0
- nit_cli-0.4.0/tests/test_diff_parser.py +355 -0
- nit_cli-0.4.0/tests/test_git.py +120 -0
- nit_cli-0.2.1/src/nit/diff_parser.py +0 -126
- nit_cli-0.2.1/src/nit/git.py +0 -88
- nit_cli-0.2.1/tests/test_diff_parser.py +0 -175
- nit_cli-0.2.1/tests/test_git.py +0 -80
- {nit_cli-0.2.1 → nit_cli-0.4.0}/LICENSE +0 -0
- {nit_cli-0.2.1 → nit_cli-0.4.0}/setup.cfg +0 -0
- {nit_cli-0.2.1 → nit_cli-0.4.0}/src/nit/__init__.py +0 -0
- {nit_cli-0.2.1 → nit_cli-0.4.0}/src/nit_cli.egg-info/dependency_links.txt +0 -0
- {nit_cli-0.2.1 → nit_cli-0.4.0}/src/nit_cli.egg-info/entry_points.txt +0 -0
- {nit_cli-0.2.1 → nit_cli-0.4.0}/src/nit_cli.egg-info/requires.txt +0 -0
- {nit_cli-0.2.1 → nit_cli-0.4.0}/src/nit_cli.egg-info/top_level.txt +0 -0
- {nit_cli-0.2.1 → nit_cli-0.4.0}/tests/test_app.py +0 -0
- {nit_cli-0.2.1 → nit_cli-0.4.0}/tests/test_cli.py +0 -0
- {nit_cli-0.2.1 → nit_cli-0.4.0}/tests/test_comments.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nit-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Terminal diff viewer with inline review comments
|
|
5
5
|
Author: Joshua Zink-Duda
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -33,6 +33,12 @@ Navigate diffs with vim-style keybindings, leave comments on specific lines, and
|
|
|
33
33
|
|
|
34
34
|
## Install
|
|
35
35
|
|
|
36
|
+
```bash
|
|
37
|
+
brew install joshuazd/tap/nit
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or via pip/pipx:
|
|
41
|
+
|
|
36
42
|
```bash
|
|
37
43
|
pipx install nit-cli
|
|
38
44
|
```
|
|
@@ -60,11 +66,20 @@ nit --mode all
|
|
|
60
66
|
nit HEAD~3..HEAD
|
|
61
67
|
nit main..feature
|
|
62
68
|
|
|
69
|
+
# Review any file (read-only, no git required)
|
|
70
|
+
nit path/to/file.py
|
|
71
|
+
|
|
63
72
|
# Filter to specific files or directories
|
|
64
73
|
nit --path src/
|
|
65
74
|
nit --path src/nit/app.py main..feature
|
|
75
|
+
|
|
76
|
+
# Export comments on quit
|
|
77
|
+
nit --export-comments comments.md
|
|
78
|
+
nit --export-comments - --export-format json # stdout as JSON
|
|
66
79
|
```
|
|
67
80
|
|
|
81
|
+
On main/master, nit defaults to unstaged mode. On feature branches, it defaults to branch diff. The diff auto-refreshes every 5 seconds.
|
|
82
|
+
|
|
68
83
|
## Keybindings
|
|
69
84
|
|
|
70
85
|
| Key | Action |
|
|
@@ -73,12 +88,27 @@ nit --path src/nit/app.py main..feature
|
|
|
73
88
|
| `J` / `K` | Jump to next / previous hunk |
|
|
74
89
|
| `n` / `p` | Next / previous file |
|
|
75
90
|
| `]` / `[` | Jump to next / previous comment |
|
|
91
|
+
| `gg` / `G` | Jump to top / bottom |
|
|
76
92
|
| `c` | Add comment on current line |
|
|
77
93
|
| `d` | Delete comment on current line |
|
|
78
|
-
| `
|
|
94
|
+
| `e` | Export comments to clipboard |
|
|
95
|
+
| `m` | Cycle diff mode (branch / unstaged / staged / all) |
|
|
96
|
+
| `s` | Toggle side-by-side diff view |
|
|
97
|
+
| `w` | Toggle word-level diff highlighting |
|
|
98
|
+
| `W` | Toggle hide whitespace-only changes |
|
|
99
|
+
| `h` | Toggle syntax highlighting |
|
|
79
100
|
| `r` | Refresh diff |
|
|
80
101
|
| `q` | Quit |
|
|
81
102
|
|
|
103
|
+
### Git operations (g-prefixed)
|
|
104
|
+
|
|
105
|
+
| Key | Action |
|
|
106
|
+
|-----|--------|
|
|
107
|
+
| `ga` | Stage hunk under cursor |
|
|
108
|
+
| `gu` | Unstage hunk (staged mode) |
|
|
109
|
+
| `gx` | Discard hunk |
|
|
110
|
+
| `gc` | Commit with message prompt |
|
|
111
|
+
|
|
82
112
|
## Comment Storage
|
|
83
113
|
|
|
84
114
|
Comments are saved to `.nit.json` at the root of your git repository. The format is structured JSON:
|
|
@@ -6,6 +6,12 @@ Navigate diffs with vim-style keybindings, leave comments on specific lines, and
|
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
|
+
```bash
|
|
10
|
+
brew install joshuazd/tap/nit
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or via pip/pipx:
|
|
14
|
+
|
|
9
15
|
```bash
|
|
10
16
|
pipx install nit-cli
|
|
11
17
|
```
|
|
@@ -33,11 +39,20 @@ nit --mode all
|
|
|
33
39
|
nit HEAD~3..HEAD
|
|
34
40
|
nit main..feature
|
|
35
41
|
|
|
42
|
+
# Review any file (read-only, no git required)
|
|
43
|
+
nit path/to/file.py
|
|
44
|
+
|
|
36
45
|
# Filter to specific files or directories
|
|
37
46
|
nit --path src/
|
|
38
47
|
nit --path src/nit/app.py main..feature
|
|
48
|
+
|
|
49
|
+
# Export comments on quit
|
|
50
|
+
nit --export-comments comments.md
|
|
51
|
+
nit --export-comments - --export-format json # stdout as JSON
|
|
39
52
|
```
|
|
40
53
|
|
|
54
|
+
On main/master, nit defaults to unstaged mode. On feature branches, it defaults to branch diff. The diff auto-refreshes every 5 seconds.
|
|
55
|
+
|
|
41
56
|
## Keybindings
|
|
42
57
|
|
|
43
58
|
| Key | Action |
|
|
@@ -46,12 +61,27 @@ nit --path src/nit/app.py main..feature
|
|
|
46
61
|
| `J` / `K` | Jump to next / previous hunk |
|
|
47
62
|
| `n` / `p` | Next / previous file |
|
|
48
63
|
| `]` / `[` | Jump to next / previous comment |
|
|
64
|
+
| `gg` / `G` | Jump to top / bottom |
|
|
49
65
|
| `c` | Add comment on current line |
|
|
50
66
|
| `d` | Delete comment on current line |
|
|
51
|
-
| `
|
|
67
|
+
| `e` | Export comments to clipboard |
|
|
68
|
+
| `m` | Cycle diff mode (branch / unstaged / staged / all) |
|
|
69
|
+
| `s` | Toggle side-by-side diff view |
|
|
70
|
+
| `w` | Toggle word-level diff highlighting |
|
|
71
|
+
| `W` | Toggle hide whitespace-only changes |
|
|
72
|
+
| `h` | Toggle syntax highlighting |
|
|
52
73
|
| `r` | Refresh diff |
|
|
53
74
|
| `q` | Quit |
|
|
54
75
|
|
|
76
|
+
### Git operations (g-prefixed)
|
|
77
|
+
|
|
78
|
+
| Key | Action |
|
|
79
|
+
|-----|--------|
|
|
80
|
+
| `ga` | Stage hunk under cursor |
|
|
81
|
+
| `gu` | Unstage hunk (staged mode) |
|
|
82
|
+
| `gx` | Discard hunk |
|
|
83
|
+
| `gc` | Commit with message prompt |
|
|
84
|
+
|
|
55
85
|
## Comment Storage
|
|
56
86
|
|
|
57
87
|
Comments are saved to `.nit.json` at the root of your git repository. The format is structured JSON:
|