@reviewsensei/cli 0.6.12 → 0.6.15

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 (2) hide show
  1. package/README.md +145 -12
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -1,19 +1,152 @@
1
1
  # @reviewsensei/cli
2
2
 
3
- This package is a small, shell-free launcher for the ReviewSensei native
4
- standalone executable. It forwards the command line to the optional package
5
- for the current supported operating-system/architecture pair; review logic
6
- continues to live in the Python `review_sensei.cli:main` entry point bundled
7
- by PyInstaller.
3
+ ReviewSensei is an open-source, provider-neutral AI code review engine. Give it
4
+ a unified Git diff to get a validated summary and findings tied to changed
5
+ files and lines. It selects review lenses by changed path, can attach bounded
6
+ context from a trusted checkout, calls your configured model, and validates its
7
+ structured response. Review coverage and incomplete results remain visible.
8
8
 
9
- Requirements: Node.js 22 or newer and an external `git` executable when using
10
- `prepare-diff`. The launcher never downloads a runtime, runs an install hook,
11
- or contacts a provider. Install the exact version and invoke it with:
9
+ This npm package runs the same Python review engine as the `review-sensei`
10
+ Python package through a bundled native executable. A separate Python
11
+ installation is unnecessary. It works for local reviews and scripted CI use;
12
+ the repository's reusable GitHub workflow is a separate integration.
13
+ This guide describes the engine bundled with this package version; CLI
14
+ `--help` and the linked engine references are the shared option and contract
15
+ reference, rather than an independent npm API.
16
+
17
+ ## Install and run
18
+
19
+ Use Node.js 22 or newer. Supported targets are macOS arm64/x64, Linux arm64/x64
20
+ with glibc 2.36 or newer, and Windows x64. Target selection follows Node's
21
+ operating system and architecture. Linux musl and other architectures are
22
+ unsupported. Keep npm optional dependencies enabled: the launcher needs its
23
+ exact-version platform package and reports an error if it is missing.
24
+
25
+ ```console
26
+ npm install --save-dev @reviewsensei/cli@0.6.15
27
+ npx review-sensei --version
28
+ npx review-sensei --help
29
+ ```
30
+
31
+ Or run an exact version without adding a project dependency:
32
+
33
+ ```console
34
+ npx --yes @reviewsensei/cli@0.6.15 --help
35
+ ```
36
+
37
+ From your repository directory, create a patch and review it with a reachable
38
+ local Ollama server and an installed model. `prepare-diff` requires an external
39
+ `git` executable; npm itself installs the platform package.
40
+
41
+ ```console
42
+ npx review-sensei prepare-diff --repository . --base-ref main --head-ref HEAD --output pr.patch
43
+ npx review-sensei --diff pr.patch --provider local-ollama --model qwen3.5:8b
44
+ ```
45
+
46
+ The launcher has no install hook or runtime downloader. Model requests are made
47
+ by the engine when you run a review using the selected provider.
48
+
49
+ ## Configuration and forwarded arguments
50
+
51
+ The launcher forwards every CLI argument unchanged, without a shell, to the
52
+ bundled Python engine. It inherits the current directory, environment, and
53
+ terminal streams. Relative paths, including paths containing spaces, therefore
54
+ resolve from your working directory. Quote each such argument in your shell:
55
+
56
+ ```console
57
+ npx review-sensei --config "config/review settings.yml" --diff "patches/my change.patch" --format json --output "reports/review result.json"
58
+ ```
59
+
60
+ The engine reads `.reviewsensei.yml` in the current directory by default, or the
61
+ file supplied with `--config`. There is no separate npm configuration schema.
62
+ Without a configuration file, packaged defaults select a local Ollama backend.
63
+ For example:
64
+
65
+ ```yaml
66
+ schema: 1
67
+ inference:
68
+ backend: local-ollama
69
+ model: qwen3.5:8b
70
+ advanced:
71
+ resources:
72
+ timeout_seconds: 300
73
+ max_provider_calls: 8
74
+ ```
75
+
76
+ Inference precedence is CLI `--provider`/`--model`, then environment
77
+ `REVIEWSENSEI_PROVIDER`/`REVIEWSENSEI_MODEL`, then YAML `inference.backend`/
78
+ `inference.model`, then packaged defaults. Environment overrides therefore
79
+ take precedence over YAML, including in CI. Unset those variables when you
80
+ want YAML to select the backend and model, or inspect the effective settings
81
+ with `npx review-sensei config show --explain`. This is the engine's explicit
82
+ operator-override behavior; npm does not add another precedence layer. The
83
+ backends for live reviews are
84
+ `local-ollama`, `cloud-ollama`, `openrouter`, and `openai-compatible`.
85
+
86
+ | Backend | Authentication |
87
+ | --- | --- |
88
+ | `local-ollama` | No credential by default; requires a reachable local Ollama server |
89
+ | `cloud-ollama` | `OLLAMA_API_KEY` |
90
+ | `openrouter` | `OPENROUTER_API_KEY` |
91
+ | `openai-compatible` | `OPENAI_API_KEY` for its default OpenAI endpoint |
92
+
93
+ Set credentials in your shell or CI secret store, never in the YAML or patch.
94
+ An inherited credential does not select a backend. After setting
95
+ `OLLAMA_API_KEY`, for example, a cloud review is:
12
96
 
13
97
  ```console
14
- npx --yes @reviewsensei/cli@0.6.12 --version
98
+ npx review-sensei --diff pr.patch --provider cloud-ollama --model deepseek-v4.1-flash:cloud
15
99
  ```
16
100
 
17
- Supported targets are macOS arm64/x64, Linux arm64/x64 with glibc 2.36 or
18
- newer, and Windows x64. Linux musl systems and other architectures fail with a
19
- bounded unsupported-target error.
101
+ These backend names and `--api-key-env`/`--allow-custom-endpoint` are accepted
102
+ by the engine's review parser; `fixture` is a separate repository test seam.
103
+ `--api-key-env` selects an explicitly named credential variable. Endpoint
104
+ overrides use `--base-url` and, for custom OpenAI-compatible endpoints,
105
+ `--allow-custom-endpoint`; see the configuration reference for validation and
106
+ credential-routing rules. `review-sensei config --help` and
107
+ `review-sensei doctor --help` describe configuration inspection and diagnostics.
108
+
109
+ ## Review lenses, context, and output
110
+
111
+ Packaged stages and categories provide the default lenses. Custom JSON category
112
+ and stage directories use `--categories-dir` together with `--stages-dir`;
113
+ `--categories-dir` requires `--stages-dir`. See the stage/category reference for
114
+ path selectors, focus items, and declared document sources. These flags use
115
+ the Python engine's existing formats.
116
+
117
+ Use `--instructions` for explicit review guidance, `--context-root` for a trusted
118
+ target-branch checkout, and `--learning-root` for approved repository learnings.
119
+ Optional document selection and verbatim excerpts report loss and provenance;
120
+ `--context-selection-output selection.json` writes a metadata-only inventory.
121
+ Selection is distinct from complete review coverage.
122
+
123
+ ```console
124
+ npx review-sensei --diff pr.patch --title "My change" --context-root ../trusted-main --format markdown --output review.md
125
+ ```
126
+
127
+ Text is the default output. `--format markdown` or `--format json` selects a
128
+ rendered report, and `--output` writes it to a file. Warnings and diagnostics go
129
+ to stderr. The launcher returns the engine's exit code: `0` means a completed
130
+ review with no required fixes, `1` means required fixes remain, and `2` means
131
+ the review could not complete. Partial coverage does not establish full
132
+ approval. `--exit-semantics operational` instead returns `0` for non-failure
133
+ engine outcomes, including partial, skipped, and already-published runs, and
134
+ `1` for failures or required human action; launcher startup errors also return
135
+ `1`. Neither operational code establishes full review coverage or approval.
136
+ Exit code `1` alone cannot distinguish an engine failure from a launcher
137
+ failure. Inspect stderr and any structured engine outcome requested with
138
+ `--outcome outcome.json`
139
+ for status and diagnostics. Early failures may not write an outcome, and a
140
+ launcher failure cannot produce an engine outcome file. Use a fresh output path
141
+ so an old file cannot be mistaken for the current result.
142
+
143
+ A local review prints or writes its report; GitHub publication is a separate
144
+ workflow/command with its own authorization. Selecting a remote provider sends
145
+ the supplied review data to that provider. Review the data-handling guidance
146
+ before using private source or context.
147
+
148
+ - [Provider configuration](https://github.com/malsabbagh/review-sensei/blob/main/README.md#providers)
149
+ - [Stages and categories](https://github.com/malsabbagh/review-sensei/blob/main/README.md#structured-review-stages)
150
+ - [Installation](https://github.com/malsabbagh/review-sensei/blob/main/docs/installation.md)
151
+ - [Data handling](https://github.com/malsabbagh/review-sensei/blob/main/docs/data-handling.md)
152
+ - [Source and issues](https://github.com/malsabbagh/review-sensei)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@reviewsensei/cli",
3
- "version": "0.6.12",
4
- "description": "ReviewSensei launcher for the native standalone CLI",
3
+ "version": "0.6.15",
4
+ "description": "Provider-neutral AI code review CLI with configurable models, review lenses, and validated diff findings",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -14,11 +14,11 @@
14
14
  "review-sensei": "bin/review-sensei.js"
15
15
  },
16
16
  "optionalDependencies": {
17
- "@reviewsensei/cli-darwin-arm64": "0.6.12",
18
- "@reviewsensei/cli-darwin-x64": "0.6.12",
19
- "@reviewsensei/cli-linux-arm64-gnu": "0.6.12",
20
- "@reviewsensei/cli-linux-x64-gnu": "0.6.12",
21
- "@reviewsensei/cli-win32-x64": "0.6.12"
17
+ "@reviewsensei/cli-darwin-arm64": "0.6.15",
18
+ "@reviewsensei/cli-darwin-x64": "0.6.15",
19
+ "@reviewsensei/cli-linux-arm64-gnu": "0.6.15",
20
+ "@reviewsensei/cli-linux-x64-gnu": "0.6.15",
21
+ "@reviewsensei/cli-win32-x64": "0.6.15"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"