@kud/revu-cli 1.0.13 → 1.1.1
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.
- package/README.md +41 -44
- package/bin/release.sh +28 -0
- package/bin/revu.js +8 -7
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -1,16 +1,32 @@
|
|
|
1
|
-
<
|
|
2
|
-
<img src="assets/revu-logo.png" width="200" alt="revu logo" />
|
|
3
|
-
</p>
|
|
1
|
+
<div align="center">
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
6
7
|
|
|
7
|
-
Interactive terminal diff reviewer
|
|
8
|
+
**Interactive terminal diff reviewer**
|
|
8
9
|
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
<a href="https://kud.io/projects/revu-cli">Website</a> · <a href="https://kud.io/projects/revu-cli/docs">Documentation</a>
|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- **Line and range annotations** — comment on a single line or select a range and annotate the whole block.
|
|
17
|
+
- **Hunk and file navigation** — jump between hunks, annotations, and files without leaving the keyboard.
|
|
18
|
+
- **PR mode** — review every commit between a branch and `HEAD` with `--against`.
|
|
19
|
+
- **Markdown export** — export annotations to `revu-review.md`, with an optional AI context header, by pressing `e`.
|
|
20
|
+
- **Persistent reviews** — annotations autosave to `.revu.json` and survive across sessions.
|
|
21
|
+
- **Themeable** — switch theme and view mode from an in-app settings panel, saved to your user config.
|
|
22
|
+
|
|
23
|
+
<div align="center">
|
|
24
|
+
|
|
25
|
+
<a href="https://asciinema.org/a/SitNPy6fQpidFCcH">
|
|
26
|
+
<img src="assets/demo.gif" alt="revu demo" />
|
|
27
|
+
</a>
|
|
28
|
+
|
|
29
|
+
</div>
|
|
14
30
|
|
|
15
31
|
## Install
|
|
16
32
|
|
|
@@ -20,41 +36,22 @@ npm install -g @kud/revu-cli
|
|
|
20
36
|
|
|
21
37
|
## Usage
|
|
22
38
|
|
|
23
|
-
```
|
|
24
|
-
#
|
|
25
|
-
revu
|
|
39
|
+
```console
|
|
40
|
+
$ revu # review staged/unstaged changes in the current repo
|
|
41
|
+
$ revu src/foo.ts # review a specific file
|
|
42
|
+
$ revu --against main # review all commits between a branch and HEAD (PR mode)
|
|
43
|
+
```
|
|
26
44
|
|
|
27
|
-
|
|
28
|
-
revu src/foo.ts
|
|
45
|
+
Inside the reviewer, move with `↑↓` / `j k`, press `↵` to annotate a line, hold `shift` to select a range, and `e` to export to `revu-review.md`.
|
|
29
46
|
|
|
30
|
-
|
|
31
|
-
|
|
47
|
+
## Development
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
git clone https://github.com/kud/revu-cli.git
|
|
51
|
+
cd revu-cli
|
|
52
|
+
mise install
|
|
53
|
+
mise run dev # run in hot-reload mode
|
|
54
|
+
mise run build # compile a standalone binary
|
|
32
55
|
```
|
|
33
56
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
| Key | Action |
|
|
37
|
-
| ------------ | ---------------------------------------------------------------------------------- |
|
|
38
|
-
| `↑↓` / `j k` | Move cursor |
|
|
39
|
-
| `shift+↑↓` | Select range |
|
|
40
|
-
| `↵` | Annotate line / range |
|
|
41
|
-
| `d` | Delete annotation |
|
|
42
|
-
| `] [` | Next / prev hunk |
|
|
43
|
-
| `c C` | Next / prev annotation |
|
|
44
|
-
| `n p` | Next / prev file |
|
|
45
|
-
| `{ }` | Scroll annotation preview |
|
|
46
|
-
| `←` | Back to file tree |
|
|
47
|
-
| `e` | Export annotations to `revu-review.md` (prompts for an optional AI context header) |
|
|
48
|
-
| `s` | Settings (theme, view) |
|
|
49
|
-
| `q` | Quit |
|
|
50
|
-
|
|
51
|
-
## Files
|
|
52
|
-
|
|
53
|
-
| File | Purpose |
|
|
54
|
-
| ---------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
55
|
-
| `.revu.json` | Autosaved annotations (JSON). Persists across sessions. Compatible with the revu VSCode extension. Do not edit manually. |
|
|
56
|
-
| `revu-review.md` | Markdown export for human and AI review. Generated by pressing `e`. Safe to delete after use. |
|
|
57
|
-
|
|
58
|
-
## Config
|
|
59
|
-
|
|
60
|
-
Press `s` inside revu to open settings. Changes are saved automatically to `~/.config/revu/settings.json` (theme and view mode).
|
|
57
|
+
📚 **Full documentation → [revu-cli/docs](https://kud.io/projects/revu-cli/docs)**
|
package/bin/release.sh
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Repo-local release policy, detected and used by /k-release (Step 0.5).
|
|
3
|
+
#
|
|
4
|
+
# revu-cli ships a main package (@kud/revu-cli) plus three platform sub-packages
|
|
5
|
+
# (npm-packages/{darwin-arm64,linux-x64,linux-arm64}) whose versions must stay in
|
|
6
|
+
# lockstep, or the CI publish rejects a re-published version. scripts/bump.ts
|
|
7
|
+
# handles that sync + commit + tag + push. Generic `git lzv` only bumps the root
|
|
8
|
+
# package and is unaware of the sub-packages, so releases MUST route through here.
|
|
9
|
+
set -euo pipefail
|
|
10
|
+
|
|
11
|
+
bump="${1:-patch}"
|
|
12
|
+
case "$bump" in
|
|
13
|
+
patch | minor | major) ;;
|
|
14
|
+
*)
|
|
15
|
+
echo "Usage: bin/release.sh [patch|minor|major]" >&2
|
|
16
|
+
exit 1
|
|
17
|
+
;;
|
|
18
|
+
esac
|
|
19
|
+
|
|
20
|
+
repo_root="$(cd "$(dirname "$0")/.." && pwd)"
|
|
21
|
+
cd "$repo_root"
|
|
22
|
+
|
|
23
|
+
# /k-release writes CHANGELOG.md before invoking this script. scripts/bump.ts
|
|
24
|
+
# only stages the version files, so stage the changelog here to fold it into the
|
|
25
|
+
# same release commit.
|
|
26
|
+
git add CHANGELOG.md 2>/dev/null || true
|
|
27
|
+
|
|
28
|
+
exec bun run "bump:${bump}"
|
package/bin/revu.js
CHANGED
|
@@ -28,14 +28,15 @@ if (!pkg) {
|
|
|
28
28
|
process.exit(1)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
const localBin = join(dirname(fileURLToPath(import.meta.url)), "../revu-bin")
|
|
32
|
+
|
|
31
33
|
let binaryPath
|
|
32
|
-
|
|
33
|
-
binaryPath =
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} else {
|
|
34
|
+
if (existsSync(localBin)) {
|
|
35
|
+
binaryPath = localBin
|
|
36
|
+
} else {
|
|
37
|
+
try {
|
|
38
|
+
binaryPath = require.resolve(`${pkg}/revu-bin`)
|
|
39
|
+
} catch {
|
|
39
40
|
console.error(
|
|
40
41
|
`revu-cli: could not find binary for ${platform}. Try reinstalling revu-cli.`,
|
|
41
42
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/revu-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Interactive terminal diff reviewer",
|
|
5
5
|
"module": "index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -23,9 +23,12 @@
|
|
|
23
23
|
"bump:major": "bun scripts/bump.ts major"
|
|
24
24
|
},
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"@kud/revu-cli-darwin-arm64": "1.
|
|
27
|
-
"@kud/revu-cli-linux-x64": "1.
|
|
28
|
-
"@kud/revu-cli-linux-arm64": "1.
|
|
26
|
+
"@kud/revu-cli-darwin-arm64": "1.1.1",
|
|
27
|
+
"@kud/revu-cli-linux-x64": "1.1.1",
|
|
28
|
+
"@kud/revu-cli-linux-arm64": "1.1.1",
|
|
29
|
+
"@opentui/core-darwin-arm64": "0.1.96",
|
|
30
|
+
"@opentui/core-linux-arm64": "0.1.96",
|
|
31
|
+
"@opentui/core-linux-x64": "0.1.96"
|
|
29
32
|
},
|
|
30
33
|
"devDependencies": {
|
|
31
34
|
"@types/bun": "latest"
|
|
@@ -34,10 +37,7 @@
|
|
|
34
37
|
"typescript": "^5"
|
|
35
38
|
},
|
|
36
39
|
"dependencies": {
|
|
37
|
-
"@opentui/core": "0.1.95"
|
|
38
|
-
"@opentui/core-darwin-arm64": "0.1.96",
|
|
39
|
-
"@opentui/core-linux-arm64": "0.1.96",
|
|
40
|
-
"@opentui/core-linux-x64": "0.1.96"
|
|
40
|
+
"@opentui/core": "0.1.95"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|
|
43
43
|
"type": "git",
|