repopilot 0.13.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 +65 -169
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -4,220 +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
|
-
```
|
|
35
|
-
|
|
36
|
-
Homebrew:
|
|
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.
|
|
37
23
|
|
|
38
|
-
|
|
39
|
-
brew tap mykytastel/repopilot
|
|
40
|
-
brew install repopilot
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Installer:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
curl -fsSL https://raw.githubusercontent.com/MykytaStel/repopilot/main/install.sh | bash
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
From source:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
git clone https://github.com/MykytaStel/repopilot.git
|
|
53
|
-
cd repopilot
|
|
54
|
-
cargo build --release
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
More: [docs/install.md](docs/install.md).
|
|
58
|
-
|
|
59
|
-
## Quick Start
|
|
60
|
-
|
|
61
|
-
Run a local scan:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
repopilot scan .
|
|
65
|
-
repopilot doctor .
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Adopt RepoPilot in an existing repository without failing CI on old debt:
|
|
24
|
+
## Install
|
|
69
25
|
|
|
70
26
|
```bash
|
|
71
|
-
repopilot
|
|
72
|
-
repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
|
|
27
|
+
cargo install repopilot # or: npm install -g repopilot
|
|
73
28
|
```
|
|
74
29
|
|
|
75
|
-
|
|
30
|
+
Homebrew, install script, and from-source: [docs/install.md](docs/install.md).
|
|
76
31
|
|
|
77
|
-
|
|
78
|
-
repopilot review . --base origin/main
|
|
79
|
-
```
|
|
32
|
+
## Quick start
|
|
80
33
|
|
|
81
|
-
|
|
34
|
+
Review a change — what you'd check before merging, and what an agent can check on its own edits:
|
|
82
35
|
|
|
83
36
|
```bash
|
|
84
|
-
repopilot
|
|
37
|
+
repopilot review . --base main
|
|
85
38
|
```
|
|
86
39
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
```bash
|
|
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
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## What It Checks
|
|
96
|
-
|
|
97
|
-
| Area | Examples |
|
|
98
|
-
|---|---|
|
|
99
|
-
| Security | secret candidates, private keys, committed `.env` files |
|
|
100
|
-
| Runtime risk | Rust panic/unwrap paths, JavaScript/Python/Go/JVM/.NET process exits |
|
|
101
|
-
| Architecture | circular dependencies, excessive fan-out, instability hubs |
|
|
102
|
-
| Review risk | changed files, branch context, blast radius |
|
|
103
|
-
| Adoption | baselines, new-vs-existing findings, CI gates |
|
|
104
|
-
| Evidence | JSON, Markdown, SARIF, receipts, report envelopes |
|
|
105
|
-
| AI context | local, budgeted, evidence-backed Markdown for coding assistants |
|
|
40
|
+
```text
|
|
41
|
+
$ repopilot review . --base main
|
|
106
42
|
|
|
107
|
-
|
|
43
|
+
Changed files: 2
|
|
44
|
+
In-diff findings: 2
|
|
108
45
|
|
|
109
|
-
|
|
46
|
+
Blast radius:
|
|
47
|
+
The following files import changed files and may need extra review:
|
|
48
|
+
- src/admin.ts
|
|
49
|
+
- src/routes.ts
|
|
110
50
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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.
|
|
115
55
|
```
|
|
116
56
|
|
|
117
|
-
|
|
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`).
|
|
118
58
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
## Core Commands
|
|
122
|
-
|
|
123
|
-
```text
|
|
124
|
-
scan | review | baseline | compare | doctor | inspect | ai | init | cache
|
|
125
|
-
```
|
|
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.
|
|
126
60
|
|
|
127
|
-
|
|
61
|
+
Full audit, a CI gate that fails only on *new* risk, and a local brief for an assistant:
|
|
128
62
|
|
|
129
63
|
```bash
|
|
130
|
-
repopilot scan .
|
|
131
|
-
repopilot
|
|
132
|
-
repopilot
|
|
133
|
-
repopilot compare before.json after.json
|
|
134
|
-
repopilot inspect rules
|
|
135
|
-
repopilot inspect eval-rules --format json
|
|
136
|
-
repopilot ai context .
|
|
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
|
|
137
67
|
```
|
|
138
68
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
## Baseline Adoption
|
|
142
|
-
|
|
143
|
-
A baseline records current findings as accepted existing debt. Future scans can fail only on newly introduced risk:
|
|
69
|
+
First five minutes for AI-assisted work:
|
|
144
70
|
|
|
145
71
|
```bash
|
|
146
|
-
repopilot
|
|
147
|
-
|
|
148
|
-
repopilot
|
|
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
|
|
149
78
|
```
|
|
150
79
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
## Rule Quality
|
|
154
|
-
|
|
155
|
-
Rules move through a lifecycle:
|
|
80
|
+
## Use with AI agents (MCP)
|
|
156
81
|
|
|
157
|
-
|
|
158
|
-
experimental -> preview -> stable
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
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:
|
|
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.
|
|
162
83
|
|
|
163
84
|
```bash
|
|
164
|
-
|
|
85
|
+
claude mcp add repopilot -- repopilot mcp
|
|
165
86
|
```
|
|
166
87
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
## Local-First
|
|
88
|
+
It runs over stdio (JSON-RPC, no network, no AI calls) and exposes four tools:
|
|
170
89
|
|
|
171
|
-
|
|
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.
|
|
92
|
+
- `repopilot_context` — a budgeted, AI-ready Markdown brief of the repo.
|
|
93
|
+
- `repopilot_explain_file` — how a single file is classified and which rules apply.
|
|
172
94
|
|
|
173
|
-
|
|
95
|
+
More: [docs/mcp.md](docs/mcp.md).
|
|
174
96
|
|
|
175
|
-
##
|
|
97
|
+
## What RepoPilot does
|
|
176
98
|
|
|
177
|
-
|
|
|
99
|
+
| Capability | What it does |
|
|
178
100
|
|---|---|
|
|
179
|
-
|
|
|
180
|
-
|
|
|
181
|
-
|
|
|
182
|
-
|
|
|
183
|
-
|
|
|
184
|
-
| Receipt | compact release/CI evidence |
|
|
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 |
|
|
185
106
|
|
|
186
|
-
|
|
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).
|
|
187
108
|
|
|
188
|
-
##
|
|
109
|
+
## Local-first
|
|
189
110
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
repopilot scan . --baseline .repopilot/baseline.json --fail-on new-high
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
GitHub Code Scanning:
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
repopilot scan . --format sarif --output repopilot.sarif
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
Release smoke:
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
./scripts/smoke-product.sh
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
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.
|
|
209
112
|
|
|
210
113
|
## Documentation
|
|
211
114
|
|
|
212
115
|
| Document | Purpose |
|
|
213
116
|
|---|---|
|
|
214
117
|
| [Install](docs/install.md) | Cargo, npm, Homebrew, curl, and source builds |
|
|
215
|
-
| [Commands](docs/commands.md) | Task-oriented workflows |
|
|
216
|
-
| [
|
|
217
|
-
| [
|
|
218
|
-
| [
|
|
219
|
-
| [
|
|
220
|
-
| [
|
|
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 |
|
|
221
124
|
| [Release Process](docs/release.md) | Local and CI release gates |
|
|
222
125
|
|
|
223
126
|
## Development
|
|
@@ -226,16 +129,9 @@ More: [docs/integrations/github-code-scanning.md](docs/integrations/github-code-
|
|
|
226
129
|
cargo fmt --all -- --check
|
|
227
130
|
cargo clippy --all-targets --all-features -- -D warnings
|
|
228
131
|
cargo test --all
|
|
229
|
-
npm run test:npm
|
|
230
132
|
./scripts/smoke-product.sh
|
|
231
133
|
```
|
|
232
134
|
|
|
233
|
-
Run rule evaluation from source:
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
cargo run -- inspect eval-rules --format json
|
|
237
|
-
```
|
|
238
|
-
|
|
239
135
|
## License
|
|
240
136
|
|
|
241
|
-
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",
|