@nerviq/cli 1.9.0 → 1.11.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 +106 -60
- package/bin/cli.js +382 -208
- package/package.json +1 -1
- package/src/activity.js +245 -63
- package/src/aider/freshness.js +149 -146
- package/src/analyze.js +3 -1
- package/src/anti-patterns.js +17 -13
- package/src/audit.js +106 -79
- package/src/auto-suggest.js +62 -9
- package/src/benchmark.js +67 -51
- package/src/dashboard.js +36 -14
- package/src/governance.js +13 -7
- package/src/index.js +2 -1
- package/src/instruction-surfaces.js +185 -0
- package/src/integrations.js +102 -55
- package/src/locales/en.json +1 -1
- package/src/locales/es.json +1 -1
- package/src/permission-rules.js +218 -0
- package/src/secret-patterns.js +9 -0
- package/src/server.js +398 -3
- package/src/setup.js +2 -2
- package/src/stack-checks.js +1 -1
- package/src/synergy/report.js +1 -0
- package/src/techniques.js +102 -103
- package/src/terminology.js +73 -0
- package/src/token-estimate.js +35 -0
- package/src/workspace.js +155 -13
package/README.md
CHANGED
|
@@ -64,18 +64,31 @@ Nerviq scores your AI coding agent setup from 0 to 100, finds what's missing, an
|
|
|
64
64
|
Next: nerviq setup
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
## Quick Start
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
npx @nerviq/cli
|
|
71
|
-
npx @nerviq/cli audit
|
|
72
|
-
npx @nerviq/cli
|
|
73
|
-
npx @nerviq/cli
|
|
74
|
-
npx @nerviq/cli
|
|
75
|
-
npx @nerviq/cli
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
## Quick Start
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx @nerviq/cli --beginner # Show only the 5 starter commands
|
|
71
|
+
npx @nerviq/cli audit # Quick scan: score + top 3 actions
|
|
72
|
+
npx @nerviq/cli audit --full # Full audit with all checks + badge
|
|
73
|
+
npx @nerviq/cli audit --snapshot --tag "pre-refactor" # Save a named snapshot for history/compare/trend
|
|
74
|
+
npx @nerviq/cli compare # Detailed per-check diff between latest 2 audit snapshots
|
|
75
|
+
npx @nerviq/cli audit --webhook https://hooks.slack.com/services/... # Push audit results to Slack/Discord/generic HTTP
|
|
76
|
+
npx @nerviq/cli audit --workspace packages/* # Monorepo: root governance + stack-specific workspace profiles
|
|
77
|
+
npx @nerviq/cli setup # Generate starter-safe baseline
|
|
78
|
+
npx @nerviq/cli augment # Improvement plan, no writes
|
|
79
|
+
npx @nerviq/cli governance # Permission profiles + policy packs
|
|
80
|
+
npx @nerviq/cli benchmark # Baseline vs projected score in isolated copy
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
No install required. Zero dependencies.
|
|
84
|
+
|
|
85
|
+
Text-mode CLI output explains terms like `MCP`, `hooks`, `deny rules`, and `governance` inline when they appear, so a first audit is easier to read.
|
|
86
|
+
|
|
87
|
+
If you want the shortest possible command list inside the terminal, start with:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx @nerviq/cli --beginner
|
|
91
|
+
```
|
|
79
92
|
|
|
80
93
|
## Get Started by Role
|
|
81
94
|
|
|
@@ -128,22 +141,36 @@ npx @nerviq/cli synergy-report # Multi-agent synergy analysis
|
|
|
128
141
|
|
|
129
142
|
Synergy evaluates compound audit results, discovers compensation patterns (where one platform covers another's gaps), and ranks recommendations by cross-platform impact.
|
|
130
143
|
|
|
131
|
-
## SDK — `@nerviq/sdk` `BETA`
|
|
132
|
-
|
|
133
|
-
Programmatic access to all Nerviq capabilities:
|
|
134
|
-
|
|
135
|
-
```js
|
|
136
|
-
const { audit, harmonyAudit,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
## SDK — `@nerviq/sdk` `BETA`
|
|
145
|
+
|
|
146
|
+
Programmatic access to all Nerviq capabilities:
|
|
147
|
+
|
|
148
|
+
```js
|
|
149
|
+
const { audit, harmonyAudit, detectPlatforms } = require('@nerviq/sdk');
|
|
150
|
+
|
|
151
|
+
async function main() {
|
|
152
|
+
try {
|
|
153
|
+
const result = await audit('.', 'claude');
|
|
154
|
+
console.log(`Score: ${result.score}/100`);
|
|
155
|
+
|
|
156
|
+
const platforms = detectPlatforms('.');
|
|
157
|
+
console.log(`Active platforms: ${platforms.join(', ') || 'none detected'}`);
|
|
158
|
+
|
|
159
|
+
const harmony = await harmonyAudit('.');
|
|
160
|
+
console.log(`Harmony score: ${harmony.harmonyScore}/100`);
|
|
161
|
+
} catch (error) {
|
|
162
|
+
console.error(error instanceof Error ? error.message : 'Unknown SDK error');
|
|
163
|
+
process.exitCode = 1;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
main();
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Stable SDK surfaces: `audit`, `harmonyAudit`, `detectPlatforms`, `getCatalog`
|
|
171
|
+
Experimental SDK surfaces: `synergyReport`, `routeTask`
|
|
172
|
+
|
|
173
|
+
See [sdk/README.md](sdk/README.md) for full JavaScript examples, error handling guidance, and TypeScript usage.
|
|
147
174
|
|
|
148
175
|
## MCP Server — `nerviq serve`
|
|
149
176
|
|
|
@@ -153,11 +180,30 @@ Nerviq ships with a built-in MCP-compatible HTTP server for integration with AI
|
|
|
153
180
|
npx @nerviq/cli serve --port 3000
|
|
154
181
|
```
|
|
155
182
|
|
|
156
|
-
Endpoints:
|
|
157
|
-
- `GET /api/
|
|
158
|
-
- `GET /api/
|
|
159
|
-
- `
|
|
160
|
-
- `GET /api/
|
|
183
|
+
Endpoints:
|
|
184
|
+
- `GET /api/openapi.json` — Live OpenAPI 3.1 contract for this `serve` instance
|
|
185
|
+
- `GET /api/health` — Server health check
|
|
186
|
+
- `GET /api/catalog` — Full check catalog
|
|
187
|
+
- `GET /api/audit` — Run audit on a directory and platform via query params
|
|
188
|
+
- `GET /api/harmony` — Cross-platform harmony data
|
|
189
|
+
|
|
190
|
+
All successful operational responses are wrapped in a JSON envelope:
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"data": {},
|
|
195
|
+
"meta": {
|
|
196
|
+
"version": "1.11.0",
|
|
197
|
+
"timestamp": "2026-04-09T12:00:00.000Z"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Pull the contract directly into Swagger UI, Postman, or internal tooling:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
curl http://127.0.0.1:3000/api/openapi.json > nerviq-openapi.json
|
|
206
|
+
```
|
|
161
207
|
|
|
162
208
|
## Plugin System — `nerviq.config.js`
|
|
163
209
|
|
|
@@ -236,14 +282,14 @@ Levels:
|
|
|
236
282
|
| `nerviq plan` | Export proposal bundles with previews |
|
|
237
283
|
| `nerviq apply` | Apply proposals with rollback |
|
|
238
284
|
| `nerviq governance` | Permission profiles, hooks, policy packs |
|
|
239
|
-
| `nerviq benchmark` |
|
|
285
|
+
| `nerviq benchmark` | Baseline vs projected score in isolated temp copy |
|
|
240
286
|
| `nerviq check-health` | Detect regressions between audit snapshots |
|
|
241
287
|
| `nerviq deep-review` | AI-powered config review (opt-in) |
|
|
242
288
|
| `nerviq interactive` | Step-by-step guided wizard |
|
|
243
289
|
| `nerviq watch` | Live monitoring with score delta |
|
|
244
|
-
| `nerviq history` |
|
|
245
|
-
| `nerviq compare` | Compare latest vs previous |
|
|
246
|
-
| `nerviq trend` | Export trend report |
|
|
290
|
+
| `nerviq history` | Audit snapshot history from saved snapshots |
|
|
291
|
+
| `nerviq compare` | Compare latest vs previous audit snapshot |
|
|
292
|
+
| `nerviq trend` | Export audit snapshot trend report |
|
|
247
293
|
| `nerviq feedback` | Record recommendation outcomes |
|
|
248
294
|
| `nerviq anti-patterns` | Detect anti-patterns in current project |
|
|
249
295
|
| `nerviq freshness` | Show verification freshness for all checks |
|
|
@@ -273,16 +319,29 @@ Levels:
|
|
|
273
319
|
| `--verbose` | Full audit + medium-priority recommendations |
|
|
274
320
|
| `--threshold N` | Exit 1 if score < N (for CI) |
|
|
275
321
|
| `--json` | Machine-readable JSON output |
|
|
276
|
-
| `--out FILE` | Write output to file |
|
|
277
|
-
| `--
|
|
278
|
-
| `--
|
|
279
|
-
| `--
|
|
280
|
-
| `--
|
|
322
|
+
| `--out FILE` | Write output to file |
|
|
323
|
+
| `--webhook URL` | POST audit results to Slack, Discord, or a generic JSON endpoint |
|
|
324
|
+
| `--webhook-header NAME:VALUE` | Add a custom webhook header; repeat the flag for multiple headers |
|
|
325
|
+
| `--webhook-retries N` | Retry transient webhook failures (`429`, `5xx`, timeouts) up to `N` extra times |
|
|
326
|
+
| `--snapshot` | Save audit snapshot for trending |
|
|
327
|
+
| `--dry-run` | Preview changes without writing files |
|
|
328
|
+
| `--config-only` | Only write config files, never source code |
|
|
329
|
+
| `--auto` | Apply without prompts |
|
|
281
330
|
| `--only A,B` | Limit apply to selected proposal IDs |
|
|
282
331
|
| `--format sarif` | SARIF output for code scanning |
|
|
283
332
|
| `--platform NAME` | Target platform (claude, codex, gemini, copilot, cursor, windsurf, aider, opencode) |
|
|
284
|
-
| `--workspace GLOB` | Audit workspaces separately (e.g. packages/*) |
|
|
285
|
-
| `--external PATH` | Benchmark an external repo |
|
|
333
|
+
| `--workspace GLOB` | Audit workspaces separately as package-level live audits with summary-only JSON rows (e.g. packages/*) |
|
|
334
|
+
| `--external PATH` | Benchmark an external repo |
|
|
335
|
+
|
|
336
|
+
Webhook delivery automatically retries transient failures twice by default. For authenticated internal endpoints, you can add custom headers such as:
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
npx @nerviq/cli audit \
|
|
340
|
+
--webhook https://ops.example.com/nerviq/audit \
|
|
341
|
+
--webhook-header "Authorization: Bearer $NERVIQ_WEBHOOK_TOKEN" \
|
|
342
|
+
--webhook-header "X-Nerviq-Environment: production" \
|
|
343
|
+
--webhook-retries 4
|
|
344
|
+
```
|
|
286
345
|
|
|
287
346
|
## Backed by Research
|
|
288
347
|
|
|
@@ -333,9 +392,9 @@ If Nerviq helped you, consider giving it a ⭐ on [GitHub](https://github.com/ne
|
|
|
333
392
|
|
|
334
393
|
**Not designed for:** Deeply customized setups with 20+ skills, agent teams, and bespoke MCP integrations. If you've already built advanced agent workflows, you may not need this.
|
|
335
394
|
|
|
336
|
-
**Strongest at:**
|
|
337
|
-
|
|
338
|
-
**Not a replacement for:** Deep architectural review of business logic, runtime performance profiling, or security penetration testing. Nerviq focuses on how your AI coding agents are configured and governed — not on what your application code does.
|
|
395
|
+
**Strongest at:** AI agent governance, configuration intelligence, workflow policy hygiene, cross-platform alignment, and setup standardization.
|
|
396
|
+
|
|
397
|
+
**Not a replacement for:** Deep architectural review of business logic, runtime performance profiling, full SAST coverage, secret scanning, or security penetration testing. Nerviq focuses on how your AI coding agents are configured and governed — not on what your application code does.
|
|
339
398
|
|
|
340
399
|
**Confidence levels:** Every check includes a `confidence` score (0.0–1.0) and a `sourceUrl` linking to primary documentation. Checks marked `heuristic` are pattern-based and may produce false positives on non-standard project structures.
|
|
341
400
|
|
|
@@ -347,16 +406,3 @@ If Nerviq helped you, consider giving it a ⭐ on [GitHub](https://github.com/ne
|
|
|
347
406
|
| `BETA` | Works but has limited real-world testing. API may change |
|
|
348
407
|
| `EXPERIMENTAL` | Early stage, static rules, results may vary |
|
|
349
408
|
|
|
350
|
-
## Previously nerviq-cli
|
|
351
|
-
|
|
352
|
-
Nerviq was previously published as `nerviq-cli`. If you were using it:
|
|
353
|
-
|
|
354
|
-
```bash
|
|
355
|
-
# Old
|
|
356
|
-
npx nerviq-cli
|
|
357
|
-
|
|
358
|
-
# New
|
|
359
|
-
npx @nerviq/cli audit
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
All features are preserved and expanded.
|