@kud/revu-cli 1.0.12 → 1.1.0

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.
Files changed (3) hide show
  1. package/README.md +41 -44
  2. package/bin/revu.js +16 -7
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -1,16 +1,32 @@
1
- <p align="center">
2
- <img src="assets/revu-logo.png" width="200" alt="revu logo" />
3
- </p>
1
+ <div align="center">
4
2
 
5
- # revu
3
+ ![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white)
4
+ ![Bun](https://img.shields.io/badge/Bun-000000?style=flat-square&logo=bun&logoColor=white)
5
+ ![npm](https://img.shields.io/npm/v/@kud/revu-cli?style=flat-square&color=CB3837)
6
+ ![MIT](https://img.shields.io/badge/licence-MIT-22C55E?style=flat-square)
6
7
 
7
- Interactive terminal diff reviewer. Annotate diffs, export reviews to Markdown.
8
+ **Interactive terminal diff reviewer**
8
9
 
9
- <p align="center">
10
- <a href="https://asciinema.org/a/SitNPy6fQpidFCcH">
11
- <img src="assets/demo.gif" alt="revu demo" />
12
- </a>
13
- </p>
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
- ```sh
24
- # Review staged/unstaged changes in the current repo
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
- # Review a specific file
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
- # Review all commits between a branch and HEAD (PR mode)
31
- revu --against main
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
- ## Keys
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/revu.js CHANGED
@@ -1,6 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from "module"
3
3
  import { spawnSync } from "child_process"
4
+ import { fileURLToPath } from "url"
5
+ import { join, dirname } from "path"
6
+ import { existsSync } from "fs"
4
7
 
5
8
  const require = createRequire(import.meta.url)
6
9
 
@@ -25,14 +28,20 @@ if (!pkg) {
25
28
  process.exit(1)
26
29
  }
27
30
 
31
+ const localBin = join(dirname(fileURLToPath(import.meta.url)), "../revu-bin")
32
+
28
33
  let binaryPath
29
- try {
30
- binaryPath = require.resolve(`${pkg}/revu-bin`)
31
- } catch {
32
- console.error(
33
- `revu-cli: could not find binary for ${platform}. Try reinstalling revu-cli.`,
34
- )
35
- process.exit(1)
34
+ if (existsSync(localBin)) {
35
+ binaryPath = localBin
36
+ } else {
37
+ try {
38
+ binaryPath = require.resolve(`${pkg}/revu-bin`)
39
+ } catch {
40
+ console.error(
41
+ `revu-cli: could not find binary for ${platform}. Try reinstalling revu-cli.`,
42
+ )
43
+ process.exit(1)
44
+ }
36
45
  }
37
46
 
38
47
  const result = spawnSync(binaryPath, process.argv.slice(2), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/revu-cli",
3
- "version": "1.0.12",
3
+ "version": "1.1.0",
4
4
  "description": "Interactive terminal diff reviewer",
5
5
  "module": "index.ts",
6
6
  "type": "module",
@@ -23,9 +23,9 @@
23
23
  "bump:major": "bun scripts/bump.ts major"
24
24
  },
25
25
  "optionalDependencies": {
26
- "@kud/revu-cli-darwin-arm64": "1.0.12",
27
- "@kud/revu-cli-linux-x64": "1.0.12",
28
- "@kud/revu-cli-linux-arm64": "1.0.12"
26
+ "@kud/revu-cli-darwin-arm64": "1.1.0",
27
+ "@kud/revu-cli-linux-x64": "1.1.0",
28
+ "@kud/revu-cli-linux-arm64": "1.1.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/bun": "latest"