repopilot 0.6.0 → 0.8.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 +136 -23
- package/package.json +38 -37
- package/scripts/verify-release.sh +48 -0
package/README.md
CHANGED
|
@@ -2,33 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://crates.io/crates/repopilot)
|
|
4
4
|
[](https://www.npmjs.com/package/repopilot)
|
|
5
|
-
[](https://docs.rs/repopilot)
|
|
6
5
|
[](https://github.com/MykytaStel/repopilot/actions)
|
|
7
6
|
[](https://github.com/MykytaStel/repopilot/releases)
|
|
8
7
|
[](LICENSE)
|
|
8
|
+
[](https://github.com/MykytaStel/repopilot)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Scan your repo. Paste the result into Claude Code or ChatGPT. Start fixing.
|
|
11
11
|
|
|
12
|
-
RepoPilot
|
|
12
|
+
RepoPilot is a local-first CLI that audits architecture, security, code quality, and framework health — then formats everything as LLM-ready context you can drop directly into an AI assistant. No code leaves your machine.
|
|
13
13
|
|
|
14
14
|
## Why RepoPilot?
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Most linters and audit tools stop at the terminal. RepoPilot bridges the gap to your AI assistant:
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
| | SonarQube / CodeClimate | ESLint / language linters | **RepoPilot** |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| Runs offline | ❌ | ✅ | ✅ |
|
|
21
|
+
| No code upload | ❌ | ✅ | ✅ |
|
|
22
|
+
| Cross-language architecture analysis | ✅ | ❌ | ✅ |
|
|
23
|
+
| LLM-ready output | ❌ | ❌ | ✅ |
|
|
24
|
+
| Fits in a model context window | ❌ | ❌ | ✅ |
|
|
25
|
+
| CI gate on new findings only | ✅ | partial | ✅ |
|
|
19
26
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- which findings already existed;
|
|
24
|
-
- where to review first.
|
|
25
|
-
|
|
26
|
-
RepoPilot runs locally and does not upload your repository.
|
|
27
|
+
```bash
|
|
28
|
+
repopilot vibe . | pbcopy # macOS: paste into Claude Code and start fixing
|
|
29
|
+
```
|
|
27
30
|
|
|
28
31
|
## Features
|
|
29
32
|
|
|
30
33
|
- Repository scanning for projects, folders, and individual files
|
|
31
|
-
- Gitignore-aware walking with built-in ignores for common build and
|
|
34
|
+
- Gitignore-aware walking with built-in ignores for common build, cache, vendor, and native platform directories
|
|
32
35
|
- Architecture findings: oversized files, deep nesting, too many modules per directory
|
|
33
36
|
- Coupling analysis: excessive fan-out, high-instability hubs, circular dependencies
|
|
34
37
|
- Code quality findings: cyclomatic complexity density, long functions, TODO/FIXME/HACK markers
|
|
@@ -36,16 +39,22 @@ RepoPilot runs locally and does not upload your repository.
|
|
|
36
39
|
- Testing findings: missing test folder, source files without test counterparts
|
|
37
40
|
- Framework findings for JavaScript, React, React Native, and Expo projects
|
|
38
41
|
- React Native architecture profile: project kind, New Architecture, Hermes, Codegen, platform mismatch, and package manager signals
|
|
39
|
-
- Workspace
|
|
42
|
+
- Workspace scanning (`--workspace`) for npm, yarn, pnpm, and Cargo workspaces with per-package risk summary — parallel per-package scans
|
|
40
43
|
- Evidence-backed findings with stable rule IDs, severity, file paths, line numbers, and snippets
|
|
44
|
+
- 36 built-in rules with titles, descriptions, recommendations, and docs links
|
|
41
45
|
- `repopilot.toml` configuration generated by `repopilot init`
|
|
46
|
+
- Configuration presets (`--preset strict|balanced|lenient`) for quick threshold tuning
|
|
42
47
|
- Baseline workflow for accepting existing findings in legacy repositories
|
|
43
48
|
- CI-friendly failure thresholds with `--fail-on`
|
|
44
49
|
- Git diff-aware review mode for prioritizing findings introduced by changed lines
|
|
45
|
-
- Console, JSON, Markdown, HTML, and SARIF scan output
|
|
50
|
+
- Console, JSON, Markdown, HTML, and SARIF (2.1.0) scan output — SARIF includes per-result category and workspace package properties
|
|
51
|
+
- First-party GitHub Action wrapper for `scan`, `review`, `compare`, `vibe`, `harden`, and `prompt`, with optional SARIF upload for scans
|
|
46
52
|
- Compare mode for diffing two JSON scan reports
|
|
53
|
+
- **`repopilot vibe`** — new in v0.8: formats scan output as LLM-ready markdown, paste into Claude Code or ChatGPT to start remediating
|
|
54
|
+
- **`repopilot harden`** — new in v0.8: turns findings into a prioritized remediation plan
|
|
55
|
+
- **`repopilot prompt`** — new in v0.8: exports an AI-ready remediation prompt with RepoPilot context
|
|
47
56
|
|
|
48
|
-
See [docs/rulesets.md](docs/rulesets.md) for the
|
|
57
|
+
See [docs/rulesets.md](docs/rulesets.md) for the full list of rules and severity levels.
|
|
49
58
|
|
|
50
59
|
## Installation
|
|
51
60
|
|
|
@@ -59,6 +68,18 @@ Install with npm:
|
|
|
59
68
|
npm install -g repopilot
|
|
60
69
|
```
|
|
61
70
|
|
|
71
|
+
Install with Homebrew:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
brew install MykytaStel/repopilot/repopilot
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Install with curl (Linux/macOS):
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
curl -fsSL https://raw.githubusercontent.com/MykytaStel/repopilot/main/install.sh | sh
|
|
81
|
+
```
|
|
82
|
+
|
|
62
83
|
Upgrade:
|
|
63
84
|
|
|
64
85
|
```bash
|
|
@@ -88,10 +109,86 @@ repopilot scan . --format markdown --output repopilot-report.md
|
|
|
88
109
|
repopilot review . --base origin/main --baseline .repopilot/baseline.json --fail-on new-high
|
|
89
110
|
```
|
|
90
111
|
|
|
112
|
+
Reduce scan noise while iterating:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
repopilot scan . --min-severity high
|
|
116
|
+
repopilot scan . --workspace --min-severity medium
|
|
117
|
+
repopilot scan . --exclude fixtures --max-file-size 1mb --max-files 500
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
By default, RepoPilot skips low-signal audit paths such as tests, fixtures, examples, generated files, and benchmarks. Use `--include-low-signal` when you want those paths analyzed too.
|
|
121
|
+
|
|
122
|
+
## Vibe Check (new in v0.8)
|
|
123
|
+
|
|
124
|
+
`repopilot vibe` scans a project and formats all findings as structured markdown ready to paste into Claude Code, Cursor, ChatGPT, or any LLM assistant. It includes a risk level, tech stack summary, findings grouped by category with evidence snippets and fix recommendations, and a token-count estimate.
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Paste into Claude Code or ChatGPT
|
|
128
|
+
repopilot vibe .
|
|
129
|
+
|
|
130
|
+
# Focus on security only, keep it short
|
|
131
|
+
repopilot vibe . --focus security --budget 2k
|
|
132
|
+
|
|
133
|
+
# Save to file
|
|
134
|
+
repopilot vibe . --output vibe.md
|
|
135
|
+
|
|
136
|
+
# Pipe directly into clipboard (macOS)
|
|
137
|
+
repopilot vibe . --no-header | pbcopy
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Example Output
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
$ repopilot vibe .
|
|
144
|
+
|
|
145
|
+
# RepoPilot Vibe Check — my-app
|
|
146
|
+
|
|
147
|
+
**Risk Level:** 🟠 ELEVATED
|
|
148
|
+
**Tech Stack:** React Native (New Arch), Expo, TypeScript
|
|
149
|
+
**Size:** 94 files · 8,340 LOC · ~42k tokens
|
|
150
|
+
**Health:** 18 findings · 2.2/kloc — 4 high, 9 medium
|
|
151
|
+
|
|
152
|
+
## Security (2 high)
|
|
153
|
+
1. [HIGH] Possible secret detected — `src/config/api.ts:12`
|
|
154
|
+
```
|
|
155
|
+
const API_KEY = "sk_live_…"
|
|
156
|
+
```
|
|
157
|
+
> **Fix:** Move to environment variables or a secrets manager.
|
|
158
|
+
|
|
159
|
+
## Architecture (2 high)
|
|
160
|
+
1. [HIGH] Circular dependency detected — `src/store/index.ts`
|
|
161
|
+
> **Fix:** Extract shared types to a separate module to break the cycle.
|
|
162
|
+
|
|
163
|
+
## Top Recommendations
|
|
164
|
+
1. **Move hardcoded API key** (src/config/api.ts:12) — use process.env or a vault
|
|
165
|
+
2. **Break circular dependency** (src/store/index.ts) — extract shared types
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
*~3.8k tokens (budget: 4k) · scanned in 312ms — paste into Claude Code, Cursor, or ChatGPT*
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Paste this into Claude Code and ask: *"Fix all findings."*
|
|
172
|
+
|
|
173
|
+
## AI-Assisted Workflow
|
|
174
|
+
|
|
175
|
+
RepoPilot is a local-first safety layer for AI-assisted and vibe-coded changes. Run it after generating or refactoring code to catch newly introduced high-risk findings, workspace hotspots, missing tests, and architecture drift without uploading source code to an external service.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
repopilot vibe . --focus security # get an LLM brief for Claude Code
|
|
179
|
+
repopilot harden . --focus security # get a prioritized hardening plan
|
|
180
|
+
repopilot prompt . --budget 8k # generate a paste-ready remediation prompt
|
|
181
|
+
repopilot review . --base origin/main --baseline .repopilot/baseline.json --fail-on new-high
|
|
182
|
+
repopilot scan . --workspace --min-severity medium --format markdown --output repopilot-report.md
|
|
183
|
+
```
|
|
184
|
+
|
|
91
185
|
## Commands
|
|
92
186
|
|
|
93
187
|
| Command | Alias | Description |
|
|
94
188
|
|---------|-------|-------------|
|
|
189
|
+
| `repopilot vibe <path>` | `v` | **New in v0.8** — LLM-ready context from a scan |
|
|
190
|
+
| `repopilot harden <path>` | `h` | **New in v0.8** — prioritized remediation plan |
|
|
191
|
+
| `repopilot prompt <path>` | `p` | **New in v0.8** — AI-ready remediation prompt |
|
|
95
192
|
| `repopilot scan <path>` | `s` | Scan a project, folder, or file for findings |
|
|
96
193
|
| `repopilot review [path]` | `r` | Review findings that touch changed Git diff lines |
|
|
97
194
|
| `repopilot compare <before> <after>` | `cmp` | Compare two JSON scan reports and show what changed |
|
|
@@ -144,7 +241,12 @@ ignore = [
|
|
|
144
241
|
"dist",
|
|
145
242
|
"build",
|
|
146
243
|
".next",
|
|
147
|
-
"
|
|
244
|
+
".nuxt",
|
|
245
|
+
".cache",
|
|
246
|
+
"coverage",
|
|
247
|
+
"vendor",
|
|
248
|
+
"Pods",
|
|
249
|
+
"DerivedData"
|
|
148
250
|
]
|
|
149
251
|
max_file_bytes = 2097152
|
|
150
252
|
|
|
@@ -174,8 +276,16 @@ CLI threshold overrides:
|
|
|
174
276
|
repopilot scan . --max-file-loc 500
|
|
175
277
|
repopilot scan . --max-directory-modules 25
|
|
176
278
|
repopilot scan . --max-directory-depth 6
|
|
279
|
+
repopilot scan . --max-file-size 1mb
|
|
280
|
+
repopilot scan . --max-files 1000
|
|
281
|
+
repopilot scan . --exclude generated
|
|
282
|
+
repopilot scan . --include-low-signal
|
|
177
283
|
```
|
|
178
284
|
|
|
285
|
+
`--max-file-size` accepts raw bytes or `kb`, `mb`, and `gb` suffixes. `--exclude` matches an exact path relative to the scan root or a file/directory name; repeat it for multiple paths.
|
|
286
|
+
|
|
287
|
+
JSON output includes scan input accounting fields: `files_discovered` for files found after ignore/exclude filters, `files_count` for analyzed text files, `files_skipped_low_signal` for default low-signal skips, and `binary_files_skipped` for unreadable/binary files.
|
|
288
|
+
|
|
179
289
|
## Baseline Workflow
|
|
180
290
|
|
|
181
291
|
Existing repositories often have findings that cannot all be fixed before adopting a new audit tool. A baseline stores accepted existing findings so future scans can distinguish new findings from existing ones.
|
|
@@ -231,7 +341,7 @@ If your installed RepoPilot version does not support `--output`, redirect stdout
|
|
|
231
341
|
repopilot scan . --format sarif > repopilot.sarif
|
|
232
342
|
```
|
|
233
343
|
|
|
234
|
-
Use JSON when custom scripts need to parse RepoPilot results.
|
|
344
|
+
Use JSON when custom scripts need to parse RepoPilot results. Console, Markdown, and HTML reports include the RepoPilot version, risk summary, top rules, and grouped findings for human review. Use SARIF for CI and code scanning integrations, including GitHub Code Scanning.
|
|
235
345
|
|
|
236
346
|
See [docs/integrations/github-code-scanning.md](docs/integrations/github-code-scanning.md) for a copy-paste GitHub Actions workflow, required permissions, and local validation commands.
|
|
237
347
|
|
|
@@ -252,6 +362,7 @@ Use `--fail-on new-high` to fail CI only when new high or critical findings are
|
|
|
252
362
|
When `--fail-on new-*` is used without `--baseline`, RepoPilot treats all current findings as new. For baseline-based adoption, commit an accepted baseline and scan against it in CI.
|
|
253
363
|
|
|
254
364
|
To upload RepoPilot findings to GitHub Code Scanning, generate SARIF and use `github/codeql-action/upload-sarif`. The workflow must include `security-events: write`.
|
|
365
|
+
The first-party action can also run `command: vibe`, `command: harden`, or `command: prompt`; those commands emit Markdown and do not produce SARIF.
|
|
255
366
|
|
|
256
367
|
```yaml
|
|
257
368
|
name: RepoPilot
|
|
@@ -259,12 +370,16 @@ name: RepoPilot
|
|
|
259
370
|
on:
|
|
260
371
|
pull_request:
|
|
261
372
|
|
|
373
|
+
permissions:
|
|
374
|
+
contents: read
|
|
375
|
+
security-events: write
|
|
376
|
+
|
|
262
377
|
jobs:
|
|
263
378
|
repopilot:
|
|
264
379
|
runs-on: ubuntu-latest
|
|
265
380
|
|
|
266
381
|
steps:
|
|
267
|
-
- uses: actions/checkout@
|
|
382
|
+
- uses: actions/checkout@v5
|
|
268
383
|
|
|
269
384
|
- name: Install Rust
|
|
270
385
|
uses: dtolnay/rust-toolchain@stable
|
|
@@ -279,7 +394,7 @@ jobs:
|
|
|
279
394
|
run: repopilot scan . --format sarif --output repopilot.sarif
|
|
280
395
|
|
|
281
396
|
- name: Upload to GitHub Code Scanning
|
|
282
|
-
uses: github/codeql-action/upload-sarif@
|
|
397
|
+
uses: github/codeql-action/upload-sarif@v4
|
|
283
398
|
if: always()
|
|
284
399
|
with:
|
|
285
400
|
sarif_file: repopilot.sarif
|
|
@@ -290,10 +405,8 @@ jobs:
|
|
|
290
405
|
These are planned ideas, not current features:
|
|
291
406
|
|
|
292
407
|
- Change Risk Map
|
|
293
|
-
- AI-ready review context export
|
|
294
408
|
- Better architecture drift detection
|
|
295
|
-
-
|
|
296
|
-
- Deeper React Native dependency health analysis
|
|
409
|
+
- Optional per-platform npm binary packages for faster installs
|
|
297
410
|
|
|
298
411
|
## Documentation
|
|
299
412
|
|
package/package.json
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
2
|
+
"name": "repopilot",
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "Local-first CLI for repository audit, architecture risk detection, baseline tracking, and CI-friendly code review.",
|
|
5
|
+
"license": "MIT OR Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/MykytaStel/repopilot.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/MykytaStel/repopilot#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/MykytaStel/repopilot/issues"
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"repopilot": "bin/repopilot.js"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"postinstall": "node scripts/install.js",
|
|
19
|
+
"test:npm": "node --test tests/npm_wrapper.test.js",
|
|
20
|
+
"release:check": "bash scripts/verify-release.sh"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"bin",
|
|
24
|
+
"scripts",
|
|
25
|
+
"README.md",
|
|
26
|
+
"LICENSE"
|
|
27
|
+
],
|
|
28
|
+
"keywords": [
|
|
29
|
+
"cli",
|
|
30
|
+
"audit",
|
|
31
|
+
"code-review",
|
|
32
|
+
"static-analysis",
|
|
33
|
+
"architecture",
|
|
34
|
+
"react-native"
|
|
35
|
+
],
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
|
+
cd "$ROOT_DIR"
|
|
6
|
+
|
|
7
|
+
echo "==> RepoPilot release verification"
|
|
8
|
+
|
|
9
|
+
echo "==> Rust formatting"
|
|
10
|
+
cargo fmt --all -- --check
|
|
11
|
+
|
|
12
|
+
echo "==> Rust clippy"
|
|
13
|
+
cargo clippy --all-targets --all-features -- -D warnings
|
|
14
|
+
|
|
15
|
+
echo "==> Rust tests"
|
|
16
|
+
cargo test --all
|
|
17
|
+
|
|
18
|
+
echo "==> CLI release smoke tests"
|
|
19
|
+
cargo test --test cli_release_smoke
|
|
20
|
+
|
|
21
|
+
echo "==> Cargo package contents"
|
|
22
|
+
cargo package --list
|
|
23
|
+
|
|
24
|
+
echo "==> Cargo publish dry-run"
|
|
25
|
+
cargo publish --dry-run
|
|
26
|
+
|
|
27
|
+
echo "==> npm wrapper tests"
|
|
28
|
+
npm run test:npm
|
|
29
|
+
|
|
30
|
+
echo "==> npm package dry-run"
|
|
31
|
+
npm pack --dry-run
|
|
32
|
+
|
|
33
|
+
echo "==> Build release binary"
|
|
34
|
+
cargo build --release
|
|
35
|
+
|
|
36
|
+
echo "==> Verify built binary"
|
|
37
|
+
./target/release/repopilot --version
|
|
38
|
+
./target/release/repopilot scan . --format markdown --output /tmp/repopilot-release-scan.md
|
|
39
|
+
./target/release/repopilot vibe . --focus security --budget 2k --output /tmp/repopilot-release-vibe.md
|
|
40
|
+
./target/release/repopilot harden . --focus all --budget 4k --output /tmp/repopilot-release-harden.md
|
|
41
|
+
./target/release/repopilot prompt . --focus quality --budget 4k --output /tmp/repopilot-release-prompt.md
|
|
42
|
+
|
|
43
|
+
test -s /tmp/repopilot-release-scan.md
|
|
44
|
+
test -s /tmp/repopilot-release-vibe.md
|
|
45
|
+
test -s /tmp/repopilot-release-harden.md
|
|
46
|
+
test -s /tmp/repopilot-release-prompt.md
|
|
47
|
+
|
|
48
|
+
echo "==> Release verification passed"
|