REST API

Local JSON endpoints for audits, alignment, and catalog access.

Nerviq ships with a zero-dependency local HTTP server so dashboards, internal portals, scripts, and editor tooling can query the same audit engine without shelling out to the CLI.

Zero extra depsLocal-firstJSON responses

Start the Server

The local API mirrors the main Nerviq engine. Start it once, then call the endpoints from any process that can reach localhost.

GET
Transport model
Simple local endpoints for read-heavy workflows and dashboards.
3000
Default port
Override the port when you need to run multiple local services side by side.
JSON
Response format
Audit, harmony, and catalog endpoints all return machine-friendly JSON payloads.
bash
nerviq serve --port 3000

Endpoints

The current local server is intentionally small. It focuses on the high-value read APIs that teams most often embed.

PathMethodPurpose
/api/healthGETReturns status, version, and the total number of checks exposed by the catalog.
/api/audit?platform=claude&dir=.GETRuns a platform audit and returns the full structured result payload.
/api/harmony?dir=.GETReturns cross-platform harmony data for the repository path.
/api/catalogGETReturns the unified check catalog as JSON for UI or internal tooling use.

Request Examples

Use plain fetch, curl, or your preferred HTTP client. The server is designed to be easy to integrate into internal tooling.

Sanity probe

Health check

bash
curl http://localhost:3000/api/health
Platform result

Run an audit

bash
curl "http://localhost:3000/api/audit?platform=claude&dir=."

Response Examples

The payloads are structured so they can drive both human-readable UI and machine policy checks.

Server metadata

/api/health response

json
{
  "status": "ok",
  "version": "1.0.0",
  "checks": 2016
}
Audit payload

/api/audit response

json
{
  "platform": "claude",
  "score": 84,
  "passed": 196,
  "checkCount": 258,
  "topNextActions": [ ... ],
  "results": [ ... ]
}

Where It Fits

The REST API is best when Nerviq needs to become a service instead of just a command.

Use case

Internal portals

Show live repo scores, top actions, and platform drift directly inside your engineering enablement UI.

Use case

Editor tooling

Call the local server from companion extensions without teaching every extension how to parse CLI output.

Use case

Automation

Let local wrappers or internal automation call health, catalog, and audit endpoints through one stable JSON contract.