@viberaven/cli 1.6.4 → 1.6.6

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 (3) hide show
  1. package/README.md +34 -80
  2. package/dist/cli.js +18 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,113 +1,67 @@
1
1
  # @viberaven/cli
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@viberaven/cli)](https://www.npmjs.com/package/@viberaven/cli)
4
- [![npm downloads](https://img.shields.io/npm/dw/@viberaven/cli)](https://www.npmjs.com/package/@viberaven/cli)
5
- [![license](https://img.shields.io/npm/l/@viberaven/cli)](https://www.npmjs.com/package/@viberaven/cli)
3
+ A successful deploy does not show whether one user can read another user's rows. VibeRaven reads an AI-built Vercel + Supabase app's repository for missing row level security (RLS), permissive policies and other launch gaps, then writes findings and tasks a coding agent can work through.
6
4
 
7
- <p align="center">
8
- <img src="https://raw.githubusercontent.com/ohad6k/VibeRaven/main/assets/banner.png" alt="VibeRaven — AI got your app to demo. VibeRaven gets it to production." width="100%" />
9
- </p>
5
+ Use a pass before launch or client handoff, after a migration or policy change, or when investigating a production RLS, environment, database connection, service-role or Stripe webhook failure.
10
6
 
11
- VibeRaven is **the Card Table** — a local Studio where your AI-built app is laid out in front of you. Every provider (Supabase, Vercel, Stripe, ...) is a graded trading card in your hand: play a card and its production checks run instantly in chat; a **RAVEN GRADE 10** means that territory is production-ready. Versions are a pile you can pull from, your whole architecture is a region map of cards, and Codex, Claude Code, or Gemini CLI does the actual work — with you controlling how much it's allowed to touch.
7
+ ## Start From Your App
12
8
 
13
- ## Start the Studio
9
+ Requires Node.js 20 or newer. Run from the app's project root:
14
10
 
15
11
  ```bash
16
- npx -y viberaven
17
- ```
18
-
19
- That command opens the table:
20
-
21
- - **Your hand** — providers as foil cards; click or drop one on the table and its launch checks run in chat, graded 1-10 from repo evidence.
22
- - **The version pile** — pull a release card to see what changed (real git compare + changelog), view the diff, or ask the agent to explain it.
23
- - **The region map** — your app as territory: pages, modules, and provider cards connected by routes, every card movable.
24
- - **Agentic chat** — missions run through your connected CLI, with `ask` / `approve` / `full` access modes and inline approve for risky work.
25
- - Provider MCP visibility, terminal, and diff views included.
26
-
27
- The unscoped `viberaven` package is a small shim that launches this CLI package.
28
-
29
- ## Agent Connections
30
-
31
- Inside the Studio, connect an installed CLI and test it before chat control:
12
+ # Open the local Studio
13
+ npx -y viberaven@1.6.6
32
14
 
33
- - Codex CLI
34
- - Claude Code
35
- - Gemini CLI
36
-
37
- Installed is not the same as connected. VibeRaven asks the selected CLI to prove it can run in the current repo before using it for real chat work.
38
-
39
- ## Provider And Release Context
15
+ # Fresh terminal check
16
+ npx -y viberaven@1.6.6 check
17
+ ```
40
18
 
41
- Use the Studio side tabs and context chips to attach provider or version context to a chat mission:
19
+ The `viberaven` package launches this CLI. Studio combines findings, provider context and git comparisons. For chat, select an installed/authenticated Codex CLI, Claude Code or Gemini CLI and use **Test connection**. Access modes: `ask`, `approve`, `full`. Stop Studio with Ctrl+C.
42
20
 
43
- - Providers: Supabase, Vercel, GitHub, Stripe, Sentry, PostHog, Clerk, Auth.js, Resend, Upstash.
44
- - Releases: current and recent git tags, changelog snippets, rollback context, and release comparisons.
45
- - Architecture: repo and provider boundaries for inspection and planning.
21
+ ## Repository Evidence And Tasks
46
22
 
47
- Provider dashboard checks are not cleared by repo-code edits. Billing/product configuration, DNS, webhooks, credentials, quotas, and live provider verification must still be completed or verified in the provider dashboard or through read-only provider evidence.
23
+ Checks include migration tables without RLS, unrestricted policy conditions such as `USING (true)`, browser-exposed service-role keys, environment names missing from `.env.example` or similar templates, and Stripe handlers without raw-body signature verification.
48
24
 
49
- ## Machine And CI Commands
25
+ `check` refreshes `.viberaven/agent-tasklist.md` (tasks and source locations), `gate-result.json` (full verdict), `context-map.json` (agent context) and `gaps/<gapId>.json` without patching app source.
50
26
 
51
- The Studio is the default product surface. These commands remain available for automation and CI:
27
+ `check --json` prints a findings summary and artifact paths. `--json` without `check` runs a fresh scan and prints the full gate object.
52
28
 
53
29
  ```bash
54
- npx -y viberaven check --json
55
- npx -y viberaven --strict --json
56
- npx -y viberaven actions
57
- npx -y viberaven --verify --action VR-A1
30
+ npx -y viberaven@1.6.6 check --json
31
+ npx -y viberaven@1.6.6 audit --vercel-supabase --json
32
+ npx -y viberaven@1.6.6 fix --gap <gapId> --dry-run
33
+ npx -y viberaven@1.6.6 init --agents all --dry-run
58
34
  ```
59
35
 
60
- For focused work:
61
-
62
- ```bash
63
- npx -y viberaven next --json
64
- npx -y viberaven prompt --gap <id>
65
- npx -y viberaven audit --vercel-supabase
66
- ```
36
+ Read tasks and source before targeted edits. Preview fixes first. The `rls_disabled` recipe adds an RLS migration without policies: agree before applying, because browser roles lose row access until policies exist. Apply/test through your database workflow; recheck after a batch. Provider actions require provider evidence.
67
37
 
68
- ## Legacy Agent Mode
38
+ ## Exit Codes And CI
69
39
 
70
- `--agent-mode` is kept for older artifact-first agent workflows:
40
+ `check` returns 0 with no critical blockers, allowing warnings; 1 for critical blockers; 2 for a scan or comparison error. Unrestricted SELECT can be intentional public content and is a default warning. The focused audit returns 1 whenever its status is not `pass`, including warnings.
71
41
 
72
42
  ```bash
73
- npx -y viberaven --agent-mode
43
+ # Fail on blockers
44
+ npx -y viberaven@1.6.6 --strict --json
45
+ # Also fail on warnings
46
+ npx -y viberaven@1.6.6 --strict=warning --json
74
47
  ```
75
48
 
76
- It writes artifacts such as:
77
-
78
- - `.viberaven/agent-tasklist.md`
79
- - `.viberaven/gate-result.json`
80
- - `.viberaven/context-map.json`
81
- - `.viberaven/agent-summary.md`
82
- - `.viberaven/launch-playbook.md`
49
+ Default `--strict` returns 0 for `clear`/`warning`, 1 for `not_clear`, 2 for `error`, 3 for `unknown` or unavailable results. `--strict=warning` also returns 1 for warnings.
83
50
 
84
- New product work should prefer the Studio and MCP/chat context flow instead of the old tasklist-first loop.
51
+ ## Optional Artifact Compatibility Mode
85
52
 
86
- ## MCP
87
-
88
- Use the MCP package when an agent host supports MCP tools:
53
+ Older integrations can keep the canonical artifact command:
89
54
 
90
55
  ```bash
91
- npx -y @viberaven/mcp
56
+ npx -y viberaven --agent-mode
92
57
  ```
93
58
 
94
- The MCP server wraps the public CLI and exposes readiness, verification, action, audit, and healing tools without exposing secrets.
59
+ Studio remains the default. MCP hosts use the separate [`@viberaven/mcp`](https://www.npmjs.com/package/@viberaven/mcp) package.
95
60
 
96
- ## Development
61
+ ## Scope And Evidence
97
62
 
98
- ```bash
99
- npm --prefix packages/cli run typecheck
100
- npm --prefix packages/cli test -- local-ui/server.test.ts
101
- npm --prefix packages/cli run build
102
- ```
103
-
104
- For a local package publish check, run from this package directory:
105
-
106
- ```bash
107
- cd packages/cli
108
- npm pack --dry-run
109
- ```
63
+ The scan needs no VibeRaven login or API key; npm downloads can need network. It does not query live policies, prove complete permission coverage, run your build or deploy. With RLS off, table grants determine which roles and operations can reach rows. Verify live user access and provider environment, DNS, billing and webhooks separately. A clear result or score is not a security audit.
110
64
 
111
- ## License
65
+ The [missing-RLS example](https://ohad6k.github.io/VibeRaven/examples/proof/missing-rls/) and [RLS comparison](https://ohad6k.github.io/VibeRaven/examples/proof/rls-comparison/) retain published **1.6.3** runs. They are maintainer-authored, not new scans or independent endorsement. Comparison databases are local, not hosted Supabase.
112
66
 
113
- MIT
67
+ [Public repository](https://github.com/ohad6k/VibeRaven) | [Agent reference](https://ohad6k.github.io/VibeRaven/llms.txt). License: MIT.
package/dist/cli.js CHANGED
@@ -10797,13 +10797,17 @@ function buildGapSeeds(scan, audit, databaseEvidence, extra = {}) {
10797
10797
  );
10798
10798
  const apiRoutes = hasApiRoutes(scan);
10799
10799
  if (scan.secretsFound.length > 0) {
10800
+ const privateLikePaths = scan.secretsFound.filter(
10801
+ (path) => !AMBIGUOUS_CONFIGURATION_BASENAMES.has(import_node_path7.posix.basename(path.replace(/\\/g, "/")).toLowerCase())
10802
+ );
10803
+ const ambiguousOnly = privateLikePaths.length === 0;
10800
10804
  seeds.push({
10801
10805
  id: "secrets_in_repo",
10802
10806
  category: "SECURITY & AUTH",
10803
- severity: "critical",
10804
- title: "Secret files are not gitignored",
10805
- detail: `Files that normally hold live credentials are not covered by .gitignore (${scan.secretsFound.slice(0, 5).join(", ")}). One \`git add .\` away from leaking keys into history.`,
10806
- copyPrompt: "Add the listed secret files (.env and friends) to .gitignore, verify none of them are already tracked with `git ls-files`, and if any were ever committed, rotate those credentials with the provider and scrub git history.",
10807
+ severity: ambiguousOnly ? "warning" : "critical",
10808
+ title: ambiguousOnly ? "Configuration filenames need review" : "Private-credential-like filenames need review",
10809
+ detail: `This filename-only check found files not covered by .gitignore (${scan.secretsFound.slice(0, 5).join(", ")}). Contents and Git tracking were not checked by this finding. ${ambiguousOnly ? "Base configuration may be intentionally tracked; credential content remains unverified." : `Private-credential-like filenames requiring review: ${privateLikePaths.slice(0, 5).join(", ")}. Credential content remains unverified.`}`,
10810
+ copyPrompt: "Review the listed files locally without pasting their values. Keep intentionally tracked public/base configuration when appropriate, and ignore private overrides after review. Check for actual private credentials and their Git tracking/history locally (`git ls-files` checks tracking). Only if actual private credentials were committed or otherwise exposed, rotate them with the provider and review Git history cleanup.",
10807
10811
  primaryMapCategory: "security"
10808
10812
  });
10809
10813
  }
@@ -11185,7 +11189,7 @@ async function buildLocalStationOutput(input) {
11185
11189
  productionChecklist: checklistFrom(seeds)
11186
11190
  };
11187
11191
  }
11188
- var import_node_child_process3, import_node_util3, import_promises6, import_node_path7, execFileAsync3, ENV_DRIFT_IGNORE, ENV_DRIFT_IGNORE_PREFIX, SUPABASE_EDGE_ENV, ENV_TEMPLATE_NAME, ENV_CODE_FILE, ENV_NAME, ENV_REFERENCES, SVELTEKIT_STATIC_IMPORT, SVELTEKIT_DYNAMIC_IMPORT, ENV_DESTRUCTURE, CODE_FILE, STRIPE_VERIFY_CALL, STRIPE_VERIFY_JSON_BODY, STRIPE_SIGNATURE_HEADER, RAW_BODY, STRIPE_EVENT_TYPE, REQUEST_HANDLER, TEST_FILE, STRIPE_CODE_USE, STRIPE_EDGE_WEBHOOK_PROMPT, AUDIT_FINDING_GAPS, FINDING_SEVERITY_RANK, DETAIL_MAX_FINDINGS, SEVERITY_ORDER, FULL_READ_LIMITS, PAYMENT_PATH;
11192
+ var import_node_child_process3, import_node_util3, import_promises6, import_node_path7, execFileAsync3, ENV_DRIFT_IGNORE, ENV_DRIFT_IGNORE_PREFIX, SUPABASE_EDGE_ENV, ENV_TEMPLATE_NAME, ENV_CODE_FILE, ENV_NAME, ENV_REFERENCES, SVELTEKIT_STATIC_IMPORT, SVELTEKIT_DYNAMIC_IMPORT, ENV_DESTRUCTURE, CODE_FILE, STRIPE_VERIFY_CALL, STRIPE_VERIFY_JSON_BODY, STRIPE_SIGNATURE_HEADER, RAW_BODY, STRIPE_EVENT_TYPE, REQUEST_HANDLER, TEST_FILE, STRIPE_CODE_USE, STRIPE_EDGE_WEBHOOK_PROMPT, AUDIT_FINDING_GAPS, FINDING_SEVERITY_RANK, DETAIL_MAX_FINDINGS, SEVERITY_ORDER, AMBIGUOUS_CONFIGURATION_BASENAMES, FULL_READ_LIMITS, PAYMENT_PATH;
11189
11193
  var init_localStation = __esm({
11190
11194
  "src/localStation.ts"() {
11191
11195
  "use strict";
@@ -11332,6 +11336,14 @@ var init_localStation = __esm({
11332
11336
  FINDING_SEVERITY_RANK = { critical: 0, high: 1, warning: 2, info: 3 };
11333
11337
  DETAIL_MAX_FINDINGS = 10;
11334
11338
  SEVERITY_ORDER = { critical: 0, warning: 1, info: 2 };
11339
+ AMBIGUOUS_CONFIGURATION_BASENAMES = /* @__PURE__ */ new Set([
11340
+ ".env",
11341
+ ".env.development",
11342
+ ".env.production",
11343
+ ".env.test",
11344
+ ".npmrc",
11345
+ "npmrc"
11346
+ ]);
11335
11347
  FULL_READ_LIMITS = { files: 40, bytes: 512e3 };
11336
11348
  PAYMENT_PATH = /webhook|stripe|payment|billing|checkout/i;
11337
11349
  }
@@ -15023,7 +15035,7 @@ var VERSION;
15023
15035
  var init_version = __esm({
15024
15036
  "src/version.ts"() {
15025
15037
  "use strict";
15026
- VERSION = "1.6.4";
15038
+ VERSION = "1.6.6";
15027
15039
  }
15028
15040
  });
15029
15041
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viberaven/cli",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "description": "VibeRaven CLI and local Studio: Supabase RLS and security check for AI-built Vercel + Supabase apps, with an agent task list and fix prompts.",
5
5
  "license": "MIT",
6
6
  "author": "VibeRaven",