@vibgrate/cli 0.1.1 → 0.1.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.
Files changed (4) hide show
  1. package/DOCS.md +554 -0
  2. package/LICENSE +45 -0
  3. package/README.md +234 -0
  4. package/package.json +5 -3
package/DOCS.md ADDED
@@ -0,0 +1,554 @@
1
+ # Vibgrate CLI — Full Documentation
2
+
3
+ > Continuous Upgrade Drift Intelligence for Node & .NET
4
+
5
+ For a quick overview, see the [README](./README.md). This document covers everything in detail.
6
+
7
+ ---
8
+
9
+ ## Table of Contents
10
+
11
+ - [How It Works](#how-it-works)
12
+ - [Commands Reference](#commands-reference)
13
+ - [vibgrate init](#vibgrate-init)
14
+ - [vibgrate scan](#vibgrate-scan)
15
+ - [vibgrate baseline](#vibgrate-baseline)
16
+ - [vibgrate report](#vibgrate-report)
17
+ - [vibgrate push](#vibgrate-push)
18
+ - [vibgrate dsn create](#vibgrate-dsn-create)
19
+ - [vibgrate update](#vibgrate-update)
20
+ - [Upgrade Drift Score](#upgrade-drift-score)
21
+ - [How the Score Is Calculated](#how-the-score-is-calculated)
22
+ - [Risk Levels](#risk-levels)
23
+ - [Score Components](#score-components)
24
+ - [Output Formats](#output-formats)
25
+ - [Text](#text)
26
+ - [JSON Artifact](#json-artifact)
27
+ - [SARIF](#sarif)
28
+ - [Markdown](#markdown)
29
+ - [Configuration](#configuration)
30
+ - [vibgrate.config.ts](#vibgrateconfigts)
31
+ - [Thresholds](#thresholds)
32
+ - [Scanner Toggles](#scanner-toggles)
33
+ - [Extended Scanners](#extended-scanners)
34
+ - [Platform Matrix](#platform-matrix)
35
+ - [Dependency Risk](#dependency-risk)
36
+ - [Dependency Graph & Duplication](#dependency-graph--duplication)
37
+ - [Tooling Inventory](#tooling-inventory)
38
+ - [Build & Deploy Surface Area](#build--deploy-surface-area)
39
+ - [TypeScript Modernity](#typescript-modernity)
40
+ - [Breaking Change Exposure](#breaking-change-exposure)
41
+ - [File Hotspots](#file-hotspots)
42
+ - [Security Posture](#security-posture)
43
+ - [Service Dependencies](#service-dependencies)
44
+ - [CI Integration](#ci-integration)
45
+ - [GitHub Actions](#github-actions)
46
+ - [Azure DevOps](#azure-devops)
47
+ - [GitLab CI](#gitlab-ci)
48
+ - [Generic Pipelines](#generic-pipelines)
49
+ - [Dashboard Upload](#dashboard-upload)
50
+ - [DSN Tokens](#dsn-tokens)
51
+ - [Data Residency](#data-residency)
52
+ - [Privacy & Security](#privacy--security)
53
+ - [Exit Codes](#exit-codes)
54
+ - [Programmatic API](#programmatic-api)
55
+
56
+ ---
57
+
58
+ ## How It Works
59
+
60
+ Vibgrate recursively scans your repository for `package.json` (Node/TypeScript) and `.sln`/`.csproj` (.NET) files. For each project it discovers, it:
61
+
62
+ 1. **Detects** the runtime version, target framework, and all dependencies
63
+ 2. **Queries** the npm/NuGet registry for latest stable versions (with built-in caching and concurrency control)
64
+ 3. **Computes** how far behind each component is — major version lag, EOL proximity, dependency age distribution
65
+ 4. **Generates** a deterministic Upgrade Drift Score (0–100)
66
+ 5. **Produces** findings, a full JSON artifact, and optional SARIF output
67
+
68
+ No source code is read. No secrets are scanned. The CLI works entirely offline — dashboard upload is optional.
69
+
70
+ ---
71
+
72
+ ## Commands Reference
73
+
74
+ ### vibgrate init
75
+
76
+ Initialise Vibgrate in a project.
77
+
78
+ ```bash
79
+ vibgrate init [path] [--baseline] [--yes]
80
+ ```
81
+
82
+ | Flag | Description |
83
+ |------|-------------|
84
+ | `--baseline` | Create an initial drift baseline after init |
85
+ | `--yes` | Skip confirmation prompts |
86
+
87
+ Creates:
88
+ - `.vibgrate/` directory
89
+ - `vibgrate.config.ts` with sensible defaults
90
+
91
+ ---
92
+
93
+ ### vibgrate scan
94
+
95
+ The primary command. Scans your project for upgrade drift.
96
+
97
+ ```bash
98
+ vibgrate scan [path] [--format text|json|sarif] [--out <file>] [--fail-on warn|error] [--baseline <file>] [--changed-only] [--concurrency <n>]
99
+ ```
100
+
101
+ | Flag | Default | Description |
102
+ |------|---------|-------------|
103
+ | `--format` | `text` | Output format: `text`, `json`, or `sarif` |
104
+ | `--out <file>` | — | Write output to a file |
105
+ | `--fail-on <level>` | — | Exit with code 2 if findings at this level exist |
106
+ | `--baseline <file>` | — | Compare against a previous baseline |
107
+ | `--changed-only` | — | Only scan changed files |
108
+ | `--concurrency <n>` | `8` | Max concurrent npm registry calls |
109
+
110
+ The scan always writes the full artifact to `.vibgrate/scan_result.json`.
111
+
112
+ ---
113
+
114
+ ### vibgrate baseline
115
+
116
+ Create a drift baseline snapshot for delta comparison.
117
+
118
+ ```bash
119
+ vibgrate baseline [path]
120
+ ```
121
+
122
+ Runs a full scan and saves the result to `.vibgrate/baseline.json`. Use this as the starting point for tracking drift over time.
123
+
124
+ ---
125
+
126
+ ### vibgrate report
127
+
128
+ Generate a human-readable report from a scan artifact.
129
+
130
+ ```bash
131
+ vibgrate report [--in <file>] [--format md|text|json]
132
+ ```
133
+
134
+ | Flag | Default | Description |
135
+ |------|---------|-------------|
136
+ | `--in` | `.vibgrate/scan_result.json` | Input artifact file |
137
+ | `--format` | `text` | Output format: `md`, `text`, or `json` |
138
+
139
+ ---
140
+
141
+ ### vibgrate push
142
+
143
+ Upload scan results to the Vibgrate dashboard API.
144
+
145
+ ```bash
146
+ vibgrate push [--dsn <dsn>] [--file <file>] [--region <region>] [--strict]
147
+ ```
148
+
149
+ | Flag | Default | Description |
150
+ |------|---------|-------------|
151
+ | `--dsn` | `VIBGRATE_DSN` env | DSN token for authentication |
152
+ | `--file` | `.vibgrate/scan_result.json` | Scan artifact to upload |
153
+ | `--region` | — | Override data residency region (`us`, `eu`) |
154
+ | `--strict` | — | Fail hard on upload errors |
155
+
156
+ Upload is always optional. Best-effort by default — use `--strict` in CI if you want the pipeline to fail on upload errors.
157
+
158
+ ---
159
+
160
+ ### vibgrate dsn create
161
+
162
+ Generate an HMAC-signed DSN token for API authentication.
163
+
164
+ ```bash
165
+ vibgrate dsn create --workspace <id> [--region <region>] [--ingest <url>] [--write <path>]
166
+ ```
167
+
168
+ | Flag | Default | Description |
169
+ |------|---------|-------------|
170
+ | `--workspace` | *required* | Your workspace ID |
171
+ | `--region` | `us` | Data residency region (`us`, `eu`) |
172
+ | `--ingest` | — | Custom ingest API URL (overrides `--region`) |
173
+ | `--write` | — | Write DSN to a file (add to `.gitignore`!) |
174
+
175
+ ---
176
+
177
+ ### vibgrate update
178
+
179
+ Check for and install updates.
180
+
181
+ ```bash
182
+ vibgrate update [--check] [--pm <manager>]
183
+ ```
184
+
185
+ | Flag | Description |
186
+ |------|-------------|
187
+ | `--check` | Only check for updates, don't install |
188
+ | `--pm` | Force a package manager (`npm`, `pnpm`, `yarn`, `bun`) |
189
+
190
+ ---
191
+
192
+ ## Upgrade Drift Score
193
+
194
+ ### How the Score Is Calculated
195
+
196
+ The Upgrade Drift Score is a deterministic, versioned metric (0–100) that represents how far behind your codebase is relative to the current stable ecosystem baseline.
197
+
198
+ **Higher score = healthier upgrade posture.**
199
+
200
+ ### Risk Levels
201
+
202
+ | Score | Risk Level |
203
+ |-------|------------|
204
+ | 70–100 | **Low** — You're in good shape |
205
+ | 40–69 | **Moderate** — Some attention needed |
206
+ | 0–39 | **High** — Significant upgrade debt |
207
+
208
+ ### Score Components
209
+
210
+ The overall score is a weighted combination of four components:
211
+
212
+ | Component | What It Measures |
213
+ |-----------|-----------------|
214
+ | **Runtime** | Node.js or .NET runtime major version lag |
215
+ | **Frameworks** | Major version distance for core frameworks (React, Next, NestJS, ASP.NET, etc.) |
216
+ | **Dependencies** | Age distribution across all dependencies (current vs 1 major behind vs 2+ behind) |
217
+ | **EOL Risk** | Proximity to end-of-life for runtimes and frameworks |
218
+
219
+ ---
220
+
221
+ ## Output Formats
222
+
223
+ ### Text
224
+
225
+ The default output. A coloured, human-readable report showing:
226
+ - Overall drift score and risk level
227
+ - Score component breakdown with visual bars
228
+ - Per-project details: runtime lag, framework versions, dependency distribution
229
+ - Findings with severity icons
230
+
231
+ ### JSON Artifact
232
+
233
+ The full scan artifact in JSON format. Contains all raw data, scores, findings, and VCS metadata. Stable schema (`schemaVersion: "1.0"`). This is the same artifact saved to `.vibgrate/scan_result.json`.
234
+
235
+ ### SARIF
236
+
237
+ [Static Analysis Results Interchange Format](https://sarifweb.azurewebsites.net/) — compatible with GitHub Code Scanning and Azure DevOps. Contains findings only (not all metrics). Ideal for integrating drift findings directly into your PR review workflow.
238
+
239
+ ### Markdown
240
+
241
+ A clean Markdown report suitable for PRs, wikis, or documentation.
242
+
243
+ ---
244
+
245
+ ## Configuration
246
+
247
+ ### vibgrate.config.ts
248
+
249
+ Run `vibgrate init` to generate the config file, or create one manually:
250
+
251
+ ```typescript
252
+ import type { VibgrateConfig } from '@vibgrate/cli';
253
+
254
+ const config: VibgrateConfig = {
255
+ exclude: ['legacy/**'],
256
+ thresholds: {
257
+ failOnError: {
258
+ eolDays: 180,
259
+ frameworkMajorLag: 3,
260
+ dependencyTwoPlusPercent: 50,
261
+ },
262
+ warn: {
263
+ frameworkMajorLag: 2,
264
+ dependencyTwoPlusPercent: 30,
265
+ },
266
+ },
267
+ scanners: {
268
+ platformMatrix: { enabled: true },
269
+ dependencyRisk: { enabled: true },
270
+ dependencyGraph: { enabled: true },
271
+ toolingInventory: { enabled: true },
272
+ buildDeploy: { enabled: true },
273
+ tsModernity: { enabled: true },
274
+ breakingChangeExposure: { enabled: true },
275
+ fileHotspots: { enabled: true },
276
+ securityPosture: { enabled: true },
277
+ serviceDependencies: { enabled: true },
278
+ },
279
+ };
280
+
281
+ export default config;
282
+ ```
283
+
284
+ Also supports `vibgrate.config.js` and `vibgrate.config.json`.
285
+
286
+ ### Thresholds
287
+
288
+ Control when findings are raised and when the CLI should fail.
289
+
290
+ | Threshold | Default | Triggers |
291
+ |-----------|---------|----------|
292
+ | `failOnError.eolDays` | 180 | Error finding when runtime EOL is within N days |
293
+ | `failOnError.frameworkMajorLag` | 3 | Error finding when any framework is N+ majors behind |
294
+ | `failOnError.dependencyTwoPlusPercent` | 50 | Error finding when N+% of dependencies are 2+ majors behind |
295
+ | `warn.frameworkMajorLag` | 2 | Warning finding when any framework is N+ majors behind |
296
+ | `warn.dependencyTwoPlusPercent` | 30 | Warning finding when N+% of dependencies are 2+ majors behind |
297
+
298
+ ### Scanner Toggles
299
+
300
+ Each extended scanner can be individually disabled. Set `scanners: false` to disable all extended scanners (the core drift scan always runs).
301
+
302
+ ---
303
+
304
+ ## Extended Scanners
305
+
306
+ Beyond the core drift score, Vibgrate runs a suite of extended scanners that collect high-value migration intelligence. All scanners:
307
+
308
+ - Are **read-only** — they never write files or execute project code
309
+ - Run **in parallel** — failures in one scanner never affect the others
310
+ - Can be **individually toggled** in the config
311
+ - Collect **zero sensitive data** — no source code, no secrets, no PII
312
+
313
+ ### Platform Matrix
314
+
315
+ Collects platform and architecture signals that predict where builds will break when moving CI runners, containers, or CPU architectures.
316
+
317
+ - `engines.node` and `engines.npm`/`engines.pnpm` ranges
318
+ - `.nvmrc` / `.node-version` files
319
+ - .NET `TargetFramework` and SDK versions
320
+ - Native module risk packages (`sharp`, `bcrypt`, `node-gyp`, etc.)
321
+ - OS-assumption scripts in `package.json`
322
+ - Dockerfile base images (FROM lines only)
323
+
324
+ ### Dependency Risk
325
+
326
+ Extends dependency analysis with risk classification signals:
327
+
328
+ - Deprecated packages (npm `deprecated` field)
329
+ - Native module detection
330
+ - Platform-specific package flags
331
+
332
+ ### Dependency Graph & Duplication
333
+
334
+ Parses lockfiles (pnpm, npm, yarn, .NET) to build a workspace-wide dependency graph:
335
+
336
+ - Total unique vs. installed dependency counts
337
+ - Duplicated packages (multiple versions of the same package)
338
+ - Phantom dependencies (used but not declared)
339
+
340
+ ### Tooling Inventory
341
+
342
+ Maps the full technology stack across your workspace by detecting package names in dependencies:
343
+
344
+ | Category | Examples |
345
+ |----------|---------|
346
+ | Frontend | React, Vue, Angular, Svelte, Solid |
347
+ | Meta-frameworks | Next.js, Nuxt, Astro, Remix |
348
+ | Bundlers | Vite, webpack, esbuild, Rollup |
349
+ | Backend | Express, Fastify, NestJS, Hono |
350
+ | ORM / DB | Prisma, Drizzle, TypeORM, EF Core |
351
+ | Testing | Vitest, Jest, Playwright, xUnit |
352
+ | Observability | Sentry, OpenTelemetry, Pino, Winston |
353
+
354
+ ### Build & Deploy Surface Area
355
+
356
+ Detects CI/CD, containerisation, and infrastructure-as-code:
357
+
358
+ - CI systems (GitHub Actions, GitLab CI, Azure DevOps, Jenkins, CircleCI)
359
+ - Docker and Docker Compose
360
+ - IaC (Terraform, Bicep, CloudFormation, Pulumi)
361
+ - Release tooling (Changesets, semantic-release, GitVersion)
362
+ - Package managers and monorepo tools
363
+
364
+ ### TypeScript Modernity
365
+
366
+ Reads `tsconfig.json` compiler options to assess strictness and modernity:
367
+
368
+ - TypeScript version
369
+ - `strict`, `noImplicitAny`, `strictNullChecks` flags
370
+ - Module system (`module`, `moduleResolution`, `target`)
371
+ - ESM vs CJS classification
372
+ - `exports` field presence
373
+
374
+ ### Breaking Change Exposure
375
+
376
+ Flags packages and patterns known to cause upgrade pain:
377
+
378
+ - Deprecated packages (e.g. `request`, `node-sass`, `tslint`, `moment`)
379
+ - Legacy Node API polyfills no longer needed on Node 18+ (e.g. `node-fetch`, `abort-controller`)
380
+ - Peer dependency conflicts
381
+ - Exposure score (0–100)
382
+
383
+ ### File Hotspots
384
+
385
+ Lightweight complexity analysis using filesystem metadata only (never reads file contents):
386
+
387
+ - File counts by extension
388
+ - Largest files by size (path + bytes)
389
+ - Directory depth distribution
390
+ - Most-used packages across the workspace
391
+
392
+ ### Security Posture
393
+
394
+ Structural security hygiene indicators (not a secret scanner):
395
+
396
+ - Lockfile presence and consistency
397
+ - `.gitignore` coverage for `.env` files and `node_modules`
398
+ - `.env` files tracked outside `.gitignore`
399
+ - Audit severity counts (via `npm audit --json`)
400
+
401
+ ### Service Dependencies
402
+
403
+ Maps external service and platform dependencies by detecting SDK packages:
404
+
405
+ | Category | Examples |
406
+ |----------|---------|
407
+ | Payment | Stripe, Braintree, PayPal |
408
+ | Auth | Auth0, Clerk, Firebase, Passport |
409
+ | Cloud SDKs | AWS, Azure, Google Cloud |
410
+ | Databases | PostgreSQL, MongoDB, Redis |
411
+ | Messaging | SQS, SNS, Kafka, BullMQ |
412
+ | Observability | Sentry, DataDog, New Relic |
413
+
414
+ ---
415
+
416
+ ## CI Integration
417
+
418
+ ### GitHub Actions
419
+
420
+ ```yaml
421
+ steps:
422
+ - name: Vibgrate Scan
423
+ run: npx @vibgrate/cli scan . --format sarif --out vibgrate.sarif --fail-on error
424
+
425
+ - name: Upload SARIF
426
+ uses: github/codeql-action/upload-sarif@v3
427
+ with:
428
+ sarif_file: vibgrate.sarif
429
+
430
+ # Optional: push metrics to dashboard
431
+ - name: Push Vibgrate Metrics
432
+ env:
433
+ VIBGRATE_DSN: ${{ secrets.VIBGRATE_DSN }}
434
+ run: npx @vibgrate/cli push --file .vibgrate/scan_result.json
435
+ ```
436
+
437
+ ### Azure DevOps
438
+
439
+ ```yaml
440
+ steps:
441
+ - script: npx @vibgrate/cli scan . --format sarif --out vibgrate.sarif --fail-on error
442
+ displayName: Vibgrate Scan
443
+
444
+ - task: PublishBuildArtifacts@1
445
+ inputs:
446
+ PathtoPublish: vibgrate.sarif
447
+ ArtifactName: VibgrateSARIF
448
+ ```
449
+
450
+ ### GitLab CI
451
+
452
+ ```yaml
453
+ vibgrate:
454
+ script:
455
+ - npx @vibgrate/cli scan . --format sarif --out vibgrate.sarif --fail-on error
456
+ artifacts:
457
+ reports:
458
+ sast: vibgrate.sarif
459
+ ```
460
+
461
+ ### Generic Pipelines
462
+
463
+ Vibgrate works in any CI environment. The CLI:
464
+
465
+ - Requires no login or authentication
466
+ - Returns meaningful exit codes (see below)
467
+ - Produces standard SARIF output
468
+ - Works entirely offline (push is opt-in)
469
+
470
+ ---
471
+
472
+ ## Dashboard Upload
473
+
474
+ ### DSN Tokens
475
+
476
+ Vibgrate uses HMAC-signed DSN tokens for authenticated uploads. The DSN format:
477
+
478
+ ```
479
+ vibgrate+https://<key_id>:<secret>@<ingest_host>/<workspace_id>
480
+ ```
481
+
482
+ Set `VIBGRATE_DSN` as a secret in your CI environment. Uploads are always optional — the CLI provides full value locally without any server connection.
483
+
484
+ ### Data Residency
485
+
486
+ Vibgrate supports region-specific ingest endpoints:
487
+
488
+ | Region | Endpoint |
489
+ |--------|----------|
490
+ | US (default) | `us.ingest.vibgrate.com` |
491
+ | EU | `eu.ingest.vibgrate.com` |
492
+
493
+ Use `--region eu` on `push` or `dsn create` to route data to the EU endpoint.
494
+
495
+ ---
496
+
497
+ ## Privacy & Security
498
+
499
+ Vibgrate is built with a privacy-first architecture. Here's what it **never** does:
500
+
501
+ | Category | Hard guarantee |
502
+ |----------|---------------|
503
+ | Source code | Never read beyond config/manifest files |
504
+ | Secrets | Never scanned for, never extracted |
505
+ | Environment values | Never read — only `.env` file existence is flagged |
506
+ | Git identity data | Never accessed — `git log` is never invoked |
507
+ | File contents | Only structured config fields are extracted |
508
+ | Network endpoints | Never parsed from config files |
509
+
510
+ What it **does** collect:
511
+
512
+ - Package names and version numbers (from `package.json`, `.csproj`, lockfiles)
513
+ - Config structure flags (e.g. `strict: true` from `tsconfig.json`)
514
+ - File names and sizes (paths and metadata, never contents)
515
+ - Public npm/NuGet registry metadata (latest versions, deprecation flags)
516
+ - CI/Docker/IaC file presence and structural counts
517
+
518
+ ---
519
+
520
+ ## Exit Codes
521
+
522
+ | Code | Meaning |
523
+ |------|---------|
524
+ | `0` | Success |
525
+ | `1` | Runtime error |
526
+ | `2` | `--fail-on` threshold exceeded |
527
+
528
+ ---
529
+
530
+ ## Programmatic API
531
+
532
+ The package exports its core types for programmatic use:
533
+
534
+ ```typescript
535
+ import type { VibgrateConfig, ScanArtifact, DriftScore, Finding } from '@vibgrate/cli';
536
+ ```
537
+
538
+ ---
539
+
540
+ ## Requirements
541
+
542
+ - **Node.js** >= 20.0.0
543
+ - Works on macOS, Linux, and Windows
544
+
545
+ ---
546
+
547
+ ## Links
548
+
549
+ - [Website](https://vibgrate.com)
550
+ - [npm](https://www.npmjs.com/package/@vibgrate/cli)
551
+
552
+ ---
553
+
554
+ Copyright © 2026 Vibgrate. All rights reserved. See [LICENSE](./LICENSE) for terms.
package/LICENSE ADDED
@@ -0,0 +1,45 @@
1
+ Vibgrate Proprietary License
2
+
3
+ Copyright (c) 2026 Vibgrate. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person or organisation
6
+ obtaining a copy of this software in compiled/distributed form (the "Software"),
7
+ to use the Software for internal business and personal purposes, subject to the
8
+ following conditions:
9
+
10
+ 1. PERMITTED USE
11
+ You may install, run, and use the Software as provided via the npm registry
12
+ for the purpose of analysing upgrade drift in your own projects.
13
+
14
+ 2. NO MODIFICATION
15
+ You may not modify, adapt, translate, reverse-engineer, decompile,
16
+ disassemble, or create derivative works based on the Software.
17
+
18
+ 3. NO REDISTRIBUTION
19
+ You may not redistribute, sublicense, sell, lease, or otherwise transfer
20
+ the Software or any copy thereof to any third party, except as part of
21
+ your own project's development toolchain (e.g. listed as a dependency in
22
+ package.json).
23
+
24
+ 4. NO SOURCE CODE ACCESS
25
+ The source code of this Software is proprietary and confidential. Access
26
+ to source code, if provided separately, does not grant any additional
27
+ rights beyond those stated in this license.
28
+
29
+ 5. NO WARRANTY
30
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33
+
34
+ 6. LIMITATION OF LIABILITY
35
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
36
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
37
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
38
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
39
+
40
+ 7. TERMINATION
41
+ This license is effective until terminated. It will terminate automatically
42
+ if you fail to comply with any of its terms. Upon termination, you must
43
+ destroy all copies of the Software in your possession.
44
+
45
+ For licensing enquiries: ops@vibgrate.com
package/README.md ADDED
@@ -0,0 +1,234 @@
1
+ <p align="center">
2
+ <strong>@vibgrate/cli</strong>
3
+ <br />
4
+ Continuous Upgrade Drift Intelligence for Node & .NET
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@vibgrate/cli"><img src="https://img.shields.io/npm/v/@vibgrate/cli?color=blue&label=npm" alt="npm version" /></a>
9
+ <a href="https://www.npmjs.com/package/@vibgrate/cli"><img src="https://img.shields.io/npm/dm/@vibgrate/cli?color=green" alt="npm downloads" /></a>
10
+ <a href="https://vibgrate.com"><img src="https://img.shields.io/badge/website-vibgrate.com-blue" alt="website" /></a>
11
+ <img src="https://img.shields.io/node/v/@vibgrate/cli" alt="node version" />
12
+ </p>
13
+
14
+ ---
15
+
16
+ Modern codebases don't break all at once — they decay silently. Node runtimes fall behind LTS. .NET frameworks approach end-of-life. Core dependencies lag multiple major versions. Upgrade cost compounds until it becomes a project in itself.
17
+
18
+ **Vibgrate turns that invisible decay into a measurable signal.** One CLI command gives you an Upgrade Drift Score (0–100), actionable findings, and a clear picture of where your upgrade debt lives.
19
+
20
+ ---
21
+
22
+ ## Quick Start
23
+
24
+ Run instantly with npx — no install required:
25
+
26
+ ```bash
27
+ npx @vibgrate/cli scan .
28
+ ```
29
+
30
+ Or install as a dev dependency:
31
+
32
+ ```bash
33
+ npm install -D @vibgrate/cli
34
+ ```
35
+
36
+ Then scan your project:
37
+
38
+ ```bash
39
+ vibgrate scan .
40
+ ```
41
+
42
+ That's it. You'll see a full drift report in seconds.
43
+
44
+ ---
45
+
46
+ ## What You Get
47
+
48
+ ```
49
+ ╔══════════════════════════════════════════╗
50
+ ║ Vibgrate Drift Report ║
51
+ ╚══════════════════════════════════════════╝
52
+
53
+ Drift Score: 72/100
54
+ Risk Level: Low
55
+ Projects: 3
56
+
57
+ Score Breakdown
58
+ Runtime: ████████████████████ 100
59
+ Frameworks: ████████████████░░░░ 78
60
+ Dependencies: ██████████████░░░░░░ 64
61
+ EOL Risk: ████████████████████ 100
62
+
63
+ ── my-api (node) src/api
64
+ Runtime: 20.11.0 (current)
65
+ Frameworks:
66
+ NestJS: 10.3.0 → 11.0.0 (1 behind)
67
+ Dependencies:
68
+ 42 current 8 1-behind 3 2+ behind
69
+
70
+ Findings
71
+ ⚠ Framework "NestJS" is 1 major version(s) behind
72
+ ⚠ 12% of dependencies are 2+ major versions behind
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Key Features
78
+
79
+ ### Upgrade Drift Score
80
+
81
+ A single 0–100 number that tells you how upgrade-ready your codebase is. Computed from runtime lag, framework versions, dependency age distribution, and EOL proximity. Deterministic and comparable across repos.
82
+
83
+ ### Multi-Platform Scanning
84
+
85
+ Works across **Node.js/TypeScript** and **.NET** projects in the same scan. Detects `package.json`, `.sln`, and `.csproj` files recursively.
86
+
87
+ ### CI-Native
88
+
89
+ Designed to live in your build pipeline. Returns meaningful exit codes, produces SARIF output for GitHub Code Scanning and Azure DevOps, and requires zero configuration to get started.
90
+
91
+ ### Ten Extended Scanners
92
+
93
+ Beyond the core drift score, Vibgrate runs a suite of extended scanners — all optional, all privacy-safe:
94
+
95
+ | Scanner | What It Finds |
96
+ |---------|---------------|
97
+ | **Platform Matrix** | Native modules, OS assumptions, Docker base images, architecture risks |
98
+ | **Dependency Risk** | Deprecated packages, native module flags, platform-specific dependencies |
99
+ | **Dependency Graph** | Duplicated packages, phantom dependencies, lockfile analysis |
100
+ | **Tooling Inventory** | Full tech stack map — frameworks, bundlers, ORMs, testing tools |
101
+ | **Build & Deploy** | CI systems, Docker, IaC, release tooling, monorepo tools |
102
+ | **TypeScript Modernity** | Strict mode, module system, ESM readiness |
103
+ | **Breaking Change Exposure** | Packages known to cause upgrade pain, legacy polyfills |
104
+ | **File Hotspots** | Codebase shape — file counts, sizes, depth, shared packages |
105
+ | **Security Posture** | Lockfile hygiene, `.gitignore` coverage, audit severity counts |
106
+ | **Service Dependencies** | External SDK detection — payment, auth, cloud, databases, messaging |
107
+
108
+ ### Baseline & Delta Tracking
109
+
110
+ Take a baseline snapshot, then measure drift over time:
111
+
112
+ ```bash
113
+ vibgrate baseline .
114
+ vibgrate scan . --baseline .vibgrate/baseline.json
115
+ ```
116
+
117
+ ### Multiple Output Formats
118
+
119
+ | Format | Use Case |
120
+ |--------|----------|
121
+ | `text` | Terminal output, local development |
122
+ | `json` | Programmatic consumption, artifact storage |
123
+ | `sarif` | GitHub Code Scanning, Azure DevOps integration |
124
+ | `md` | PR comments, documentation, wikis |
125
+
126
+ ### Dashboard Upload (Optional)
127
+
128
+ 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.
129
+
130
+ ```bash
131
+ VIBGRATE_DSN="..." vibgrate push
132
+ ```
133
+
134
+ ---
135
+
136
+ ## CI Integration
137
+
138
+ ### GitHub Actions
139
+
140
+ ```yaml
141
+ - name: Vibgrate Scan
142
+ run: npx @vibgrate/cli scan . --format sarif --out vibgrate.sarif --fail-on error
143
+
144
+ - name: Upload SARIF
145
+ uses: github/codeql-action/upload-sarif@v3
146
+ with:
147
+ sarif_file: vibgrate.sarif
148
+ ```
149
+
150
+ ### Azure DevOps
151
+
152
+ ```yaml
153
+ - script: npx @vibgrate/cli scan . --format sarif --out vibgrate.sarif --fail-on error
154
+ displayName: Vibgrate Scan
155
+ ```
156
+
157
+ Works in any CI environment. No login required. No configuration needed.
158
+
159
+ ---
160
+
161
+ ## Configuration
162
+
163
+ Optionally create a `vibgrate.config.ts` to customise thresholds and scanner toggles:
164
+
165
+ ```bash
166
+ vibgrate init
167
+ ```
168
+
169
+ ```typescript
170
+ import type { VibgrateConfig } from '@vibgrate/cli';
171
+
172
+ const config: VibgrateConfig = {
173
+ exclude: ['legacy/**'],
174
+ thresholds: {
175
+ failOnError: {
176
+ eolDays: 180,
177
+ frameworkMajorLag: 3,
178
+ dependencyTwoPlusPercent: 50,
179
+ },
180
+ },
181
+ };
182
+
183
+ export default config;
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Privacy First
189
+
190
+ Vibgrate is designed to be safe to run on any codebase:
191
+
192
+ - **No source code is read** — only `package.json`, `tsconfig.json`, lockfiles, and project manifests
193
+ - **No secrets are scanned** — ever
194
+ - **No git history, authors, or commit messages** — only HEAD SHA and branch name for traceability
195
+ - **No data leaves your machine** unless you explicitly run `vibgrate push`
196
+ - **No login required** — works fully offline
197
+
198
+ ---
199
+
200
+ ## Commands
201
+
202
+ | Command | Description |
203
+ |---------|-------------|
204
+ | `vibgrate scan [path]` | Scan for upgrade drift |
205
+ | `vibgrate baseline [path]` | Create a drift baseline |
206
+ | `vibgrate report` | Generate a report from a scan artifact |
207
+ | `vibgrate init [path]` | Initialise config and `.vibgrate/` directory |
208
+ | `vibgrate push` | Upload scan results to dashboard |
209
+ | `vibgrate dsn create` | Generate a DSN token |
210
+ | `vibgrate update` | Check for and install updates |
211
+
212
+ ---
213
+
214
+ ## Requirements
215
+
216
+ - **Node.js** >= 20.0.0
217
+ - Works on macOS, Linux, and Windows
218
+
219
+ ---
220
+
221
+ ## Full Documentation
222
+
223
+ See [DOCS.md](https://github.com/crowers/vibgrate-cli/blob/main/packages/vibgrate-cli/DOCS.md) for the complete reference — all commands, all flags, configuration options, extended scanner details, CI examples, and more.
224
+
225
+ ---
226
+
227
+ ## Links
228
+
229
+ - [Website](https://vibgrate.com)
230
+ - [Documentation](https://github.com/crowers/vibgrate-cli/blob/main/packages/vibgrate-cli/DOCS.md)
231
+
232
+ ---
233
+
234
+ Copyright © 2026 Vibgrate. All rights reserved. See [LICENSE](./LICENSE) for terms.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibgrate/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "CLI for measuring upgrade drift across Node & .NET projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,7 +15,8 @@
15
15
  }
16
16
  },
17
17
  "files": [
18
- "dist"
18
+ "dist",
19
+ "DOCS.md"
19
20
  ],
20
21
  "scripts": {
21
22
  "build": "tsup src/cli.ts src/index.ts --format esm --dts --clean",
@@ -34,7 +35,8 @@
34
35
  "sarif"
35
36
  ],
36
37
  "author": "Vibgrate",
37
- "license": "UNLICENSED",
38
+ "license": "SEE LICENSE IN LICENSE",
39
+ "homepage": "https://vibgrate.com",
38
40
  "devDependencies": {
39
41
  "@types/node": "^20.0.0",
40
42
  "@types/semver": "^7.5.0",