kodevu 0.1.54 → 0.1.55
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 +2 -7
- package/SKILL.md +27 -9
- package/package.json +1 -1
- package/src/utils.js +2 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Kodevu
|
|
2
2
|
|
|
3
|
+
> The name **Kodevu** is a phonetic play on "code review".
|
|
4
|
+
|
|
3
5
|
A Node.js tool that fetches Git commits or SVN revisions, sends the diff to a supported AI reviewer CLI, and writes review results to report files.
|
|
4
6
|
|
|
5
7
|
## Pure & Zero Config
|
|
@@ -127,13 +129,6 @@ npx kodevu . \
|
|
|
127
129
|
--openai-model gpt-5-mini
|
|
128
130
|
```
|
|
129
131
|
|
|
130
|
-
## How it Works
|
|
131
|
-
|
|
132
|
-
- **Git Targets**: `target` must be a local repository or subdirectory.
|
|
133
|
-
- **SVN Targets**: `target` can be a working copy path or repository URL.
|
|
134
|
-
- **Reviewer "auto"**: Probes `codex`, `gemini`, and `copilot` in your `PATH` and selects one.
|
|
135
|
-
- **Reviewer "openai"**: Calls the OpenAI Chat Completions API directly. `auto` does not select `openai`, so API-based use stays explicit.
|
|
136
|
-
- **Contextual Review**: For local repositories, the reviewer can inspect related files beyond the diff to provide deeper insights.
|
|
137
132
|
|
|
138
133
|
## License
|
|
139
134
|
|
package/SKILL.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: kodevu
|
|
3
|
-
description: A tool to fetch Git
|
|
3
|
+
description: A tool to fetch Git/SVN diffs, send them to an AI reviewer, and generate configurable code review reports.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Kodevu Skill
|
|
7
7
|
|
|
8
|
-
Kodevu is a Node.js tool that fetches Git commits or SVN revisions, sends the diff to a supported AI reviewer CLI, and writes review results to report files.
|
|
8
|
+
Kodevu is a Node.js tool that fetches Git commits or SVN revisions, sends the diff to a supported AI reviewer CLI, and writes review results to report files. It is designed to be **stateless** and requires **no configuration files**.
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
|
-
Use `npx kodevu` to review a codebase.
|
|
12
|
+
Use `npx kodevu` to review a codebase.
|
|
13
13
|
|
|
14
14
|
### Reviewing the latest commit
|
|
15
15
|
|
|
@@ -29,13 +29,19 @@ npx kodevu . --rev <commit-hash>
|
|
|
29
29
|
npx kodevu . --last 3
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
### Reviewing uncommitted changes
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx kodevu . --uncommitted
|
|
36
|
+
```
|
|
37
|
+
|
|
32
38
|
### Supported Reviewers
|
|
33
39
|
|
|
34
|
-
`kodevu` supports several AI reviewer
|
|
40
|
+
`kodevu` supports several AI reviewer backends: `auto`, `openai`, `gemini`, `codex`, `copilot`. The default is `auto`, which probes available CLI tools in your `PATH`.
|
|
35
41
|
|
|
36
42
|
Example using OpenAI:
|
|
37
43
|
```bash
|
|
38
|
-
npx kodevu . --reviewer openai --openai-api-key <YOUR_API_KEY> --openai-model gpt-
|
|
44
|
+
npx kodevu . --reviewer openai --openai-api-key <YOUR_API_KEY> --openai-model gpt-5-mini
|
|
39
45
|
```
|
|
40
46
|
|
|
41
47
|
### Generating JSON Reports
|
|
@@ -45,19 +51,31 @@ By default, review reports are generated as Markdown files in `~/.kodevu/`. You
|
|
|
45
51
|
npx kodevu . --format json --output ./reports
|
|
46
52
|
```
|
|
47
53
|
|
|
48
|
-
###
|
|
54
|
+
### Custom Prompts
|
|
49
55
|
|
|
50
|
-
You can provide
|
|
56
|
+
You can provide additional instructions to the reviewer using `--prompt`:
|
|
51
57
|
```bash
|
|
52
58
|
npx kodevu . --prompt "Focus on security issues and suggest optimizations."
|
|
53
59
|
```
|
|
54
60
|
Or from a file: `--prompt @my-rules.txt`
|
|
55
61
|
|
|
62
|
+
### Environment Variables
|
|
63
|
+
|
|
64
|
+
All options can also be set via environment variables to avoid repetitive flags:
|
|
65
|
+
|
|
66
|
+
- `KODEVU_REVIEWER` – Default reviewer.
|
|
67
|
+
- `KODEVU_LANG` – Default output language.
|
|
68
|
+
- `KODEVU_OUTPUT_DIR` – Default output directory.
|
|
69
|
+
- `KODEVU_PROMPT` – Default prompt instructions.
|
|
70
|
+
- `KODEVU_OPENAI_API_KEY` – API key for `openai`.
|
|
71
|
+
- `KODEVU_OPENAI_BASE_URL` – Base URL for `openai`.
|
|
72
|
+
- `KODEVU_OPENAI_MODEL` – Model for `openai`.
|
|
73
|
+
|
|
56
74
|
## Working with Target Repositories
|
|
57
75
|
|
|
58
|
-
- `target
|
|
76
|
+
- **Git**: `target` must be a local repository or subdirectory.
|
|
77
|
+
- **SVN**: `target` can be a working copy path or repository URL.
|
|
59
78
|
|
|
60
|
-
For example, to run on a specific path, you can use:
|
|
61
79
|
```bash
|
|
62
80
|
npx kodevu /path/to/project --last 1
|
|
63
81
|
```
|
package/package.json
CHANGED
package/src/utils.js
CHANGED
|
@@ -50,9 +50,10 @@ export function formatDate(dateInput) {
|
|
|
50
50
|
const hours = pad(d.getHours());
|
|
51
51
|
const minutes = pad(d.getMinutes());
|
|
52
52
|
const seconds = pad(d.getSeconds());
|
|
53
|
+
const milliseconds = String(d.getMilliseconds()).padStart(3, "0");
|
|
53
54
|
const offset = `${sign}${pad(offsetHours)}:${pad(offsetMins)}`;
|
|
54
55
|
|
|
55
|
-
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds} ${offset}`;
|
|
56
|
+
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}.${milliseconds} ${offset}`;
|
|
56
57
|
}
|
|
57
58
|
export function getTimestampPrefix() {
|
|
58
59
|
const now = new Date();
|