@vibecheckai/cli 3.0.7 โ 3.0.9
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 +77 -484
- package/bin/runners/cli-utils.js +6 -6
- package/bin/runners/lib/__tests__/entitlements-v2.test.js +295 -0
- package/bin/runners/lib/entitlements-v2.js +409 -299
- package/bin/runners/lib/firewall-prompt.js +1 -1
- package/bin/runners/lib/sandbox/proof-chain.js +3 -3
- package/bin/runners/runFix.js +20 -0
- package/bin/runners/runInstall.js +41 -1
- package/bin/runners/runMcp.js +58 -0
- package/bin/runners/runPR.js +80 -12
- package/bin/runners/runProve.js +85 -27
- package/bin/runners/runReality.js +136 -16
- package/bin/runners/runReport.js +40 -0
- package/bin/runners/runScan.js +6 -6
- package/bin/runners/runShare.js +64 -4
- package/bin/runners/runShip.js +97 -1
- package/bin/runners/runStatus.js +3 -1
- package/bin/runners/runWatch.js +63 -6
- package/bin/vibecheck.js +161 -62
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -1,532 +1,125 @@
|
|
|
1
|
-
# vibecheck CLI v3.0.
|
|
1
|
+
# vibecheck CLI v3.0.9 ๐
|
|
2
2
|
|
|
3
|
-
Ship with confidence. One verdict:
|
|
3
|
+
**Ship with confidence. One verdict: SHIP | WARN | BLOCK**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- ๐ฏ **Unified CLI** - All spec commands now available: `install`, `ship`, `reality`, `fix`, `pr`, `share`, `ctx`
|
|
8
|
-
- ๐ **Context Contracts** - `ctx sync` writes routes.json, env.json, auth.json, external.json
|
|
9
|
-
- ๐ค **MCP Server v1** - AI agent integration with `validate_plan` hallucination stopper
|
|
10
|
-
- ๐ **Signed Entitlements** - Server-side metering with 24h offline grace
|
|
11
|
-
- ๐ **Reality โ Ship Integration** - Runtime findings (DeadUI, AuthCoverage) affect verdict
|
|
5
|
+
The CLI that catches AI hallucinations before they ship. Dead routes, fake data, missing auth, exposed secrets โ vibecheck blocks it all in CI.
|
|
12
6
|
|
|
13
7
|
## Installation
|
|
14
8
|
|
|
15
9
|
```bash
|
|
16
|
-
npm install -g @vibecheckai/cli
|
|
10
|
+
npm install -g @vibecheckai/cli
|
|
11
|
+
# or
|
|
12
|
+
npx @vibecheckai/cli ship
|
|
17
13
|
```
|
|
18
14
|
|
|
19
15
|
## Quick Start
|
|
20
16
|
|
|
21
17
|
```bash
|
|
22
|
-
#
|
|
23
|
-
vibecheck
|
|
24
|
-
|
|
25
|
-
# ๐ Authenticate with your API key
|
|
26
|
-
vibecheck auth --key gr_pro_your_api_key_here
|
|
18
|
+
# Get your ship verdict
|
|
19
|
+
vibecheck ship
|
|
27
20
|
|
|
28
|
-
#
|
|
29
|
-
vibecheck
|
|
21
|
+
# Full proof loop (scan โ reality โ verdict)
|
|
22
|
+
vibecheck prove --url http://localhost:3000
|
|
30
23
|
|
|
31
|
-
#
|
|
32
|
-
vibecheck
|
|
24
|
+
# Generate truthpack for AI agents
|
|
25
|
+
vibecheck ctx
|
|
33
26
|
|
|
34
|
-
#
|
|
35
|
-
vibecheck
|
|
27
|
+
# Environment diagnostics
|
|
28
|
+
vibecheck doctor
|
|
36
29
|
```
|
|
37
30
|
|
|
38
|
-
## Authentication
|
|
39
|
-
|
|
40
|
-
The CLI uses enterprise-grade authentication with secure credential storage.
|
|
41
|
-
|
|
42
|
-
### Commands
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
# Authenticate with API key (validates against vibecheck API)
|
|
46
|
-
vibecheck auth --key gr_pro_abc123xyz789
|
|
47
|
-
|
|
48
|
-
# Check current authentication status
|
|
49
|
-
# Shows masked key (gr_pro_****xyz9), tier, email, expiry
|
|
50
|
-
vibecheck auth --status
|
|
51
|
-
|
|
52
|
-
# Force refresh cached entitlements
|
|
53
|
-
vibecheck auth --refresh
|
|
54
|
-
|
|
55
|
-
# Logout and remove stored credentials
|
|
56
|
-
vibecheck auth --logout
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Features
|
|
60
|
-
|
|
61
|
-
- **Real API Validation**: Keys are validated against `POST /v1/cli/auth/validate`
|
|
62
|
-
- **Secure Storage**: Credentials stored with 0600 permissions (Unix) or NTFS ACLs (Windows)
|
|
63
|
-
- **Local Caching**: Entitlements cached for 15 minutes to reduce API calls
|
|
64
|
-
- **Auto-Refresh**: Cache reused if > 5 minutes remaining; use `--refresh` to force
|
|
65
|
-
- **Key Masking**: API keys always displayed masked: `gr_pro_****abcd`
|
|
66
|
-
- **Expiry Warnings**: Yellow warning if entitlements expire within 72 hours
|
|
67
|
-
|
|
68
|
-
### Credential Storage
|
|
69
|
-
|
|
70
|
-
| Platform | Location |
|
|
71
|
-
|----------|----------|
|
|
72
|
-
| macOS | `~/Library/Application Support/vibecheck/state.json` |
|
|
73
|
-
| Linux | `~/.config/vibecheck/state.json` |
|
|
74
|
-
| Windows | `%APPDATA%\vibecheck\state.json` |
|
|
75
|
-
|
|
76
|
-
If `keytar` is available, sensitive tokens are stored in the OS keychain.
|
|
77
|
-
|
|
78
31
|
## Commands
|
|
79
32
|
|
|
80
|
-
|
|
81
|
-
- `vibecheck scan` - Run security scans
|
|
82
|
-
- `vibecheck scan:secrets` - Scan for hardcoded secrets
|
|
83
|
-
- `vibecheck scan:vulnerabilities` - Scan dependencies for CVEs (OSV integration)
|
|
84
|
-
- `vibecheck scan:compliance` - Compliance assessment (Pro)
|
|
85
|
-
- `vibecheck sbom:generate` - Generate SBOM (Pro)
|
|
86
|
-
- `vibecheck ship` - Ship readiness checks (Starter+)
|
|
87
|
-
- `vibecheck reality` - Browser testing for fake data (Starter+)
|
|
88
|
-
- `vibecheck smells` - Code smell analysis
|
|
89
|
-
- `vibecheck fix` - Manual fix suggestions (Starter+)
|
|
90
|
-
- `vibecheck autopilot` - AI-powered batch remediation (Pro)
|
|
91
|
-
- `vibecheck cache:clear` - Clear OSV vulnerability cache
|
|
92
|
-
- `vibecheck cache:status` - Show cache statistics
|
|
93
|
-
- `vibecheck init` - Initialize vibecheck in a project (see [Init Command](#init-command))
|
|
94
|
-
- `vibecheck menu` - Interactive menu
|
|
95
|
-
|
|
96
|
-
## Init Command
|
|
33
|
+
### Core Proof Loop
|
|
97
34
|
|
|
98
|
-
|
|
35
|
+
| Command | Description |
|
|
36
|
+
|---------|-------------|
|
|
37
|
+
| `vibecheck scan` | Static analysis - routes, secrets, contracts |
|
|
38
|
+
| `vibecheck ship` | Verdict engine - SHIP / WARN / BLOCK |
|
|
39
|
+
| `vibecheck reality` | Runtime proof with Playwright |
|
|
40
|
+
| `vibecheck prove` | Full loop: ctx โ reality โ ship โ fix |
|
|
41
|
+
| `vibecheck fix` | AI-powered auto-fix (Pro) |
|
|
42
|
+
| `vibecheck report` | Generate HTML/MD/SARIF reports |
|
|
99
43
|
|
|
100
|
-
###
|
|
44
|
+
### Setup & Diagnostics
|
|
101
45
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
vibecheck init
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
vibecheck
|
|
108
|
-
|
|
109
|
-
# Initialize with CI and git hooks
|
|
110
|
-
vibecheck init --ci --hooks
|
|
111
|
-
|
|
112
|
-
# Non-interactive mode
|
|
113
|
-
vibecheck init --template startup --no-interactive
|
|
114
|
-
```
|
|
46
|
+
| Command | Description |
|
|
47
|
+
|---------|-------------|
|
|
48
|
+
| `vibecheck init` | Project setup wizard |
|
|
49
|
+
| `vibecheck install` | Zero-friction onboarding |
|
|
50
|
+
| `vibecheck doctor` | Environment diagnostics |
|
|
51
|
+
| `vibecheck status` | Project health dashboard |
|
|
52
|
+
| `vibecheck watch` | Continuous mode |
|
|
115
53
|
|
|
116
|
-
###
|
|
54
|
+
### Truth System (AI Guardrails)
|
|
117
55
|
|
|
118
|
-
|
|
|
119
|
-
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
|
124
|
-
| `--hook-runner <runner>` | Specify hook runner: `husky` or `lefthook` |
|
|
125
|
-
| `--no-interactive` | Disable interactive prompts |
|
|
56
|
+
| Command | Description |
|
|
57
|
+
|---------|-------------|
|
|
58
|
+
| `vibecheck ctx` | Generate truthpack for AI agents |
|
|
59
|
+
| `vibecheck guard` | Validate AI claims against truth |
|
|
60
|
+
| `vibecheck context` | Generate .cursorrules, .windsurf/rules |
|
|
61
|
+
| `vibecheck mdc` | Generate MDC specifications |
|
|
126
62
|
|
|
127
|
-
###
|
|
63
|
+
### CI/CD & Extras
|
|
128
64
|
|
|
129
|
-
|
|
65
|
+
| Command | Description |
|
|
66
|
+
|---------|-------------|
|
|
67
|
+
| `vibecheck gate` | CI/CD gate (Starter) |
|
|
68
|
+
| `vibecheck pr` | Generate PR comment |
|
|
69
|
+
| `vibecheck badge` | Generate README badge |
|
|
70
|
+
| `vibecheck mcp` | Start MCP server for AI IDEs |
|
|
130
71
|
|
|
131
|
-
|
|
132
|
-
|-----------|-------------------|
|
|
133
|
-
| **Next.js** | `next` dependency, `next.config.*`, `app/` or `pages/` directory |
|
|
134
|
-
| **Express** | `express` dependency, `src/server.*` patterns, `routes/` directory |
|
|
135
|
-
| **NestJS** | `@nestjs/core` dependency, `nest-cli.json`, `*.module.ts` files |
|
|
136
|
-
| **Fastify** | `fastify` dependency, `@fastify/*` packages |
|
|
137
|
-
| **Remix** | `@remix-run/*` packages, `remix.config.*`, `app/routes/` |
|
|
138
|
-
| **Vite+React** | `vite` + `react` dependencies, `@vitejs/plugin-react` |
|
|
72
|
+
## What It Catches
|
|
139
73
|
|
|
140
|
-
|
|
74
|
+
- **Dead Routes** - Client calls API that doesn't exist โ BLOCK
|
|
75
|
+
- **Ghost Auth** - Sensitive endpoint without auth โ BLOCK
|
|
76
|
+
- **Exposed Secrets** - API keys in code โ BLOCK
|
|
77
|
+
- **Fake Success** - Success UI without API confirmation โ BLOCK
|
|
78
|
+
- **Env Gaps** - Used env vars not in .env.example โ WARN
|
|
79
|
+
- **Stripe Violations** - Unverified webhooks โ BLOCK
|
|
80
|
+
- **Owner Mode Bypass** - Debug flags in production โ BLOCK
|
|
141
81
|
|
|
142
|
-
|
|
143
|
-
- **Express/NestJS/Fastify**: secrets, vulnerabilities, ship readiness, compliance (logging/rate limits)
|
|
144
|
-
- **Vite+React**: secrets, vulnerabilities, ship readiness
|
|
82
|
+
## Ship Verdict
|
|
145
83
|
|
|
146
|
-
### Templates
|
|
147
|
-
|
|
148
|
-
Templates configure `.vibecheck/config.json` with different defaults:
|
|
149
|
-
|
|
150
|
-
#### Startup Template
|
|
151
|
-
- **Use case**: Early-stage teams, fast iteration
|
|
152
|
-
- **Scan thresholds**: High (fewer alerts)
|
|
153
|
-
- **Compliance**: Disabled
|
|
154
|
-
- **Gating**: Block on critical only
|
|
155
|
-
- **Output**: Table format
|
|
156
|
-
- **Noise reduction**: Suppress test files, low-confidence findings
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
vibecheck init --template startup
|
|
160
84
|
```
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
- **Scan thresholds**: Low (catch everything)
|
|
165
|
-
- **Compliance**: Enabled (SOC2 by default)
|
|
166
|
-
- **Gating**: Block on critical and high, baseline/allowlist enabled
|
|
167
|
-
- **Output**: SARIF format with upload
|
|
168
|
-
- **SBOM**: Enabled
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
vibecheck init --template enterprise
|
|
85
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
86
|
+
โ ๐ข SHIP IT! Your code is production-ready. โ
|
|
87
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
172
88
|
```
|
|
173
89
|
|
|
174
|
-
|
|
175
|
-
- **Use case**: Open source projects, contributor-friendly
|
|
176
|
-
- **Focus**: Supply chain security (SBOM, vulnerabilities)
|
|
177
|
-
- **Gating**: Permissive, baseline/allowlist enabled
|
|
178
|
-
- **Output**: Markdown format (PR-friendly)
|
|
179
|
-
- **Noise reduction**: Suppress test files, examples
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
vibecheck init --template oss
|
|
183
|
-
```
|
|
90
|
+
Exit codes: `0` = SHIP, `1` = WARN, `2` = BLOCK
|
|
184
91
|
|
|
185
|
-
|
|
92
|
+
## MCP Server
|
|
186
93
|
|
|
187
|
-
|
|
94
|
+
Connect vibecheck to AI coding agents (Cursor, Windsurf, Claude):
|
|
188
95
|
|
|
189
96
|
```json
|
|
190
97
|
{
|
|
191
|
-
"
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
"vulnerabilities": { "enabled": true, "threshold": "medium" },
|
|
197
|
-
"compliance": { "enabled": true, "frameworks": ["soc2"] },
|
|
198
|
-
"sbom": { "enabled": true }
|
|
199
|
-
},
|
|
200
|
-
"gating": {
|
|
201
|
-
"enabled": true,
|
|
202
|
-
"blockOnCritical": true,
|
|
203
|
-
"blockOnHigh": true,
|
|
204
|
-
"baselineEnabled": true,
|
|
205
|
-
"allowlistEnabled": true
|
|
206
|
-
},
|
|
207
|
-
"output": {
|
|
208
|
-
"format": "sarif",
|
|
209
|
-
"sarifUpload": true,
|
|
210
|
-
"badgeGeneration": true
|
|
98
|
+
"mcpServers": {
|
|
99
|
+
"vibecheck": {
|
|
100
|
+
"command": "npx",
|
|
101
|
+
"args": ["@vibecheckai/cli", "mcp"]
|
|
102
|
+
}
|
|
211
103
|
}
|
|
212
104
|
}
|
|
213
105
|
```
|
|
214
106
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
When using `--ci`, generates a GitHub Actions workflow that:
|
|
218
|
-
- Runs secrets and vulnerability scans
|
|
219
|
-
- Runs compliance checks (if enabled)
|
|
220
|
-
- Generates SBOM (if enabled)
|
|
221
|
-
- Uploads SARIF results to GitHub Security tab
|
|
222
|
-
- Runs ship readiness check
|
|
223
|
-
- Fails the workflow on critical/high findings
|
|
224
|
-
|
|
225
|
-
**Required**: Add `VIBECHECK_API_KEY` to your repository secrets.
|
|
107
|
+
## Configuration
|
|
226
108
|
|
|
227
|
-
|
|
109
|
+
Create `.vibecheck/config.json`:
|
|
228
110
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
# Next.js project with enterprise security
|
|
237
|
-
vibecheck init --template enterprise --ci --hooks
|
|
238
|
-
|
|
239
|
-
# Express API with startup defaults
|
|
240
|
-
vibecheck init --path ./api --template startup
|
|
241
|
-
|
|
242
|
-
# OSS project with lefthook
|
|
243
|
-
vibecheck init --template oss --hooks --hook-runner lefthook
|
|
244
|
-
|
|
245
|
-
# CI-only setup (no hooks)
|
|
246
|
-
vibecheck init --template enterprise --ci --no-interactive
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
## Vulnerability Scanning (OSV Integration)
|
|
250
|
-
|
|
251
|
-
The `scan:vulnerabilities` command uses real-time data from the [Open Source Vulnerabilities (OSV)](https://osv.dev) database.
|
|
252
|
-
|
|
253
|
-
### Features
|
|
254
|
-
|
|
255
|
-
- **Real-time OSV API queries** - Live vulnerability data from Google's OSV database
|
|
256
|
-
- **Multi-ecosystem support** - npm, PyPI, RubyGems, Go
|
|
257
|
-
- **Lockfile parsing** - package-lock.json, pnpm-lock.yaml, yarn.lock
|
|
258
|
-
- **24-hour caching** - Reduces API calls with local cache in `.vibecheck/cache/osv.json`
|
|
259
|
-
- **CVSS scoring** - Severity levels with optional NVD enrichment
|
|
260
|
-
- **Remediation paths** - Upgrade suggestions with breaking change detection
|
|
261
|
-
- **SARIF output** - GitHub code scanning integration
|
|
262
|
-
|
|
263
|
-
### Usage
|
|
264
|
-
|
|
265
|
-
```bash
|
|
266
|
-
# Basic vulnerability scan
|
|
267
|
-
vibecheck scan:vulnerabilities --path ./my-project
|
|
268
|
-
|
|
269
|
-
# Bypass cache for fresh data
|
|
270
|
-
vibecheck scan:vulnerabilities --no-cache
|
|
271
|
-
|
|
272
|
-
# Enable NVD enrichment for CVSS scores (slower)
|
|
273
|
-
vibecheck scan:vulnerabilities --nvd
|
|
274
|
-
|
|
275
|
-
# Output as SARIF for GitHub code scanning
|
|
276
|
-
vibecheck scan:vulnerabilities --format sarif -o results.sarif
|
|
277
|
-
|
|
278
|
-
# Filter by ecosystem
|
|
279
|
-
vibecheck scan:vulnerabilities --ecosystem npm
|
|
280
|
-
|
|
281
|
-
# Fail CI if critical vulnerabilities found
|
|
282
|
-
vibecheck scan:vulnerabilities --fail-on-critical
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
### Options
|
|
286
|
-
|
|
287
|
-
| Option | Description |
|
|
288
|
-
|--------|-------------|
|
|
289
|
-
| `-p, --path <path>` | Project path to scan (default: `.`) |
|
|
290
|
-
| `-f, --format <format>` | Output format: `table`, `json`, `sarif` (default: `table`) |
|
|
291
|
-
| `-o, --output <file>` | Write report to file |
|
|
292
|
-
| `--no-cache` | Bypass 24h cache, fetch fresh data from OSV |
|
|
293
|
-
| `--nvd` | Enable NVD enrichment for CVSS scores (slower) |
|
|
294
|
-
| `--fail-on-critical` | Exit with error if critical vulnerabilities found |
|
|
295
|
-
| `--fail-on-high` | Exit with error if high+ vulnerabilities found |
|
|
296
|
-
| `--ecosystem <eco>` | Filter by ecosystem: `npm`, `PyPI`, `RubyGems`, `Go` |
|
|
297
|
-
|
|
298
|
-
### Cache Management
|
|
299
|
-
|
|
300
|
-
Vulnerability data is cached for 24 hours in `.vibecheck/cache/osv.json`.
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
# View cache statistics
|
|
304
|
-
vibecheck cache:status
|
|
305
|
-
|
|
306
|
-
# Clear the cache
|
|
307
|
-
vibecheck cache:clear
|
|
308
|
-
|
|
309
|
-
# Clear global cache
|
|
310
|
-
vibecheck cache:clear --global
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
### SARIF Output for GitHub
|
|
314
|
-
|
|
315
|
-
Generate SARIF v2.1.0 output for GitHub code scanning:
|
|
316
|
-
|
|
317
|
-
```bash
|
|
318
|
-
# Generate SARIF report
|
|
319
|
-
vibecheck scan:vulnerabilities --format sarif -o vuln-results.sarif
|
|
320
|
-
|
|
321
|
-
# In GitHub Actions workflow:
|
|
322
|
-
- name: Run vibecheck Vulnerability Scan
|
|
323
|
-
run: vibecheck scan:vulnerabilities --format sarif -o results.sarif
|
|
324
|
-
|
|
325
|
-
- name: Upload SARIF to GitHub
|
|
326
|
-
uses: github/codeql-action/upload-sarif@v2
|
|
327
|
-
with:
|
|
328
|
-
sarif_file: results.sarif
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
The SARIF output includes:
|
|
332
|
-
- Rule metadata with CVE/GHSA IDs
|
|
333
|
-
- CVSS scores and vectors
|
|
334
|
-
- Remediation suggestions
|
|
335
|
-
- Package.json line locations
|
|
336
|
-
- Direct vs transitive classification
|
|
337
|
-
|
|
338
|
-
### Consistent Command Headers
|
|
339
|
-
|
|
340
|
-
All analysis commands (`scan`, `ship`, `smells`, etc.) display a consistent framed header with:
|
|
341
|
-
- **Title**: Command name with icon
|
|
342
|
-
- **Project**: Project name from directory
|
|
343
|
-
- **Path**: Project path (truncated for long paths)
|
|
344
|
-
- **Started**: Timestamp when command started
|
|
345
|
-
- **Mode**: Tier badge when authenticated (FREE/STARTER/PRO/ENTERPRISE)
|
|
346
|
-
- **Metadata**: Command-specific options (e.g., scan type, severity filter)
|
|
347
|
-
|
|
348
|
-
The header respects `NO_COLOR` environment variable and `--no-color` flag for CI/accessibility.
|
|
349
|
-
|
|
350
|
-
## Tiers
|
|
351
|
-
|
|
352
|
-
- **Free**: Basic scanning and validation
|
|
353
|
-
- **Starter** ($29/mo): Ship checks, reality mode, fix suggestions
|
|
354
|
-
- **Pro** ($99/mo): Advanced analysis, autopilot, smells detection, compliance
|
|
355
|
-
- **Enterprise** ($499/mo): Custom policies, SSO, dedicated support
|
|
356
|
-
|
|
357
|
-
## Environment Variables
|
|
358
|
-
|
|
359
|
-
| Variable | Description |
|
|
360
|
-
|----------|-------------|
|
|
361
|
-
| `VIBECHECK_API_BASE_URL` | Override API endpoint (default: `https://api.vibecheckai.dev`) |
|
|
362
|
-
| `VIBECHECK_NO_INTERACTIVE` | Disable interactive prompts (`1` to disable) |
|
|
363
|
-
| `VIBECHECK_NO_UNICODE` | Disable Unicode output (`1` for ASCII-only) |
|
|
364
|
-
|
|
365
|
-
## Reality Mode
|
|
366
|
-
|
|
367
|
-
Reality Mode detects fake data, mock backends, and placeholder content in your running application using Playwright browser automation.
|
|
368
|
-
|
|
369
|
-
### Generate Only (default)
|
|
370
|
-
|
|
371
|
-
```bash
|
|
372
|
-
# Generate a Playwright test for the auth flow
|
|
373
|
-
vibecheck reality --flow auth
|
|
374
|
-
|
|
375
|
-
# Generate test for a custom URL
|
|
376
|
-
vibecheck reality --url http://localhost:8080 --flow checkout
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
### Generate + Run
|
|
380
|
-
|
|
381
|
-
```bash
|
|
382
|
-
# Generate and immediately execute the test
|
|
383
|
-
vibecheck reality --run --flow auth
|
|
384
|
-
|
|
385
|
-
# Run in headed mode (show browser)
|
|
386
|
-
vibecheck reality --run --flow auth --headless=false
|
|
387
|
-
|
|
388
|
-
# Custom timeout and workers
|
|
389
|
-
vibecheck reality --run --timeout 60 --workers 2
|
|
390
|
-
|
|
391
|
-
# Use HTML reporter for detailed results
|
|
392
|
-
vibecheck reality --run --reporter html,list
|
|
393
|
-
|
|
394
|
-
# Full configuration example
|
|
395
|
-
vibecheck reality --run \
|
|
396
|
-
--url http://localhost:8080 \
|
|
397
|
-
--flow checkout \
|
|
398
|
-
--timeout 45 \
|
|
399
|
-
--workers 4 \
|
|
400
|
-
--reporter html,json \
|
|
401
|
-
--trace retain-on-failure \
|
|
402
|
-
--video retain-on-failure \
|
|
403
|
-
--screenshot only-on-failure
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
**Exit Code**: Mirrors Playwright's exit code (0 = pass, non-zero = fail)
|
|
407
|
-
|
|
408
|
-
#### 3. Record Mode
|
|
409
|
-
|
|
410
|
-
Opens Playwright in interactive recording mode using `codegen` to capture user actions.
|
|
411
|
-
|
|
412
|
-
```bash
|
|
413
|
-
# Start recording session
|
|
414
|
-
vibecheck reality --record --url http://localhost:3000
|
|
415
|
-
|
|
416
|
-
# Record with custom flow name
|
|
417
|
-
vibecheck reality --record --url http://localhost:8080 --flow signup
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
**How it works**:
|
|
421
|
-
1. Opens browser with Playwright Inspector
|
|
422
|
-
2. Interact with your app (click, type, navigate)
|
|
423
|
-
3. Playwright records all actions with robust selectors
|
|
424
|
-
4. Generated test saved to `.vibecheck/reality/<runId>/reality-<flow>.test.ts`
|
|
425
|
-
5. Press Ctrl+C when done
|
|
426
|
-
|
|
427
|
-
### Options
|
|
428
|
-
|
|
429
|
-
| Flag | Description | Default |
|
|
430
|
-
|------|-------------|---------|
|
|
431
|
-
| `-p, --path <path>` | Project path | `.` |
|
|
432
|
-
| `-u, --url <url>` | Base URL of running app | `http://localhost:3000` |
|
|
433
|
-
| `-f, --flow <flow>` | Flow to test: auth, checkout, dashboard | `auth` |
|
|
434
|
-
| `-t, --timeout <seconds>` | Test timeout in seconds | `30` |
|
|
435
|
-
| `--headless` | Run in headless mode | `false` |
|
|
436
|
-
| `--run` | Execute the generated test immediately | `false` |
|
|
437
|
-
| `--record` | Open Playwright codegen for recording | `false` |
|
|
438
|
-
| `--workers <n>` | Number of parallel workers | `1` |
|
|
439
|
-
| `--reporter <type>` | Test reporter: list, dot, html, json | `list` |
|
|
440
|
-
| `--trace <mode>` | Trace mode: on, off, retain-on-failure, on-first-retry | `retain-on-failure` |
|
|
441
|
-
| `--video <mode>` | Video mode: on, off, retain-on-failure, on-first-retry | `retain-on-failure` |
|
|
442
|
-
| `--screenshot <mode>` | Screenshot mode: on, off, only-on-failure | `only-on-failure` |
|
|
443
|
-
|
|
444
|
-
### Artifacts
|
|
445
|
-
|
|
446
|
-
When using `--run`, artifacts are saved under `.vibecheck/reality/<runId>/`:
|
|
447
|
-
|
|
448
|
-
```
|
|
449
|
-
.vibecheck/reality/auth-1704123456789-a1b2c3d4/
|
|
450
|
-
โโโ reality-auth.test.ts # Generated test file
|
|
451
|
-
โโโ output.log # Playwright console output
|
|
452
|
-
โโโ result.json # Run result summary (success, exitCode, duration)
|
|
453
|
-
โโโ run-metadata.json # Execution configuration
|
|
454
|
-
โโโ screenshots/ # Failure screenshots (if --screenshot enabled)
|
|
455
|
-
โ โโโ test-failed-1.png
|
|
456
|
-
โ โโโ test-failed-2.png
|
|
457
|
-
โโโ report/ # HTML report (if --reporter html)
|
|
458
|
-
โโโ index.html
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
### Viewing Results
|
|
462
|
-
|
|
463
|
-
**HTML Report** (if `--reporter html`):
|
|
464
|
-
```bash
|
|
465
|
-
npx playwright show-report .vibecheck/reality/<runId>/report
|
|
466
|
-
```
|
|
467
|
-
|
|
468
|
-
**JSON Results**:
|
|
469
|
-
```bash
|
|
470
|
-
cat .vibecheck/reality/<runId>/result.json
|
|
471
|
-
```
|
|
472
|
-
|
|
473
|
-
**Logs**:
|
|
474
|
-
```bash
|
|
475
|
-
cat .vibecheck/reality/<runId>/output.log
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
### Prerequisites
|
|
479
|
-
|
|
480
|
-
Reality Mode requires Playwright and browser binaries.
|
|
481
|
-
|
|
482
|
-
**Install Playwright**:
|
|
483
|
-
```bash
|
|
484
|
-
npm install -D @playwright/test
|
|
485
|
-
npx playwright install
|
|
486
|
-
```
|
|
487
|
-
|
|
488
|
-
The CLI automatically detects missing dependencies and provides exact install commands with exit code 2.
|
|
489
|
-
|
|
490
|
-
### Exit Codes
|
|
491
|
-
|
|
492
|
-
| Code | Meaning |
|
|
493
|
-
|------|---------|
|
|
494
|
-
| 0 | Tests passed |
|
|
495
|
-
| 1 | Tests failed |
|
|
496
|
-
| 2 | Playwright or browsers not installed |
|
|
497
|
-
|
|
498
|
-
### Examples
|
|
499
|
-
|
|
500
|
-
**Quick test in CI**:
|
|
501
|
-
```bash
|
|
502
|
-
vibecheck reality --run --flow auth --headless --timeout 30
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
**Debug with full visibility**:
|
|
506
|
-
```bash
|
|
507
|
-
vibecheck reality --run --flow checkout \
|
|
508
|
-
--no-headless \
|
|
509
|
-
--trace on \
|
|
510
|
-
--video on \
|
|
511
|
-
--screenshot on
|
|
512
|
-
```
|
|
513
|
-
|
|
514
|
-
**Record custom flow**:
|
|
515
|
-
```bash
|
|
516
|
-
vibecheck reality --record --url http://localhost:3000 --flow onboarding
|
|
517
|
-
```
|
|
518
|
-
|
|
519
|
-
**Parallel execution**:
|
|
520
|
-
```bash
|
|
521
|
-
vibecheck reality --run --workers 4 --reporter html,json
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"strict": false,
|
|
114
|
+
"fastifyEntry": "src/server.ts",
|
|
115
|
+
"exclude": ["**/test/**", "**/*.spec.ts"]
|
|
116
|
+
}
|
|
522
117
|
```
|
|
523
118
|
|
|
524
|
-
##
|
|
119
|
+
## License
|
|
525
120
|
|
|
526
|
-
|
|
527
|
-
- [Discord](https://discord.gg/vibecheck)
|
|
528
|
-
- [Support](mailto:support@vibecheckai.dev)
|
|
121
|
+
MIT ยฉ Vibecheck AI
|
|
529
122
|
|
|
530
|
-
|
|
123
|
+
---
|
|
531
124
|
|
|
532
|
-
|
|
125
|
+
**[Documentation](https://vibecheckai.dev/docs)** ยท **[Discord](https://discord.gg/vibecheck)** ยท **[GitHub](https://github.com/vibecheck-Official/vibecheck)**
|
package/bin/runners/cli-utils.js
CHANGED
|
@@ -38,12 +38,12 @@ const c = {
|
|
|
38
38
|
|
|
39
39
|
// ASCII Art Banner
|
|
40
40
|
const BANNER = `
|
|
41
|
-
${c.brightCyan}
|
|
42
|
-
|
|
43
|
-
โโโ
|
|
44
|
-
โโโ
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
${c.brightCyan} โโโ โโโโโโโโโโโโโ โโโโโโโโ โโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโ โโโ
|
|
42
|
+
โโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โโโโ
|
|
43
|
+
โโโ โโโโโโโโโโโโโโโโโโโโ โโโ โโโโโโโโโโโโโโ โโโ โโโโโโโ
|
|
44
|
+
โโโโ โโโโโโโโโโโโโโโโโโโโโ โโโ โโโโโโโโโโโโโโ โโโ โโโโโโโ
|
|
45
|
+
โโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ โโโ
|
|
46
|
+
โโโโโ โโโโโโโโโโ โโโโโโโโ โโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโ โโโ${c.reset}
|
|
47
47
|
${c.dim} AI-Native Code Security Platform${c.reset}
|
|
48
48
|
`;
|
|
49
49
|
|