repopilot 0.14.0 → 0.15.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.
- package/README.md +60 -181
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -4,237 +4,123 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/repopilot)
|
|
5
5
|
[](https://github.com/MykytaStel/repopilot/actions)
|
|
6
6
|
[](https://github.com/MykytaStel/repopilot/releases)
|
|
7
|
+
[](https://crates.io/crates/repopilot)
|
|
7
8
|
[](LICENSE)
|
|
8
9
|
[](https://github.com/MykytaStel/repopilot)
|
|
9
10
|
|
|
10
|
-
**
|
|
11
|
-
|
|
12
|
-
RepoPilot is a fast Rust CLI that scans a repository locally, ranks evidence-backed risks, supports baseline adoption, reviews branches, and creates AI-ready remediation context without uploading source code.
|
|
11
|
+
**See what your AI agent — or you — just changed, before you merge.**
|
|
12
|
+
RepoPilot is a fast, local-first Rust CLI that reviews a Git change and flags when it crossed a **security boundary** — the parts of your repo that decide *who can do what* (auth, sessions, permissions, CORS) and *how it ships* (CI, Dockerfiles, dependencies, committed `.env`) — then shows how far each changed file reaches. It's deterministic, runs entirely on your machine, and plugs into your AI coding agent over [MCP](#use-with-ai-agents-mcp). Nothing is uploaded.
|
|
13
13
|
|
|
14
14
|
```text
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
RepoPilot is not a replacement for language linters, formatters, type checkers, or dedicated security scanners. It complements them with repository-level evidence: secrets, runtime footguns, architecture risk, review blast radius, baseline status, and report formats that work in CI.
|
|
19
|
-
|
|
20
|
-
## Install
|
|
21
|
-
|
|
22
|
-
Choose one install method.
|
|
23
|
-
|
|
24
|
-
Cargo:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
cargo install repopilot
|
|
15
|
+
review a change -> boundary + blast radius -> baseline / CI gate -> local AI context
|
|
28
16
|
```
|
|
29
17
|
|
|
30
|
-
|
|
18
|
+
<p align="center">
|
|
19
|
+
<img src="docs/demos/02-review.gif" alt="RepoPilot reviewing a branch change" width="800">
|
|
20
|
+
</p>
|
|
31
21
|
|
|
32
|
-
|
|
33
|
-
npm install -g repopilot
|
|
34
|
-
```
|
|
22
|
+
> RepoPilot flags *that* a boundary moved and how far it reaches — it does **not** prove the change is safe. Think "open the report before merging," not "security audit." It complements linters, type checkers, and dedicated security scanners; it doesn't replace them.
|
|
35
23
|
|
|
36
|
-
|
|
24
|
+
## Install
|
|
37
25
|
|
|
38
26
|
```bash
|
|
39
|
-
|
|
40
|
-
brew install repopilot
|
|
27
|
+
cargo install repopilot # or: npm install -g repopilot
|
|
41
28
|
```
|
|
42
29
|
|
|
43
|
-
|
|
30
|
+
Homebrew, install script, and from-source: [docs/install.md](docs/install.md).
|
|
44
31
|
|
|
45
|
-
|
|
46
|
-
curl -fsSL https://raw.githubusercontent.com/MykytaStel/repopilot/main/install.sh | bash
|
|
47
|
-
```
|
|
32
|
+
## Quick start
|
|
48
33
|
|
|
49
|
-
|
|
34
|
+
Review a change — what you'd check before merging, and what an agent can check on its own edits:
|
|
50
35
|
|
|
51
36
|
```bash
|
|
52
|
-
|
|
53
|
-
cd repopilot
|
|
54
|
-
cargo build --release
|
|
37
|
+
repopilot review . --base main
|
|
55
38
|
```
|
|
56
39
|
|
|
57
|
-
|
|
40
|
+
```text
|
|
41
|
+
$ repopilot review . --base main
|
|
58
42
|
|
|
59
|
-
|
|
43
|
+
Changed files: 2
|
|
44
|
+
In-diff findings: 2
|
|
60
45
|
|
|
61
|
-
|
|
46
|
+
Blast radius:
|
|
47
|
+
The following files import changed files and may need extra review:
|
|
48
|
+
- src/admin.ts
|
|
49
|
+
- src/routes.ts
|
|
62
50
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
Security boundary changed [preview]:
|
|
52
|
+
⚑ access control src/middleware/auth.ts (imported by 2 files)
|
|
53
|
+
⚑ request trust src/server/cors.ts
|
|
54
|
+
⚠ A code boundary changed but no test did — confirm it's still covered.
|
|
66
55
|
```
|
|
67
56
|
|
|
68
|
-
|
|
57
|
+
Boundary categories: **access control**, **request trust**, **deploy surface**, **supply chain**, **secret config**. Tune or disable them in `repopilot.toml` under `[security_boundary]` (ships at `preview`).
|
|
69
58
|
|
|
70
|
-
|
|
71
|
-
repopilot baseline create . --output .repopilot/baseline.json
|
|
72
|
-
repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
|
|
73
|
-
```
|
|
59
|
+
Beyond boundaries, `repopilot review` also flags **behavioral** changes (added network/subprocess/filesystem/SQL, removed error handling or auth checks) and **algorithmic** changes (deeper nesting, a new nested loop, a function that grew or became recursive), grouped into three confidence tiers and reported as structural facts — never verdicts (ships at `preview`). To review a whole agent run, take a marker first: `repopilot snapshot`, let the agent edit, then `repopilot review --since-snapshot` covers every commit and uncommitted change since.
|
|
74
60
|
|
|
75
|
-
|
|
61
|
+
Full audit, a CI gate that fails only on *new* risk, and a local brief for an assistant:
|
|
76
62
|
|
|
77
63
|
```bash
|
|
78
|
-
repopilot
|
|
64
|
+
repopilot scan . # full local audit (quiet by default)
|
|
65
|
+
repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high # fail CI only on newly introduced risk
|
|
66
|
+
repopilot ai context . --budget 4k # budgeted, evidence-backed Markdown
|
|
79
67
|
```
|
|
80
68
|
|
|
81
|
-
|
|
69
|
+
First five minutes for AI-assisted work:
|
|
82
70
|
|
|
83
71
|
```bash
|
|
84
|
-
repopilot
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
repopilot scan . --format markdown --output repopilot-report.md
|
|
91
|
-
repopilot scan . --format json --output repopilot-report.json --receipt .repopilot/receipt.json
|
|
92
|
-
repopilot scan . --format sarif --output repopilot.sarif
|
|
72
|
+
repopilot doctor . # confirm RepoPilot is ready for this repo
|
|
73
|
+
repopilot scan . # see current visible risk
|
|
74
|
+
repopilot ai context . # prepare local, evidence-backed context
|
|
75
|
+
repopilot ai plan . # get a prioritized remediation plan
|
|
76
|
+
repopilot ai prompt . # generate a paste-ready prompt for an assistant
|
|
77
|
+
repopilot review . # check the assistant's change before merging
|
|
93
78
|
```
|
|
94
79
|
|
|
95
80
|
## Use with AI agents (MCP)
|
|
96
81
|
|
|
97
|
-
RepoPilot ships a local [Model Context Protocol](https://modelcontextprotocol.io) server so AI coding agents (Claude Code, Cursor, …) can call it as a tool —
|
|
82
|
+
RepoPilot ships a local [Model Context Protocol](https://modelcontextprotocol.io) server so AI coding agents (Claude Code, Cursor, …) can call it as a tool — the deterministic, private check an agent can run on its **own** edits before handing you the PR.
|
|
98
83
|
|
|
99
84
|
```bash
|
|
100
85
|
claude mcp add repopilot -- repopilot mcp
|
|
101
86
|
```
|
|
102
87
|
|
|
103
|
-
|
|
88
|
+
It runs over stdio (JSON-RPC, no network, no AI calls) and exposes four tools:
|
|
104
89
|
|
|
105
|
-
- `repopilot_review_change` — audit the current Git changes: in-diff vs out-of-diff findings
|
|
106
|
-
- `repopilot_scan` — full repository audit as
|
|
90
|
+
- `repopilot_review_change` — audit the current Git changes: in-diff vs out-of-diff findings, tiered review signals (security-boundary, behavioral, and algorithmic changes grouped by confidence), and blast radius (structured JSON).
|
|
91
|
+
- `repopilot_scan` — full repository audit as JSON.
|
|
107
92
|
- `repopilot_context` — a budgeted, AI-ready Markdown brief of the repo.
|
|
108
93
|
- `repopilot_explain_file` — how a single file is classified and which rules apply.
|
|
109
94
|
|
|
110
95
|
More: [docs/mcp.md](docs/mcp.md).
|
|
111
96
|
|
|
112
|
-
## What
|
|
97
|
+
## What RepoPilot does
|
|
113
98
|
|
|
114
|
-
|
|
|
99
|
+
| Capability | What it does |
|
|
115
100
|
|---|---|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
120
|
-
|
|
|
121
|
-
| Evidence | JSON, Markdown, SARIF, receipts, report envelopes |
|
|
122
|
-
| AI context | local, budgeted, evidence-backed Markdown for coding assistants |
|
|
123
|
-
|
|
124
|
-
## Trust Mode
|
|
125
|
-
|
|
126
|
-
Default scans are intentionally quiet. They keep high-trust security, runtime, and import-graph findings visible while summarizing broad maintainability and testing suggestions as strict-only noise.
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
repopilot scan . # compact default output
|
|
130
|
-
repopilot scan . --output-style full
|
|
131
|
-
repopilot scan . --profile strict # full audit output
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Use strict mode for cleanup passes, rule development, and release hardening. Use the default profile for day-to-day local checks and CI gates.
|
|
101
|
+
| **Review a change** | changed-line findings, blast radius, and tiered boundary/behavioral/algorithmic signals — including before/after an agent edit via `snapshot` + `review --since-snapshot` (`review`, MCP) |
|
|
102
|
+
| Full scan | repo-wide, evidence-ranked findings — secrets, runtime footguns, architecture — quiet by default ([trust mode](docs/trust-mode.md)) |
|
|
103
|
+
| Baseline + CI gate | accept current debt as a baseline; fail CI only on newly introduced risk |
|
|
104
|
+
| Reports | Console, Markdown, JSON, [SARIF](docs/integrations/github-code-scanning.md), HTML, receipts |
|
|
105
|
+
| AI context | local, budgeted, evidence-backed Markdown brief for coding assistants |
|
|
135
106
|
|
|
136
|
-
|
|
107
|
+
Rules carry an `experimental -> preview -> stable` lifecycle and a quality gate (fixtures, stable IDs, evidence). See [docs/rule-quality-gate.md](docs/rule-quality-gate.md).
|
|
137
108
|
|
|
138
|
-
##
|
|
109
|
+
## Local-first
|
|
139
110
|
|
|
140
|
-
|
|
141
|
-
scan | review | baseline | compare | doctor | inspect | ai | init | cache | mcp
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
Common workflows:
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
repopilot scan .
|
|
148
|
-
repopilot review . --base origin/main
|
|
149
|
-
repopilot baseline create .
|
|
150
|
-
repopilot compare before.json after.json
|
|
151
|
-
repopilot inspect rules
|
|
152
|
-
repopilot inspect eval-rules --format json
|
|
153
|
-
repopilot ai context .
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
More: [docs/commands.md](docs/commands.md) and [docs/cli.md](docs/cli.md).
|
|
157
|
-
|
|
158
|
-
## Baseline Adoption
|
|
159
|
-
|
|
160
|
-
A baseline records current findings as accepted existing debt. Future scans can fail only on newly introduced risk:
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
repopilot baseline create . --output .repopilot/baseline.json
|
|
164
|
-
git add .repopilot/baseline.json
|
|
165
|
-
repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
Review baseline updates like code changes. A baseline is not a suppression file; it is a CI adoption contract.
|
|
169
|
-
|
|
170
|
-
## Rule Quality
|
|
171
|
-
|
|
172
|
-
Rules move through a lifecycle:
|
|
173
|
-
|
|
174
|
-
```text
|
|
175
|
-
experimental -> preview -> stable
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
Before a rule becomes stable or default-visible, it should have metadata, true-positive and false-positive fixtures, stable finding IDs, concrete evidence, false-positive notes, recommendations, and clean local evaluation:
|
|
179
|
-
|
|
180
|
-
```bash
|
|
181
|
-
repopilot inspect eval-rules --format json
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
More: [docs/rule-quality-gate.md](docs/rule-quality-gate.md).
|
|
185
|
-
|
|
186
|
-
## Local-First
|
|
187
|
-
|
|
188
|
-
RepoPilot does not upload source code, run a hosted scanner, call LLM APIs implicitly, send telemetry, or require a SaaS account.
|
|
189
|
-
|
|
190
|
-
AI commands only format local scan evidence as Markdown for tools such as Claude Code, ChatGPT, Cursor, Zed, or another assistant.
|
|
191
|
-
|
|
192
|
-
## Reports
|
|
193
|
-
|
|
194
|
-
| Format | Use case |
|
|
195
|
-
|---|---|
|
|
196
|
-
| Console | fast local feedback |
|
|
197
|
-
| Markdown | PR comments and human-readable reports |
|
|
198
|
-
| JSON | automation and internal tooling |
|
|
199
|
-
| SARIF | GitHub Code Scanning |
|
|
200
|
-
| HTML | shareable local reports |
|
|
201
|
-
| Receipt | compact release/CI evidence |
|
|
202
|
-
|
|
203
|
-
More: [docs/reports.md](docs/reports.md).
|
|
204
|
-
|
|
205
|
-
## CI
|
|
206
|
-
|
|
207
|
-
Minimal baseline-aware gate:
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
GitHub Code Scanning:
|
|
214
|
-
|
|
215
|
-
```bash
|
|
216
|
-
repopilot scan . --format sarif --output repopilot.sarif
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
Release smoke:
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
./scripts/smoke-product.sh
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
More: [docs/integrations/github-code-scanning.md](docs/integrations/github-code-scanning.md).
|
|
111
|
+
RepoPilot does not upload source code, run a hosted scanner, call LLM APIs implicitly, send telemetry, or require an account. AI commands only format local scan evidence as Markdown for tools such as Claude Code, Cursor, or Zed.
|
|
226
112
|
|
|
227
113
|
## Documentation
|
|
228
114
|
|
|
229
115
|
| Document | Purpose |
|
|
230
116
|
|---|---|
|
|
231
117
|
| [Install](docs/install.md) | Cargo, npm, Homebrew, curl, and source builds |
|
|
232
|
-
| [Commands](docs/commands.md) | Task-oriented workflows |
|
|
233
|
-
| [
|
|
234
|
-
| [
|
|
235
|
-
| [
|
|
236
|
-
| [
|
|
237
|
-
| [
|
|
118
|
+
| [Commands](docs/commands.md) / [CLI](docs/cli.md) | Task-oriented workflows and the full flag reference |
|
|
119
|
+
| [Configuration](docs/configuration.md) | `repopilot.toml`, presets, ignores, baselines |
|
|
120
|
+
| [Rulesets](docs/rulesets.md) / [Rule quality gate](docs/rule-quality-gate.md) | Built-in rules, lifecycle, and the gate |
|
|
121
|
+
| [Trust Mode](docs/trust-mode.md) | Default vs strict visibility |
|
|
122
|
+
| [Reports](docs/reports.md) / [Code Scanning](docs/integrations/github-code-scanning.md) | Formats, schema, and SARIF in CI |
|
|
123
|
+
| [MCP](docs/mcp.md) | Using RepoPilot from AI agents |
|
|
238
124
|
| [Release Process](docs/release.md) | Local and CI release gates |
|
|
239
125
|
|
|
240
126
|
## Development
|
|
@@ -243,16 +129,9 @@ More: [docs/integrations/github-code-scanning.md](docs/integrations/github-code-
|
|
|
243
129
|
cargo fmt --all -- --check
|
|
244
130
|
cargo clippy --all-targets --all-features -- -D warnings
|
|
245
131
|
cargo test --all
|
|
246
|
-
npm run test:npm
|
|
247
132
|
./scripts/smoke-product.sh
|
|
248
133
|
```
|
|
249
134
|
|
|
250
|
-
Run rule evaluation from source:
|
|
251
|
-
|
|
252
|
-
```bash
|
|
253
|
-
cargo run -- inspect eval-rules --format json
|
|
254
|
-
```
|
|
255
|
-
|
|
256
135
|
## License
|
|
257
136
|
|
|
258
|
-
RepoPilot is licensed under **MIT OR Apache-2.0**.
|
|
137
|
+
RepoPilot is licensed under **MIT OR Apache-2.0**.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repopilot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Local-first CLI for repository audit, architecture risk detection, baseline tracking, and CI-friendly code review.",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"LICENSE"
|
|
27
27
|
],
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@repopilot/darwin-arm64": "0.
|
|
30
|
-
"@repopilot/darwin-x64": "0.
|
|
31
|
-
"@repopilot/linux-arm64-gnu": "0.
|
|
32
|
-
"@repopilot/linux-x64-gnu": "0.
|
|
33
|
-
"@repopilot/win32-x64-msvc": "0.
|
|
29
|
+
"@repopilot/darwin-arm64": "0.15.0",
|
|
30
|
+
"@repopilot/darwin-x64": "0.15.0",
|
|
31
|
+
"@repopilot/linux-arm64-gnu": "0.15.0",
|
|
32
|
+
"@repopilot/linux-x64-gnu": "0.15.0",
|
|
33
|
+
"@repopilot/win32-x64-msvc": "0.15.0"
|
|
34
34
|
},
|
|
35
35
|
"keywords": [
|
|
36
36
|
"cli",
|