repopilot 0.7.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 +116 -24
- 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,20 @@ 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 scanning (`--workspace`) for npm, yarn, pnpm, and Cargo workspaces with per-package risk summary
|
|
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
|
|
41
44
|
- 36 built-in rules with titles, descriptions, recommendations, and docs links
|
|
42
45
|
- `repopilot.toml` configuration generated by `repopilot init`
|
|
46
|
+
- Configuration presets (`--preset strict|balanced|lenient`) for quick threshold tuning
|
|
43
47
|
- Baseline workflow for accepting existing findings in legacy repositories
|
|
44
48
|
- CI-friendly failure thresholds with `--fail-on`
|
|
45
49
|
- Git diff-aware review mode for prioritizing findings introduced by changed lines
|
|
46
50
|
- Console, JSON, Markdown, HTML, and SARIF (2.1.0) scan output — SARIF includes per-result category and workspace package properties
|
|
47
|
-
- First-party GitHub Action wrapper with optional SARIF upload
|
|
51
|
+
- First-party GitHub Action wrapper for `scan`, `review`, `compare`, `vibe`, `harden`, and `prompt`, with optional SARIF upload for scans
|
|
48
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
|
|
49
56
|
|
|
50
57
|
See [docs/rulesets.md](docs/rulesets.md) for the full list of rules and severity levels.
|
|
51
58
|
|
|
@@ -61,6 +68,18 @@ Install with npm:
|
|
|
61
68
|
npm install -g repopilot
|
|
62
69
|
```
|
|
63
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
|
+
|
|
64
83
|
Upgrade:
|
|
65
84
|
|
|
66
85
|
```bash
|
|
@@ -95,23 +114,81 @@ Reduce scan noise while iterating:
|
|
|
95
114
|
```bash
|
|
96
115
|
repopilot scan . --min-severity high
|
|
97
116
|
repopilot scan . --workspace --min-severity medium
|
|
117
|
+
repopilot scan . --exclude fixtures --max-file-size 1mb --max-files 500
|
|
98
118
|
```
|
|
99
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
|
+
|
|
100
173
|
## AI-Assisted Workflow
|
|
101
174
|
|
|
102
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.
|
|
103
176
|
|
|
104
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
|
|
105
181
|
repopilot review . --base origin/main --baseline .repopilot/baseline.json --fail-on new-high
|
|
106
182
|
repopilot scan . --workspace --min-severity medium --format markdown --output repopilot-report.md
|
|
107
183
|
```
|
|
108
184
|
|
|
109
|
-
The v0.7.0 release does not add new `vibe`, `harden`, or AI prompt commands. Those are planned as deterministic post-0.7 workflows built on the existing scan and review data.
|
|
110
|
-
|
|
111
185
|
## Commands
|
|
112
186
|
|
|
113
187
|
| Command | Alias | Description |
|
|
114
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 |
|
|
115
192
|
| `repopilot scan <path>` | `s` | Scan a project, folder, or file for findings |
|
|
116
193
|
| `repopilot review [path]` | `r` | Review findings that touch changed Git diff lines |
|
|
117
194
|
| `repopilot compare <before> <after>` | `cmp` | Compare two JSON scan reports and show what changed |
|
|
@@ -164,7 +241,12 @@ ignore = [
|
|
|
164
241
|
"dist",
|
|
165
242
|
"build",
|
|
166
243
|
".next",
|
|
167
|
-
"
|
|
244
|
+
".nuxt",
|
|
245
|
+
".cache",
|
|
246
|
+
"coverage",
|
|
247
|
+
"vendor",
|
|
248
|
+
"Pods",
|
|
249
|
+
"DerivedData"
|
|
168
250
|
]
|
|
169
251
|
max_file_bytes = 2097152
|
|
170
252
|
|
|
@@ -194,8 +276,16 @@ CLI threshold overrides:
|
|
|
194
276
|
repopilot scan . --max-file-loc 500
|
|
195
277
|
repopilot scan . --max-directory-modules 25
|
|
196
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
|
|
197
283
|
```
|
|
198
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
|
+
|
|
199
289
|
## Baseline Workflow
|
|
200
290
|
|
|
201
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.
|
|
@@ -251,7 +341,7 @@ If your installed RepoPilot version does not support `--output`, redirect stdout
|
|
|
251
341
|
repopilot scan . --format sarif > repopilot.sarif
|
|
252
342
|
```
|
|
253
343
|
|
|
254
|
-
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.
|
|
255
345
|
|
|
256
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.
|
|
257
347
|
|
|
@@ -272,6 +362,7 @@ Use `--fail-on new-high` to fail CI only when new high or critical findings are
|
|
|
272
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.
|
|
273
363
|
|
|
274
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.
|
|
275
366
|
|
|
276
367
|
```yaml
|
|
277
368
|
name: RepoPilot
|
|
@@ -279,12 +370,16 @@ name: RepoPilot
|
|
|
279
370
|
on:
|
|
280
371
|
pull_request:
|
|
281
372
|
|
|
373
|
+
permissions:
|
|
374
|
+
contents: read
|
|
375
|
+
security-events: write
|
|
376
|
+
|
|
282
377
|
jobs:
|
|
283
378
|
repopilot:
|
|
284
379
|
runs-on: ubuntu-latest
|
|
285
380
|
|
|
286
381
|
steps:
|
|
287
|
-
- uses: actions/checkout@
|
|
382
|
+
- uses: actions/checkout@v5
|
|
288
383
|
|
|
289
384
|
- name: Install Rust
|
|
290
385
|
uses: dtolnay/rust-toolchain@stable
|
|
@@ -299,7 +394,7 @@ jobs:
|
|
|
299
394
|
run: repopilot scan . --format sarif --output repopilot.sarif
|
|
300
395
|
|
|
301
396
|
- name: Upload to GitHub Code Scanning
|
|
302
|
-
uses: github/codeql-action/upload-sarif@
|
|
397
|
+
uses: github/codeql-action/upload-sarif@v4
|
|
303
398
|
if: always()
|
|
304
399
|
with:
|
|
305
400
|
sarif_file: repopilot.sarif
|
|
@@ -309,9 +404,6 @@ jobs:
|
|
|
309
404
|
|
|
310
405
|
These are planned ideas, not current features:
|
|
311
406
|
|
|
312
|
-
- Vibe Check command for AI-assisted codebase readiness
|
|
313
|
-
- Hardening Plan output based on existing findings
|
|
314
|
-
- AI-agent prompt/context export
|
|
315
407
|
- Change Risk Map
|
|
316
408
|
- Better architecture drift detection
|
|
317
409
|
- Optional per-platform npm binary packages for faster installs
|
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"
|