@nerviq/cli 1.8.5 → 1.8.7

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 CHANGED
@@ -1,362 +1,362 @@
1
- # Nerviq
2
-
3
- > Standardize and govern your AI coding agent setup — score, fix, and align across 8 platforms.
4
-
5
- [![npm version](https://img.shields.io/npm/v/@nerviq/cli)](https://www.npmjs.com/package/@nerviq/cli)
6
- [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](LICENSE)
7
- [![Checks: 2431](https://img.shields.io/badge/checks-2431-brightgreen)](https://github.com/nerviq/nerviq)
8
-
9
- ---
10
-
11
- ### 8 Platforms Supported
12
-
13
- Nerviq audits, sets up, and governs AI coding agent configurations for **8 platforms**:
14
-
15
- | Platform | Checks | Status |
16
- |----------|--------|--------|
17
- | Claude Code | 393 | Full |
18
- | Codex (OpenAI) | 272 | Full |
19
- | Gemini CLI (Google) | 300 | Full |
20
- | GitHub Copilot | 299 | Full |
21
- | Cursor | 301 | Full |
22
- | Windsurf | 297 | Full |
23
- | Aider | 283 | Full |
24
- | OpenCode | 286 | Full |
25
-
26
- ### 10 Stack-Specific Languages
27
-
28
- | Language | Checks | Key Areas |
29
- |----------|--------|-----------|
30
- | Python | 26 | pyproject, typing, pytest, linting, async, security |
31
- | Go | 21 | go.mod, vet, fmt, error wrapping, interfaces |
32
- | Rust | 21 | Cargo, clippy, unsafe docs, editions, cross-compile |
33
- | Java/Spring | 21 | Maven/Gradle, JUnit, Spring Boot, migrations |
34
- | Ruby | 16 | Gemfile, RSpec, Rubocop, Rails |
35
- | PHP | 16 | Composer, PHPUnit, Laravel, PSR |
36
- | .NET | 16 | csproj, NuGet, xUnit, EF Core |
37
- | Flutter | 15 | pubspec, analysis, state management, l10n |
38
- | Swift | 10 | SPM, SwiftLint, async/await, doc comments |
39
- | Kotlin | 10 | Gradle, ktlint, coroutines, Compose, KMP |
40
-
41
- ---
42
-
43
- ## What Nerviq Does
44
-
45
- Nerviq scores your AI coding agent setup from 0 to 100, finds what's missing, and fixes it — with rollback for every change.
46
-
47
- ```
48
- nerviq audit
49
- ═══════════════════════════════════════
50
- Detected: React, TypeScript, Docker
51
-
52
- ████████████████░░░░ 78/100
53
-
54
- ✅ CLAUDE.md with architecture diagram
55
- ✅ Hooks (PreToolUse + PostToolUse)
56
- ✅ Custom skills (3 skills)
57
- ✅ MCP servers configured
58
-
59
- ⚡ Top 3 Next Actions
60
- 1. Add verification commands to CLAUDE.md
61
- 2. Configure deny rules for dangerous operations
62
- 3. Add path-specific rules in .claude/rules/
63
-
64
- Next: nerviq setup
65
- ```
66
-
67
- ## Quick Start
68
-
69
- ```bash
70
- npx @nerviq/cli audit # Quick scan: score + top 3 actions
71
- npx @nerviq/cli audit --full # Full audit with all checks + badge
72
- npx @nerviq/cli setup # Generate starter-safe baseline
73
- npx @nerviq/cli augment # Improvement plan, no writes
74
- npx @nerviq/cli governance # Permission profiles + policy packs
75
- npx @nerviq/cli benchmark # Before/after in isolated copy
76
- ```
77
-
78
- No install required. Zero dependencies.
79
-
80
- ## Get Started by Role
81
-
82
- | You are a... | Start here | Then |
83
- |--------------|------------|------|
84
- | **Solo developer** | `nerviq audit` → `nerviq augment` | `nerviq benchmark` |
85
- | **Team lead / DevEx** | `nerviq governance` → `nerviq audit --json` | CI threshold + `nerviq watch` |
86
- | **Enterprise / Platform** | `nerviq harmony-audit` → `nerviq harmony-drift` | Policy packs + `nerviq certify` |
87
-
88
- ## 2,431 Checks Across 96 Categories (8 Platforms × ~300 Governance Rules)
89
-
90
- | Category Group | Checks | Examples |
91
- |----------------|--------|---------|
92
- | Stack-Specific (10 languages) | 172 | Python, Go, Rust, Java, Ruby, PHP, .NET, Flutter, Swift, Kotlin |
93
- | Platform Config & Instructions | ~150 | CLAUDE.md, AGENTS.md, rules, managed blocks |
94
- | Security & Trust | ~80 | permissions, deny rules, secrets, trust posture |
95
- | Quality & Testing | ~70 | verification loops, lint/test/build, coverage |
96
- | Automation & Hooks | ~60 | PreToolUse, PostToolUse, notification hooks |
97
- | Workflow & Commands | ~50 | skills, commands, agents, snapshots |
98
- | Git & Hygiene | ~40 | .gitignore, env protection, changelog |
99
- | Tools & MCP | ~40 | .mcp.json, multi-server, Context7 |
100
- | Governance & Compliance | ~30 | permission profiles, audit trails |
101
- | DevOps & Infrastructure | ~30 | Docker, CI, Terraform, monitoring |
102
- | Cross-Platform Intelligence | ~25 | harmony, synergy, drift detection |
103
- | Enterprise & Freshness | ~20 | freshness tracking, deprecation, SBOM |
104
- | Memory & Context | ~15 | context management, compaction, @path |
105
- | Prompting & Design | ~10 | XML tags, constraints, frontend patterns |
106
-
107
- ## Harmony — Cross-Platform Alignment `GA`
108
-
109
- Harmony detects drift between your AI coding platforms and keeps them in sync.
110
-
111
- ```bash
112
- npx @nerviq/cli harmony-audit # Cross-platform DX audit (0-100 harmony score)
113
- npx @nerviq/cli harmony-sync # Sync shared config across platforms
114
- npx @nerviq/cli harmony-drift # Detect drift between platform configs
115
- npx @nerviq/cli harmony-advise # Cross-platform improvement advice
116
- npx @nerviq/cli harmony-watch # Live monitoring for config drift
117
- npx @nerviq/cli harmony-governance # Unified governance across platforms
118
- npx @nerviq/cli harmony-add <platform> # Add a new platform to your project
119
- ```
120
-
121
- ## Synergy — Multi-Agent Amplification `EXPERIMENTAL`
122
-
123
- Synergy analyzes how your platforms work together and finds amplification opportunities. Currently uses static routing rules — learned routing is planned for v2.0.
124
-
125
- ```bash
126
- npx @nerviq/cli synergy-report # Multi-agent synergy analysis
127
- ```
128
-
129
- Synergy evaluates compound audit results, discovers compensation patterns (where one platform covers another's gaps), and ranks recommendations by cross-platform impact.
130
-
131
- ## SDK — `@nerviq/sdk` `BETA`
132
-
133
- Programmatic access to all Nerviq capabilities:
134
-
135
- ```js
136
- const { audit, harmonyAudit, synergyReport, detectPlatforms } = require('@nerviq/sdk');
137
-
138
- const result = await audit('.', 'claude');
139
- console.log(`Score: ${result.score}/100`);
140
-
141
- const platforms = detectPlatforms('.');
142
- console.log(`Active platforms: ${platforms.join(', ')}`);
143
-
144
- const harmony = await harmonyAudit('.');
145
- console.log(`Harmony score: ${harmony.harmonyScore}/100`);
146
- ```
147
-
148
- ## MCP Server — `nerviq serve`
149
-
150
- Nerviq ships with a built-in MCP-compatible HTTP server for integration with AI agents:
151
-
152
- ```bash
153
- npx @nerviq/cli serve --port 3000
154
- ```
155
-
156
- Endpoints:
157
- - `GET /api/health` — Server health check
158
- - `GET /api/catalog` — Full check catalog
159
- - `POST /api/audit` — Run audit on a directory
160
- - `GET /api/harmony` — Cross-platform harmony data
161
-
162
- ## Plugin System — `nerviq.config.js`
163
-
164
- Extend Nerviq with custom checks via a config file in your project root:
165
-
166
- ```js
167
- // nerviq.config.js
168
- module.exports = {
169
- plugins: [
170
- {
171
- name: 'my-company-checks',
172
- checks: {
173
- internalDocs: {
174
- id: 'internalDocs',
175
- name: 'Internal docs present',
176
- check: (dir) => require('fs').existsSync(`${dir}/docs/internal.md`),
177
- impact: 'medium',
178
- category: 'Quality',
179
- fix: 'Add docs/internal.md with team-specific guidelines',
180
- },
181
- },
182
- },
183
- ],
184
- };
185
- ```
186
-
187
- See [docs/plugins.md](docs/plugins.md) for full plugin API reference.
188
-
189
- ## GitHub Action
190
-
191
- Add Nerviq to your CI pipeline:
192
-
193
- ```yaml
194
- # .github/workflows/nerviq.yml
195
- name: Nerviq Audit
196
- on: [push, pull_request]
197
-
198
- jobs:
199
- audit:
200
- runs-on: ubuntu-latest
201
- steps:
202
- - uses: actions/checkout@v4
203
- - uses: nerviq/nerviq@v1
204
- with:
205
- threshold: 60
206
- ```
207
-
208
- The action outputs `score`, `passed`, and `total` for use in downstream steps. Fails the workflow if the score is below the configured threshold.
209
-
210
- ## Certification
211
-
212
- Earn a Nerviq certification badge for your project:
213
-
214
- ```bash
215
- npx @nerviq/cli certify # Run certification and display badge
216
- ```
217
-
218
- Levels:
219
- - **Gold** — Harmony score >= 80, all platforms >= 70
220
- - **Silver** — Harmony score >= 60, all platforms >= 50
221
- - **Bronze** — Any platform >= 40
222
-
223
- ## All Commands
224
-
225
- | Command | What it does |
226
- |---------|-------------|
227
- | `nerviq audit` | Score 0-100 — quick scan with top 3 actions (default) |
228
- | `nerviq audit --full` | Full audit with all checks, weakest areas, confidence labels |
229
- | `nerviq fix <key>` | Auto-fix a specific check (shows score impact) |
230
- | `nerviq fix --all-critical` | Fix all critical issues at once |
231
- | `nerviq rollback` | Undo the most recent apply (delete created files) |
232
- | `nerviq rollback --list` | Show available rollback points |
233
- | `nerviq setup` | Generate starter-safe CLAUDE.md + hooks + commands |
234
- | `nerviq augment` | Repo-aware improvement plan (no writes) |
235
- | `nerviq suggest-only` | Structured report for sharing |
236
- | `nerviq plan` | Export proposal bundles with previews |
237
- | `nerviq apply` | Apply proposals with rollback |
238
- | `nerviq governance` | Permission profiles, hooks, policy packs |
239
- | `nerviq benchmark` | Before/after in isolated temp copy |
240
- | `nerviq check-health` | Detect regressions between audit snapshots |
241
- | `nerviq deep-review` | AI-powered config review (opt-in) |
242
- | `nerviq interactive` | Step-by-step guided wizard |
243
- | `nerviq watch` | Live monitoring with score delta |
244
- | `nerviq history` | Score history from snapshots |
245
- | `nerviq compare` | Compare latest vs previous |
246
- | `nerviq trend` | Export trend report |
247
- | `nerviq feedback` | Record recommendation outcomes |
248
- | `nerviq anti-patterns` | Detect anti-patterns in current project |
249
- | `nerviq freshness` | Show verification freshness for all checks |
250
- | `nerviq rules-export` | Export recommendation rules (human summary or --json) |
251
- | `nerviq badge` | shields.io badge for README |
252
- | `nerviq certify` | Certification level + badge |
253
- | `nerviq scan dir1 dir2` | Compare multiple repos |
254
- | `nerviq org scan dir1 dir2` | Aggregate multiple repos into one score table |
255
- | `nerviq harmony-audit` | Cross-platform DX audit |
256
- | `nerviq harmony-sync` | Sync config across platforms |
257
- | `nerviq harmony-drift` | Detect platform drift |
258
- | `nerviq harmony-advise` | Cross-platform advice |
259
- | `nerviq harmony-watch` | Live drift monitoring |
260
- | `nerviq harmony-governance` | Unified platform governance |
261
- | `nerviq synergy-report` | Multi-agent synergy analysis |
262
- | `nerviq catalog` | Show check catalog for all 8 platforms |
263
- | `nerviq doctor` | Self-diagnostics |
264
- | `nerviq convert` | Convert config between platforms |
265
- | `nerviq migrate` | Migrate platform config versions |
266
- | `nerviq serve` | Start local MCP-compatible HTTP API |
267
-
268
- ## Options
269
-
270
- | Flag | Effect |
271
- |------|--------|
272
- | `--full` | Full audit output (all checks, weakest areas, confidence labels) |
273
- | `--verbose` | Full audit + medium-priority recommendations |
274
- | `--threshold N` | Exit 1 if score < N (for CI) |
275
- | `--json` | Machine-readable JSON output |
276
- | `--out FILE` | Write output to file |
277
- | `--snapshot` | Save audit snapshot for trending |
278
- | `--dry-run` | Preview changes without writing files |
279
- | `--config-only` | Only write config files, never source code |
280
- | `--auto` | Apply without prompts |
281
- | `--only A,B` | Limit apply to selected proposal IDs |
282
- | `--format sarif` | SARIF output for code scanning |
283
- | `--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 |
286
-
287
- ## Backed by Research
288
-
289
- Nerviq is built on the NERVIQ knowledge engine — the largest verified catalog of AI coding agent techniques:
290
-
291
- - **448+ research documents** covering all 8 platforms
292
- - **332+ experiments** with tested, rated results
293
- - **2,431 checks** across 8 platforms (~300 unique governance rules × 8 platform adaptations), each with `sourceUrl` and `confidence` level (0.0-1.0)
294
- - Every check is traceable to primary documentation or verified experiment
295
- - 90-day freshness cycle: stale findings are re-verified or pruned
296
-
297
- ## Safety Modes
298
-
299
- Nerviq provides explicit safety controls so you decide what it can touch:
300
-
301
- | Mode | Flag | What it does |
302
- |------|------|-------------|
303
- | **Read-only** | `nerviq audit` | Reads files, writes nothing. Default command. |
304
- | **Suggest-only** | `nerviq suggest-only` | Generates markdown report, no file writes. |
305
- | **Dry-run** | `--dry-run` | Previews setup/fix/apply changes without writing. |
306
- | **Config-only** | `--config-only` | Only writes config files (.claude/, rules, hooks). Never touches source code. |
307
- | **Safe-write** | `--profile safe-write` | Default write profile. Creates new files, never overwrites existing ones. |
308
- | **Power-user** | `--profile power-user` | Overwrites existing files (use with `--snapshot` for rollback). |
309
-
310
- Every write command supports `--snapshot` for automatic backup before changes.
311
-
312
- ## Privacy
313
-
314
- - **Zero dependencies** — nothing to audit
315
- - **Runs locally** — audit, setup, plan, apply, governance, benchmark all run on your machine
316
- - **Deep review is opt-in** — only `deep-review` sends selected config for AI analysis
317
- - **AGPL-3.0 Licensed** — open source
318
-
319
- ## Links
320
-
321
- - **npm**: [@nerviq/cli](https://www.npmjs.com/package/@nerviq/cli)
322
- - **GitHub**: [github.com/nerviq/nerviq](https://github.com/nerviq/nerviq)
323
- - **Website**: [nerviq.net](https://nerviq.net)
324
- - **Discord**: [Join the community](https://discord.gg/nerviq)
325
-
326
- ---
327
-
328
- If Nerviq helped you, consider giving it a ⭐ on [GitHub](https://github.com/nerviq/nerviq) — it helps others discover the project.
329
-
330
- ## What Nerviq Is — and Isn't
331
-
332
- **Best for:** Teams going from zero governance to a strong baseline — fast. If you're starting with AI coding agents or have a few platforms running without consistent configuration, Nerviq gets you to a governed setup quickly.
333
-
334
- **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
-
336
- **Strongest at:** Agent configuration, workflow governance, repo policy hygiene, cross-platform alignment, and setup standardization.
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.
339
-
340
- **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
-
342
- **Feature maturity:**
343
-
344
- | Label | Meaning |
345
- |-------|---------|
346
- | `GA` | Stable, tested on real repos, safe for production use |
347
- | `BETA` | Works but has limited real-world testing. API may change |
348
- | `EXPERIMENTAL` | Early stage, static rules, results may vary |
349
-
350
- ## Previously claudex-setup
351
-
352
- Nerviq was previously published as `claudex-setup`. If you were using it:
353
-
354
- ```bash
355
- # Old
356
- npx claudex-setup
357
-
358
- # New
359
- npx @nerviq/cli audit
360
- ```
361
-
362
- All features are preserved and expanded.
1
+ # Nerviq
2
+
3
+ > Standardize and govern your AI coding agent setup — score, fix, and align across 8 platforms.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@nerviq/cli)](https://www.npmjs.com/package/@nerviq/cli)
6
+ [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](LICENSE)
7
+ [![Checks: 2431](https://img.shields.io/badge/checks-2431-brightgreen)](https://github.com/nerviq/nerviq)
8
+
9
+ ---
10
+
11
+ ### 8 Platforms Supported
12
+
13
+ Nerviq audits, sets up, and governs AI coding agent configurations for **8 platforms**:
14
+
15
+ | Platform | Checks | Status |
16
+ |----------|--------|--------|
17
+ | Claude Code | 393 | Full |
18
+ | Codex (OpenAI) | 272 | Full |
19
+ | Gemini CLI (Google) | 300 | Full |
20
+ | GitHub Copilot | 299 | Full |
21
+ | Cursor | 301 | Full |
22
+ | Windsurf | 297 | Full |
23
+ | Aider | 283 | Full |
24
+ | OpenCode | 286 | Full |
25
+
26
+ ### 10 Stack-Specific Languages
27
+
28
+ | Language | Checks | Key Areas |
29
+ |----------|--------|-----------|
30
+ | Python | 26 | pyproject, typing, pytest, linting, async, security |
31
+ | Go | 21 | go.mod, vet, fmt, error wrapping, interfaces |
32
+ | Rust | 21 | Cargo, clippy, unsafe docs, editions, cross-compile |
33
+ | Java/Spring | 21 | Maven/Gradle, JUnit, Spring Boot, migrations |
34
+ | Ruby | 16 | Gemfile, RSpec, Rubocop, Rails |
35
+ | PHP | 16 | Composer, PHPUnit, Laravel, PSR |
36
+ | .NET | 16 | csproj, NuGet, xUnit, EF Core |
37
+ | Flutter | 15 | pubspec, analysis, state management, l10n |
38
+ | Swift | 10 | SPM, SwiftLint, async/await, doc comments |
39
+ | Kotlin | 10 | Gradle, ktlint, coroutines, Compose, KMP |
40
+
41
+ ---
42
+
43
+ ## What Nerviq Does
44
+
45
+ Nerviq scores your AI coding agent setup from 0 to 100, finds what's missing, and fixes it — with rollback for every change.
46
+
47
+ ```
48
+ nerviq audit
49
+ ═══════════════════════════════════════
50
+ Detected: React, TypeScript, Docker
51
+
52
+ ████████████████░░░░ 78/100
53
+
54
+ ✅ CLAUDE.md with architecture diagram
55
+ ✅ Hooks (PreToolUse + PostToolUse)
56
+ ✅ Custom skills (3 skills)
57
+ ✅ MCP servers configured
58
+
59
+ ⚡ Top 3 Next Actions
60
+ 1. Add verification commands to CLAUDE.md
61
+ 2. Configure deny rules for dangerous operations
62
+ 3. Add path-specific rules in .claude/rules/
63
+
64
+ Next: nerviq setup
65
+ ```
66
+
67
+ ## Quick Start
68
+
69
+ ```bash
70
+ npx @nerviq/cli audit # Quick scan: score + top 3 actions
71
+ npx @nerviq/cli audit --full # Full audit with all checks + badge
72
+ npx @nerviq/cli setup # Generate starter-safe baseline
73
+ npx @nerviq/cli augment # Improvement plan, no writes
74
+ npx @nerviq/cli governance # Permission profiles + policy packs
75
+ npx @nerviq/cli benchmark # Before/after in isolated copy
76
+ ```
77
+
78
+ No install required. Zero dependencies.
79
+
80
+ ## Get Started by Role
81
+
82
+ | You are a... | Start here | Then |
83
+ |--------------|------------|------|
84
+ | **Solo developer** | `nerviq audit` → `nerviq augment` | `nerviq benchmark` |
85
+ | **Team lead / DevEx** | `nerviq governance` → `nerviq audit --json` | CI threshold + `nerviq watch` |
86
+ | **Enterprise / Platform** | `nerviq harmony-audit` → `nerviq harmony-drift` | Policy packs + `nerviq certify` |
87
+
88
+ ## 2,431 Checks Across 96 Categories (8 Platforms × ~300 Governance Rules)
89
+
90
+ | Category Group | Checks | Examples |
91
+ |----------------|--------|---------|
92
+ | Stack-Specific (10 languages) | 172 | Python, Go, Rust, Java, Ruby, PHP, .NET, Flutter, Swift, Kotlin |
93
+ | Platform Config & Instructions | ~150 | CLAUDE.md, AGENTS.md, rules, managed blocks |
94
+ | Security & Trust | ~80 | permissions, deny rules, secrets, trust posture |
95
+ | Quality & Testing | ~70 | verification loops, lint/test/build, coverage |
96
+ | Automation & Hooks | ~60 | PreToolUse, PostToolUse, notification hooks |
97
+ | Workflow & Commands | ~50 | skills, commands, agents, snapshots |
98
+ | Git & Hygiene | ~40 | .gitignore, env protection, changelog |
99
+ | Tools & MCP | ~40 | .mcp.json, multi-server, Context7 |
100
+ | Governance & Compliance | ~30 | permission profiles, audit trails |
101
+ | DevOps & Infrastructure | ~30 | Docker, CI, Terraform, monitoring |
102
+ | Cross-Platform Intelligence | ~25 | harmony, synergy, drift detection |
103
+ | Enterprise & Freshness | ~20 | freshness tracking, deprecation, SBOM |
104
+ | Memory & Context | ~15 | context management, compaction, @path |
105
+ | Prompting & Design | ~10 | XML tags, constraints, frontend patterns |
106
+
107
+ ## Harmony — Cross-Platform Alignment `GA`
108
+
109
+ Harmony detects drift between your AI coding platforms and keeps them in sync.
110
+
111
+ ```bash
112
+ npx @nerviq/cli harmony-audit # Cross-platform DX audit (0-100 harmony score)
113
+ npx @nerviq/cli harmony-sync # Sync shared config across platforms
114
+ npx @nerviq/cli harmony-drift # Detect drift between platform configs
115
+ npx @nerviq/cli harmony-advise # Cross-platform improvement advice
116
+ npx @nerviq/cli harmony-watch # Live monitoring for config drift
117
+ npx @nerviq/cli harmony-governance # Unified governance across platforms
118
+ npx @nerviq/cli harmony-add <platform> # Add a new platform to your project
119
+ ```
120
+
121
+ ## Synergy — Multi-Agent Amplification `EXPERIMENTAL`
122
+
123
+ Synergy analyzes how your platforms work together and finds amplification opportunities. Currently uses static routing rules — learned routing is planned for v2.0.
124
+
125
+ ```bash
126
+ npx @nerviq/cli synergy-report # Multi-agent synergy analysis
127
+ ```
128
+
129
+ Synergy evaluates compound audit results, discovers compensation patterns (where one platform covers another's gaps), and ranks recommendations by cross-platform impact.
130
+
131
+ ## SDK — `@nerviq/sdk` `BETA`
132
+
133
+ Programmatic access to all Nerviq capabilities:
134
+
135
+ ```js
136
+ const { audit, harmonyAudit, synergyReport, detectPlatforms } = require('@nerviq/sdk');
137
+
138
+ const result = await audit('.', 'claude');
139
+ console.log(`Score: ${result.score}/100`);
140
+
141
+ const platforms = detectPlatforms('.');
142
+ console.log(`Active platforms: ${platforms.join(', ')}`);
143
+
144
+ const harmony = await harmonyAudit('.');
145
+ console.log(`Harmony score: ${harmony.harmonyScore}/100`);
146
+ ```
147
+
148
+ ## MCP Server — `nerviq serve`
149
+
150
+ Nerviq ships with a built-in MCP-compatible HTTP server for integration with AI agents:
151
+
152
+ ```bash
153
+ npx @nerviq/cli serve --port 3000
154
+ ```
155
+
156
+ Endpoints:
157
+ - `GET /api/health` — Server health check
158
+ - `GET /api/catalog` — Full check catalog
159
+ - `POST /api/audit` — Run audit on a directory
160
+ - `GET /api/harmony` — Cross-platform harmony data
161
+
162
+ ## Plugin System — `nerviq.config.js`
163
+
164
+ Extend Nerviq with custom checks via a config file in your project root:
165
+
166
+ ```js
167
+ // nerviq.config.js
168
+ module.exports = {
169
+ plugins: [
170
+ {
171
+ name: 'my-company-checks',
172
+ checks: {
173
+ internalDocs: {
174
+ id: 'internalDocs',
175
+ name: 'Internal docs present',
176
+ check: (dir) => require('fs').existsSync(`${dir}/docs/internal.md`),
177
+ impact: 'medium',
178
+ category: 'Quality',
179
+ fix: 'Add docs/internal.md with team-specific guidelines',
180
+ },
181
+ },
182
+ },
183
+ ],
184
+ };
185
+ ```
186
+
187
+ See [docs/plugins.md](docs/plugins.md) for full plugin API reference.
188
+
189
+ ## GitHub Action
190
+
191
+ Add Nerviq to your CI pipeline:
192
+
193
+ ```yaml
194
+ # .github/workflows/nerviq.yml
195
+ name: Nerviq Audit
196
+ on: [push, pull_request]
197
+
198
+ jobs:
199
+ audit:
200
+ runs-on: ubuntu-latest
201
+ steps:
202
+ - uses: actions/checkout@v4
203
+ - uses: nerviq/nerviq@v1
204
+ with:
205
+ threshold: 60
206
+ ```
207
+
208
+ The action outputs `score`, `passed`, and `total` for use in downstream steps. Fails the workflow if the score is below the configured threshold.
209
+
210
+ ## Certification
211
+
212
+ Earn a Nerviq certification badge for your project:
213
+
214
+ ```bash
215
+ npx @nerviq/cli certify # Run certification and display badge
216
+ ```
217
+
218
+ Levels:
219
+ - **Gold** — Harmony score >= 80, all platforms >= 70
220
+ - **Silver** — Harmony score >= 60, all platforms >= 50
221
+ - **Bronze** — Any platform >= 40
222
+
223
+ ## All Commands
224
+
225
+ | Command | What it does |
226
+ |---------|-------------|
227
+ | `nerviq audit` | Score 0-100 — quick scan with top 3 actions (default) |
228
+ | `nerviq audit --full` | Full audit with all checks, weakest areas, confidence labels |
229
+ | `nerviq fix <key>` | Auto-fix a specific check (shows score impact) |
230
+ | `nerviq fix --all-critical` | Fix all critical issues at once |
231
+ | `nerviq rollback` | Undo the most recent apply (delete created files) |
232
+ | `nerviq rollback --list` | Show available rollback points |
233
+ | `nerviq setup` | Generate starter-safe CLAUDE.md + hooks + commands |
234
+ | `nerviq augment` | Repo-aware improvement plan (no writes) |
235
+ | `nerviq suggest-only` | Structured report for sharing |
236
+ | `nerviq plan` | Export proposal bundles with previews |
237
+ | `nerviq apply` | Apply proposals with rollback |
238
+ | `nerviq governance` | Permission profiles, hooks, policy packs |
239
+ | `nerviq benchmark` | Before/after in isolated temp copy |
240
+ | `nerviq check-health` | Detect regressions between audit snapshots |
241
+ | `nerviq deep-review` | AI-powered config review (opt-in) |
242
+ | `nerviq interactive` | Step-by-step guided wizard |
243
+ | `nerviq watch` | Live monitoring with score delta |
244
+ | `nerviq history` | Score history from snapshots |
245
+ | `nerviq compare` | Compare latest vs previous |
246
+ | `nerviq trend` | Export trend report |
247
+ | `nerviq feedback` | Record recommendation outcomes |
248
+ | `nerviq anti-patterns` | Detect anti-patterns in current project |
249
+ | `nerviq freshness` | Show verification freshness for all checks |
250
+ | `nerviq rules-export` | Export recommendation rules (human summary or --json) |
251
+ | `nerviq badge` | shields.io badge for README |
252
+ | `nerviq certify` | Certification level + badge |
253
+ | `nerviq scan dir1 dir2` | Compare multiple repos |
254
+ | `nerviq org scan dir1 dir2` | Aggregate multiple repos into one score table |
255
+ | `nerviq harmony-audit` | Cross-platform DX audit |
256
+ | `nerviq harmony-sync` | Sync config across platforms |
257
+ | `nerviq harmony-drift` | Detect platform drift |
258
+ | `nerviq harmony-advise` | Cross-platform advice |
259
+ | `nerviq harmony-watch` | Live drift monitoring |
260
+ | `nerviq harmony-governance` | Unified platform governance |
261
+ | `nerviq synergy-report` | Multi-agent synergy analysis |
262
+ | `nerviq catalog` | Show check catalog for all 8 platforms |
263
+ | `nerviq doctor` | Self-diagnostics |
264
+ | `nerviq convert` | Convert config between platforms |
265
+ | `nerviq migrate` | Migrate platform config versions |
266
+ | `nerviq serve` | Start local MCP-compatible HTTP API |
267
+
268
+ ## Options
269
+
270
+ | Flag | Effect |
271
+ |------|--------|
272
+ | `--full` | Full audit output (all checks, weakest areas, confidence labels) |
273
+ | `--verbose` | Full audit + medium-priority recommendations |
274
+ | `--threshold N` | Exit 1 if score < N (for CI) |
275
+ | `--json` | Machine-readable JSON output |
276
+ | `--out FILE` | Write output to file |
277
+ | `--snapshot` | Save audit snapshot for trending |
278
+ | `--dry-run` | Preview changes without writing files |
279
+ | `--config-only` | Only write config files, never source code |
280
+ | `--auto` | Apply without prompts |
281
+ | `--only A,B` | Limit apply to selected proposal IDs |
282
+ | `--format sarif` | SARIF output for code scanning |
283
+ | `--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 |
286
+
287
+ ## Backed by Research
288
+
289
+ Nerviq is built on the NERVIQ knowledge engine — the largest verified catalog of AI coding agent techniques:
290
+
291
+ - **448+ research documents** covering all 8 platforms
292
+ - **332+ experiments** with tested, rated results
293
+ - **2,431 checks** across 8 platforms (~300 unique governance rules × 8 platform adaptations), each with `sourceUrl` and `confidence` level (0.0-1.0)
294
+ - Every check is traceable to primary documentation or verified experiment
295
+ - 90-day freshness cycle: stale findings are re-verified or pruned
296
+
297
+ ## Safety Modes
298
+
299
+ Nerviq provides explicit safety controls so you decide what it can touch:
300
+
301
+ | Mode | Flag | What it does |
302
+ |------|------|-------------|
303
+ | **Read-only** | `nerviq audit` | Reads files, writes nothing. Default command. |
304
+ | **Suggest-only** | `nerviq suggest-only` | Generates markdown report, no file writes. |
305
+ | **Dry-run** | `--dry-run` | Previews setup/fix/apply changes without writing. |
306
+ | **Config-only** | `--config-only` | Only writes config files (.claude/, rules, hooks). Never touches source code. |
307
+ | **Safe-write** | `--profile safe-write` | Default write profile. Creates new files, never overwrites existing ones. |
308
+ | **Power-user** | `--profile power-user` | Overwrites existing files (use with `--snapshot` for rollback). |
309
+
310
+ Every write command supports `--snapshot` for automatic backup before changes.
311
+
312
+ ## Privacy
313
+
314
+ - **Zero dependencies** — nothing to audit
315
+ - **Runs locally** — audit, setup, plan, apply, governance, benchmark all run on your machine
316
+ - **Deep review is opt-in** — only `deep-review` sends selected config for AI analysis
317
+ - **AGPL-3.0 Licensed** — open source
318
+
319
+ ## Links
320
+
321
+ - **npm**: [@nerviq/cli](https://www.npmjs.com/package/@nerviq/cli)
322
+ - **GitHub**: [github.com/nerviq/nerviq](https://github.com/nerviq/nerviq)
323
+ - **Website**: [nerviq.net](https://nerviq.net)
324
+ - **Discord**: [Join the community](https://discord.gg/nerviq)
325
+
326
+ ---
327
+
328
+ If Nerviq helped you, consider giving it a ⭐ on [GitHub](https://github.com/nerviq/nerviq) — it helps others discover the project.
329
+
330
+ ## What Nerviq Is — and Isn't
331
+
332
+ **Best for:** Teams going from zero governance to a strong baseline — fast. If you're starting with AI coding agents or have a few platforms running without consistent configuration, Nerviq gets you to a governed setup quickly.
333
+
334
+ **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
+
336
+ **Strongest at:** Agent configuration, workflow governance, repo policy hygiene, cross-platform alignment, and setup standardization.
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.
339
+
340
+ **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
+
342
+ **Feature maturity:**
343
+
344
+ | Label | Meaning |
345
+ |-------|---------|
346
+ | `GA` | Stable, tested on real repos, safe for production use |
347
+ | `BETA` | Works but has limited real-world testing. API may change |
348
+ | `EXPERIMENTAL` | Early stage, static rules, results may vary |
349
+
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.