AuditResult
Includes score, passed count, check count, per-check results, category scores, quick wins, and top-next-actions for one selected platform.
The SDK is the cleanest way to bring Nerviq into internal developer platforms, CI jobs, onboarding portals, or agent-control planes. It wraps the main audit, harmony, and synergy primitives with a stable programmatic interface.
The SDK ships as a standalone package so product teams can call Nerviq without shelling out to the CLI.
npm i @nerviq/sdkEvery exported function is built around a practical operator question: what is installed, what is broken, what drifts, and which platform should do the next piece of work?
| Export | What it returns |
|---|---|
audit(dir, platform) | Run a platform audit and return score, findings, category scores, and next actions. |
harmonyAudit(dir) | Generate cross-platform alignment data and drift-oriented recommendations. |
synergyReport(dir) | Return multi-platform lift analysis, routing hints, and a rendered report. |
detectPlatforms(dir) | Infer which agent platforms are active in a repository. |
getCatalog() | Return the full unified check catalog with metadata such as sourceUrl and confidence. |
routeTask(description, platforms) | Recommend the best platform or platform mix for a task description. |
A simple audit can be one function call. Nerviq returns structured JSON-friendly results, so you can feed them straight into dashboards or policy gates.
const { audit, harmonyAudit } = require("@nerviq/sdk");
const auditResult = await audit(".", "claude");
console.log(auditResult.score);
const harmony = await harmonyAudit(".");
console.log(harmony.alignmentScore);The package exposes type definitions for the top-level exports, so TypeScript users can model audit and routing flows without writing custom interfaces first.
import { audit, routeTask } from "@nerviq/sdk";
const result = await audit(".", "codex");
const route = await routeTask("Review trust boundaries and MCP posture", ["claude", "codex", "cursor"] );
console.log(result.results.length, route.recommendedPlatform);At a minimum, teams usually wire the SDK into one of three workflows: quality gates, cross-platform reporting, or task-routing control planes.
Includes score, passed count, check count, per-check results, category scores, quick wins, and top-next-actions for one selected platform.
Includes alignment score, drift signals, canonical model data, and synchronization advice across the platforms Nerviq detects in the repo.
Includes recommended platform, rationale, companion platforms, and a confidence score for why that routing choice makes sense for the task.