kodevu 0.1.44 → 0.1.45

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 +31 -19
  2. package/package.json +1 -1
  3. package/src/config.js +4 -0
package/README.md CHANGED
@@ -12,25 +12,13 @@ Kodevu is designed to be stateless and requires no configuration files. It relie
12
12
 
13
13
  ## Quick Start
14
14
 
15
- Review the latest commit in your repository:
15
+ Get a review of your latest commit in seconds:
16
16
 
17
17
  ```bash
18
18
  npx kodevu .
19
19
  ```
20
20
 
21
- Review the latest 3 commits:
22
-
23
- ```bash
24
- npx kodevu . --last 3
25
- ```
26
-
27
- Review a specific commit:
28
-
29
- ```bash
30
- npx kodevu . --rev abc1234
31
- ```
32
-
33
- Reports are written to `~/.kodevu/` by default.
21
+ Review reports are saved to `~/.kodevu/` by default.
34
22
 
35
23
  ## Usage
36
24
 
@@ -43,7 +31,7 @@ npx kodevu [target] [options]
43
31
  - `target`: Repository path (Git) or SVN URL/Working copy (default: `.`).
44
32
  - `--reviewer, -r`: `codex`, `gemini`, `copilot`, or `auto` (default: `auto`).
45
33
  - `--rev, -v`: A specific revision or commit hash to review.
46
- - `--last, -n`: Number of latest revisions to review (default: 1).
34
+ - `--last, -n`: Number of latest revisions to review (default: 1). Use negative values (e.g., `-3`) to review only the 3rd commit from the top.
47
35
  - `--lang, -l`: Output language (e.g., `zh`, `en`, `auto`).
48
36
  - `--prompt, -p`: Additional instructions for the reviewer. Use `@file.txt` to read from a file.
49
37
  - `--output, -o`: Report output directory (default: `~/.kodevu`).
@@ -51,6 +39,9 @@ npx kodevu [target] [options]
51
39
  - `--debug, -d`: Print debug information.
52
40
  - `--version, -V`: Print the current version and exit.
53
41
 
42
+ > [!IMPORTANT]
43
+ > `--rev` and `--last` are mutually exclusive. Specifying both will result in an error.
44
+
54
45
  ### Environment Variables
55
46
 
56
47
  You can set these in your shell to change default behavior without typing flags every time:
@@ -63,17 +54,38 @@ You can set these in your shell to change default behavior without typing flags
63
54
 
64
55
  ## Examples
65
56
 
66
- **Review with a custom prompt from a file:**
57
+ ### Selecting Revisions
58
+
59
+ Review the **latest 3** commits:
60
+ ```bash
61
+ npx kodevu . --last 3
62
+ ```
63
+
64
+ Review **only the 3rd** latest commit:
65
+ ```bash
66
+ npx kodevu . --last -3
67
+ ```
68
+
69
+ Review a **specific commit** hash:
70
+ ```bash
71
+ npx kodevu . --rev abc1234
72
+ ```
73
+
74
+ ### Options & Formatting
75
+
76
+ Review using **custom instructions** from a file:
67
77
  ```bash
68
78
  npx kodevu . --prompt @my-rules.txt
69
79
  ```
70
80
 
71
- **Generate JSON reports in a local folder:**
81
+ Generate **JSON reports** in a local folder:
72
82
  ```bash
73
- npx kodevu . --format json --output ./review-reports
83
+ npx kodevu . --format json --output ./reports
74
84
  ```
75
85
 
76
- **Set a persistent reviewer via ENV:**
86
+ ### Environment Variables
87
+
88
+ Set a **persistent reviewer** for your shell session:
77
89
  ```bash
78
90
  export KODEVU_REVIEWER=gemini
79
91
  npx kodevu .
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kodevu",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Poll SVN revisions or Git commits, send each change diff to a reviewer CLI, and write configurable review reports.",
package/src/config.js CHANGED
@@ -221,6 +221,10 @@ export async function resolveConfig(cliArgs = {}) {
221
221
  }
222
222
  }
223
223
 
224
+ if (cliArgs.rev && cliArgs.last) {
225
+ throw new Error("Parameters --rev and --last are mutually exclusive. Please specify only one.");
226
+ }
227
+
224
228
  if (!config.target) {
225
229
  config.target = process.cwd();
226
230
  }