@vibgrate/cli 0.1.4 → 1.0.2
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 +106 -9
- package/dist/{baseline-45AWVXG4.js → baseline-5SAUNH2V.js} +2 -2
- package/dist/{chunk-BTIIFIOD.js → chunk-GG5AUF7X.js} +1 -1
- package/dist/{chunk-AMOJCCF5.js → chunk-VXZT34Y5.js} +4 -1
- package/dist/{chunk-WO6EZ6AF.js → chunk-XZ4NRZMT.js} +559 -170
- package/dist/cli.js +32 -165
- package/dist/index.d.ts +15 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Modern codebases don't break all at once — they decay silently. Node runtimes
|
|
|
24
24
|
Run instantly with npx — no install required:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
npx @vibgrate/cli scan
|
|
27
|
+
npx @vibgrate/cli scan
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
Or install as a dev dependency:
|
|
@@ -36,14 +36,14 @@ npm install -D @vibgrate/cli
|
|
|
36
36
|
Then scan your project:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
npx vibgrate scan
|
|
39
|
+
npx vibgrate scan
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
> **Why `npx`?** Installing with `-D` places the binary in `node_modules/.bin/`, which isn't on your system PATH. Use `npx` to run it, or add a script to your `package.json`:
|
|
43
43
|
>
|
|
44
44
|
> ```json
|
|
45
45
|
> "scripts": {
|
|
46
|
-
> "drift": "vibgrate scan
|
|
46
|
+
> "drift": "vibgrate scan"
|
|
47
47
|
> }
|
|
48
48
|
> ```
|
|
49
49
|
>
|
|
@@ -56,13 +56,19 @@ That's it. You'll see a full drift report in seconds.
|
|
|
56
56
|
## What You Get
|
|
57
57
|
|
|
58
58
|
```
|
|
59
|
+
╭───╮➜
|
|
60
|
+
╭┤◉ ◉├╮ V I B G R A T E
|
|
61
|
+
╰┤───├╯ Drift Intelligence Engine v1.x.x
|
|
62
|
+
╰───╯
|
|
63
|
+
|
|
59
64
|
╔══════════════════════════════════════════╗
|
|
60
65
|
║ Vibgrate Drift Report ║
|
|
61
66
|
╚══════════════════════════════════════════╝
|
|
62
67
|
|
|
63
68
|
Drift Score: 72/100
|
|
64
|
-
Risk Level:
|
|
69
|
+
Risk Level: LOW
|
|
65
70
|
Projects: 3
|
|
71
|
+
VCS: git main a1b2c3d
|
|
66
72
|
|
|
67
73
|
Score Breakdown
|
|
68
74
|
Runtime: ████████████████████ 100
|
|
@@ -77,9 +83,67 @@ That's it. You'll see a full drift report in seconds.
|
|
|
77
83
|
Dependencies:
|
|
78
84
|
42 current 8 1-behind 3 2+ behind
|
|
79
85
|
|
|
80
|
-
|
|
86
|
+
── web-app (node) src/web
|
|
87
|
+
Runtime: 20.11.0 (current)
|
|
88
|
+
Frameworks:
|
|
89
|
+
React: 18.2.0 → 19.0.0 (1 behind)
|
|
90
|
+
Dependencies:
|
|
91
|
+
31 current 5 1-behind 2 2+ behind
|
|
92
|
+
|
|
93
|
+
Tech Stack
|
|
94
|
+
Frontend: React, Tailwind CSS
|
|
95
|
+
Bundlers: Vite
|
|
96
|
+
Testing: Vitest, Playwright
|
|
97
|
+
Lint & Format: ESLint, Prettier
|
|
98
|
+
|
|
99
|
+
Services & Integrations
|
|
100
|
+
Cloud: AWS SDK v3
|
|
101
|
+
Databases: PostgreSQL
|
|
102
|
+
|
|
103
|
+
TypeScript
|
|
104
|
+
v5.4.2 · strict ✔ · ESM · target: ES2022
|
|
105
|
+
|
|
106
|
+
Build & Deploy
|
|
107
|
+
CI: GitHub Actions
|
|
108
|
+
Docker: 2 Dockerfiles (node:20-alpine)
|
|
109
|
+
Package Managers: pnpm
|
|
110
|
+
|
|
111
|
+
Security Posture
|
|
112
|
+
Lockfile ✔ · .env ✔ · node_modules ✔
|
|
113
|
+
|
|
114
|
+
Dependency Graph
|
|
115
|
+
pnpm-lock.yaml: 312 unique, 487 installed
|
|
116
|
+
5 duplicated packages
|
|
117
|
+
|
|
118
|
+
Findings (2 warnings, 1 note)
|
|
81
119
|
⚠ Framework "NestJS" is 1 major version(s) behind
|
|
120
|
+
framework/outdated in src/api/package.json
|
|
82
121
|
⚠ 12% of dependencies are 2+ major versions behind
|
|
122
|
+
dependency/outdated in src/api/package.json
|
|
123
|
+
ℹ TypeScript target is ES2022
|
|
124
|
+
ts/target in tsconfig.json
|
|
125
|
+
|
|
126
|
+
╔══════════════════════════════════════════╗
|
|
127
|
+
║ Top Priority Actions ║
|
|
128
|
+
╚══════════════════════════════════════════╝
|
|
129
|
+
|
|
130
|
+
1. Upgrade NestJS 10.3.0 → 11.0.0 in my-api
|
|
131
|
+
1 major version behind. Major framework drift increases
|
|
132
|
+
breaking change risk and blocks access to security fixes.
|
|
133
|
+
./src/api
|
|
134
|
+
NestJS: 10.3.0 → 11.0.0 (1 behind)
|
|
135
|
+
Impact: +5–15 points (framework score)
|
|
136
|
+
|
|
137
|
+
2. Reduce dependency rot in my-api (42% severely outdated)
|
|
138
|
+
3 of 53 dependencies are 2+ majors behind. Run `npm outdated`
|
|
139
|
+
and prioritise packages with known CVEs.
|
|
140
|
+
./src/api
|
|
141
|
+
express: 3.4.0 → 5.0.0 (2 majors behind)
|
|
142
|
+
lodash: 3.10.1 → 4.17.21 (1 major behind)
|
|
143
|
+
... and 1 more
|
|
144
|
+
Impact: +5–10 points (dependency score)
|
|
145
|
+
|
|
146
|
+
Scanned at 2026-02-16T00:00:00.000Z · 1.2s · 48 files scanned
|
|
83
147
|
```
|
|
84
148
|
|
|
85
149
|
---
|
|
@@ -121,7 +185,7 @@ Take a baseline snapshot, then measure drift over time:
|
|
|
121
185
|
|
|
122
186
|
```bash
|
|
123
187
|
npx vibgrate baseline .
|
|
124
|
-
npx vibgrate scan
|
|
188
|
+
npx vibgrate scan --baseline .vibgrate/baseline.json
|
|
125
189
|
```
|
|
126
190
|
|
|
127
191
|
### Multiple Output Formats
|
|
@@ -137,10 +201,26 @@ npx vibgrate scan . --baseline .vibgrate/baseline.json
|
|
|
137
201
|
|
|
138
202
|
Push scan results to the [Vibgrate Dashboard](https://vibgrate.com) for trend analysis, cross-repo comparison, and team-wide visibility. Upload is always opt-in — the CLI provides full value offline.
|
|
139
203
|
|
|
204
|
+
The easiest way is to combine scan and push in a single command:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
VIBGRATE_DSN="..." npx @vibgrate/cli scan --push
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Or pass the DSN directly:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
npx @vibgrate/cli scan --push --dsn "vibgrate+https://<key_id>:<secret>@us.ingest.vibgrate.com/<workspace_id>"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
You can also push a previously generated artifact separately:
|
|
217
|
+
|
|
140
218
|
```bash
|
|
141
219
|
VIBGRATE_DSN="..." vibgrate push
|
|
142
220
|
```
|
|
143
221
|
|
|
222
|
+
> **Get your DSN:** Sign up at [vibgrate.com](https://vibgrate.com) and your workspace will be created automatically with a ready-to-paste code snippet containing your DSN.
|
|
223
|
+
|
|
144
224
|
---
|
|
145
225
|
|
|
146
226
|
## CI Integration
|
|
@@ -149,18 +229,23 @@ VIBGRATE_DSN="..." vibgrate push
|
|
|
149
229
|
|
|
150
230
|
```yaml
|
|
151
231
|
- name: Vibgrate Scan
|
|
152
|
-
|
|
232
|
+
env:
|
|
233
|
+
VIBGRATE_DSN: ${{ secrets.VIBGRATE_DSN }}
|
|
234
|
+
run: npx @vibgrate/cli scan --push --format sarif --out vibgrate.sarif --fail-on error
|
|
153
235
|
|
|
154
236
|
- name: Upload SARIF
|
|
237
|
+
if: always()
|
|
155
238
|
uses: github/codeql-action/upload-sarif@v3
|
|
156
239
|
with:
|
|
157
240
|
sarif_file: vibgrate.sarif
|
|
158
241
|
```
|
|
159
242
|
|
|
243
|
+
> **Setup:** Add your DSN as a repository secret named `VIBGRATE_DSN` under **Settings → Secrets and variables → Actions**. Get your DSN from [vibgrate.com](https://vibgrate.com) — it's generated automatically when you create a workspace.
|
|
244
|
+
|
|
160
245
|
### Azure DevOps
|
|
161
246
|
|
|
162
247
|
```yaml
|
|
163
|
-
- script: npx @vibgrate/cli scan
|
|
248
|
+
- script: npx @vibgrate/cli scan --format sarif --out vibgrate.sarif --fail-on error
|
|
164
249
|
displayName: Vibgrate Scan
|
|
165
250
|
```
|
|
166
251
|
|
|
@@ -202,9 +287,20 @@ Vibgrate is designed to be safe to run on any codebase:
|
|
|
202
287
|
- **No source code is read** — only `package.json`, `tsconfig.json`, lockfiles, and project manifests
|
|
203
288
|
- **No secrets are scanned** — ever
|
|
204
289
|
- **No git history, authors, or commit messages** — only HEAD SHA and branch name for traceability
|
|
205
|
-
- **No data leaves your machine** unless you explicitly run `vibgrate push`
|
|
290
|
+
- **No data leaves your machine** unless you explicitly run `vibgrate push` or `vibgrate scan --push`
|
|
206
291
|
- **No login required** — works fully offline
|
|
207
292
|
|
|
293
|
+
### `.gitignore`
|
|
294
|
+
|
|
295
|
+
The `.vibgrate/` directory contains ephemeral scan results and should not be committed to version control. Add it to your `.gitignore`:
|
|
296
|
+
|
|
297
|
+
```gitignore
|
|
298
|
+
# Vibgrate scan results (do not commit)
|
|
299
|
+
.vibgrate/
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
The CLI writes per-project score files to `.vibgrate/` inside each detected project directory. These are regenerated on every scan and should not be copied between environments.
|
|
303
|
+
|
|
208
304
|
---
|
|
209
305
|
|
|
210
306
|
## Commands
|
|
@@ -212,6 +308,7 @@ Vibgrate is designed to be safe to run on any codebase:
|
|
|
212
308
|
| Command | Description |
|
|
213
309
|
|---------|-------------|
|
|
214
310
|
| `vibgrate scan [path]` | Scan for upgrade drift |
|
|
311
|
+
| `vibgrate scan --push` | Scan and auto-push to dashboard |
|
|
215
312
|
| `vibgrate baseline [path]` | Create a drift baseline |
|
|
216
313
|
| `vibgrate report` | Generate a report from a scan artifact |
|
|
217
314
|
| `vibgrate init [path]` | Initialise config and `.vibgrate/` directory |
|
|
@@ -8,7 +8,10 @@ function formatMarkdown(artifact) {
|
|
|
8
8
|
lines.push(`| **Drift Score** | ${artifact.drift.score}/100 |`);
|
|
9
9
|
lines.push(`| **Risk Level** | ${artifact.drift.riskLevel.toUpperCase()} |`);
|
|
10
10
|
lines.push(`| **Projects** | ${artifact.projects.length} |`);
|
|
11
|
-
|
|
11
|
+
const scannedMeta = [artifact.timestamp];
|
|
12
|
+
if (artifact.durationMs !== void 0) scannedMeta.push(`${(artifact.durationMs / 1e3).toFixed(1)}s`);
|
|
13
|
+
if (artifact.filesScanned !== void 0) scannedMeta.push(`${artifact.filesScanned} files`);
|
|
14
|
+
lines.push(`| **Scanned** | ${scannedMeta.join(" \xB7 ")} |`);
|
|
12
15
|
if (artifact.vcs) {
|
|
13
16
|
lines.push(`| **VCS** | ${artifact.vcs.type} |`);
|
|
14
17
|
if (artifact.vcs.branch) lines.push(`| **Branch** | ${artifact.vcs.branch} |`);
|