stacknext <command> --help for the installed version’s exact flags. All
commands run from a Next.js application directory unless stated otherwise.
stacknext --version and stacknext --help are also available.
Setup and run
stacknext init
Configure a project. Writes stacknext.config.json and generated
instrumentation.ts/.js only when absent; never overwrites user files.
stacknext dev
Start the loopback collector and dashboard, then run the app’s dev script.
dev writes .stacknext/run.json with mode 0600 and removes it on graceful
shutdown. Stop it with SIGINT/SIGTERM, not SIGKILL. Extra arguments are
forwarded to the app’s dev command.
stacknext status
Print the runtime, collector connection and current counts.
stacknext doctor
Check Node.js, Next.js, the App Router, config, instrumentation, adapters,
dashboard build, runtime file permissions and collector health.
Exit code is
1 when a check fails.
stacknext uninstall
Print a removal plan unless --yes is passed. See
remove StackNext.
Inspect the sample
stacknext coverage
Show what the current retention window observed. Evidence, not a score.
stacknext diagnose
List deterministic findings or show one finding.
stacknext export
Exports use mode
0600 and are redacted, but remain a full local trace dump.
Regression
stacknext capture
Run a test command and save correlated telemetry as a run.
A successful child with incomplete telemetry exits
3. See
regression testing.
stacknext runs
stacknext baseline
--name is required. Only a completed run can become a baseline. A normal save
never replaces an existing baseline; --overwrite is an explicit storage-layer
collision override, not a replace-by-name flow.
stacknext compare
Comparisons are report-only by default.
inconclusive is not a pass.
Snapshots
snapshots is an alias for snapshot. See snapshots.
Agents
stacknext mcp
Start the read-only stdio MCP server.
stacknext skill
See agent setup.
Exit codes
capture preserves the child command’s exit code. Invalid ids and invalid
configuration fail before storage is read or network calls are made.