Serve = local HTTP + OpenAPI
nerviq serve --port 3000Use nerviq serve for dashboards, wrappers, scripts, and non-Node or language-neutral consumers that want a small local JSON API.
Nerviq now publishes a compact integration surface so external dashboards, bots, pipelines, and internal developer tooling can bind to explicit contracts instead of scraping terminal output.
The goal is simple: if another system needs Nerviq data, it should have a stable place to look and a clear contract to follow.
| Surface | Entry point | Why it exists |
|---|---|---|
| OpenAPI | /api/openapi.json | Use the live local serve contract for generated clients, Swagger import, and internal tools. |
| MCP transport | nerviq-mcp | Register the separate stdio JSON-RPC server when an MCP host expects tools over stdin/stdout. |
| Webhook event | contracts/audit-webhook-event.schema.json | Bind generic webhook consumers to a stable JSON event instead of scraping CLI text. |
| CI patterns | docs/ci-integration.md | Use threshold gates, PR drift gates, and fleet rollup artifacts across CI providers. |
| CI output formats | --format=markdown|junit|csv | Emit PR-comment markdown, Jenkins-compatible JUnit XML, or RFC 4180 CSV for any CI surface or reporting consumer. |
| SDK examples | sdk/README.md | Use stable programmatic surfaces when the CLI is not enough for your workflow. |
Nerviq exposes two machine-facing transports. The important thing is to choose the one your integration runtime actually expects.
nerviq serve --port 3000Use nerviq serve for dashboards, wrappers, scripts, and non-Node or language-neutral consumers that want a small local JSON API.
{
"mcpServers": {
"nerviq": {
"command": "npx",
"args": ["-y", "-p", "@nerviq/cli", "nerviq-mcp"]
}
}
}Use nerviq-mcp when the host expects Model Context Protocol over stdin/stdout. MCP hosts should register this binary, not the HTTP endpoint.
Use the local HTTP surface when you want dashboards, wrappers, or internal tools to query the Nerviq engine without spawning and parsing the CLI.
nerviq serve --port 3000curl http://127.0.0.1:3000/api/openapi.json/api/openapi.json for the live contract.
/api/health for local readiness checks.
/api/audit for single-repo audit runs.
/api/harmony for cross-platform drift analysis.
/api/catalog for the merged check dictionary.
nerviq serve is the local HTTP API surface. If an MCP host expects stdio JSON-RPC, register nerviq-mcp instead.When audit results are sent to a generic HTTP webhook, Nerviq now emits a stable event envelope with backward-compatible summary fields plus explicit integration metadata.
npx @nerviq/cli audit \
--webhook https://ops.example.com/nerviq/audit \
--webhook-header "Authorization: Bearer $NERVIQ_WEBHOOK_TOKEN" \
--webhook-retries 4The event name is nerviq.audit.completed.
schemaVersion lets new consumers pin contract expectations.
Older consumers still receive top-level platform, score, passed, failed, and results.
New consumers should prefer the nested data and meta blocks.
{
"event": "nerviq.audit.completed",
"schemaVersion": "1.0",
"generatedAt": "2026-04-09T12:00:00.000Z",
"platform": "claude",
"score": 84,
"passed": 196,
"failed": 34,
"results": [],
"data": {
"platform": "claude",
"score": 84,
"scoreType": "live-audit-score",
"checkCount": 258,
"topNextActions": [],
"quickWins": [],
"scoreCoaching": {
"currentScore": 84,
"nextMilestone": 90
}
},
"meta": {
"cliVersion": "1.30.0",
"source": "nerviq-cli",
"webhookFormat": "generic-audit-event"
}
}Nerviq's CI story now has three clear patterns: whole-repo score gates, PR drift gates, and multi-repo fleet artifacts.
npx @nerviq/cli audit --threshold 60Use this when the whole repository score is your release bar.
npx @nerviq/cli audit --diff-only --drift-mode ci --threshold 60Use this when you want PRs to compare against a managed baseline instead of only checking the full repo state.
npx @nerviq/cli org scan ./app ./api ./infra --json --out nerviq-fleet.jsonUse this when one pipeline needs an org-wide rollup with fleet semantics and policy coverage.
Nerviq audit now emits three machine-readable formats so the CLI plugs straight into the standard CI surfaces without text-scraping.
npx @nerviq/cli audit --format=markdown --out audit.mdGitHub-flavoured markdown with score badge, top-5 next-actions checklist, and a collapsible all-failed-checks table. Post as a PR comment from any GitHub Action.
npx @nerviq/cli audit --format=junit --out junit.xmlJenkins-compatible JUnit XML. Works out of the box with GitHub Actions test reporter, GitLab JUnit reporter, and Jenkins JUnit plugin. One <testsuite> per check category.
npx @nerviq/cli audit --format=csv --out audit.csvRFC 4180 CSV, one row per check with key,id,name,category,rating,severity,passed,file,line,sourceUrl,fix. Ingest into any spreadsheet, data warehouse, or dashboard.
Use the SDK when you are already inside a Node toolchain. Use serve when you need a process boundary or a language-neutral integration surface.
audit, harmonyAudit, detectPlatforms, and getCatalog are the stable programmatic surfaces.
If your integration already lives inside a Node service or CLI, the SDK is usually the shortest path.
Use nerviq serve when you want local dashboards, wrapper services, or non-Node consumers to speak to Nerviq over a small JSON surface.
The current HTTP layer is intentionally compact so the contract stays legible and stable.
Nerviq does not unblock every marketplace or IDE surface the moment a prototype exists. First-tier distribution should amplify trust, not create it artificially.