CLI: next
The next command targets Next.js projects using the App Router (app/ or src/app/). It inventories route modules, compares process.env usage under the app to tracked .env* files, and runs the specless authoritative gate (security-style checks). Use it in CI for a focused merge gate without maintaining an ISL spec.
Usage
shipgate next [path] [options]path defaults to the current directory and should be the Next.js app root (where package.json lives).
Options
| Flag | Description |
|---|---|
--strict | Enterprise-style gate thresholds (stricter than dev defaults). |
--strict-env | NO_SHIP if env vars are used under app/ (or middleware) but not listed in any .env* file at the app root. |
--audit | Include dependency audit signals in the specless gate. |
--no-provenance | Skip the optional AI/human line sample (faster). |
--evidence-out <path> | Write golden-path JSON evidence (includes $schema for validation). |
--summary-out <path> | Write Markdown summary (blockers + warnings); good for PR comments. |
--format <format> | pretty (default), json, or quiet (minimal logs; use in CI). |
Configuration file (optional), merged with flags using OR semantics (true from either source wins):
.shipgate/next.yml at the app root:
version: 1strict: falsestrict_env: falseaudit: falseExamples
Local pretty output
shipgate nextshipgate next ./apps/web --strictCI: quiet + artifacts
shipgate next . --format quiet \ --evidence-out .shipgate/shipgate-next-evidence.json \ --summary-out .shipgate/shipgate-next-summary.mdEvidence is written on every run when these flags are set, including setup failures (missing package.json, not a Next app), so dashboards and PR comments always get a machine-readable record.
JSON result on stdout
shipgate next --format jsonJSON Schema
The evidence file is described by golden-path-evidence.schema.json, shipped in the shipgate npm package under schemas/. The JSON document includes a $schema URI on unpkg, pinned to the installed package version (so validators match the tarball you run).
Human-readable Markdown from --summary-out is generated only from the same JSON model (no second code path). Field semantics, schemaVersion, and migration notes: Evidence export spec, versioning.
See also: Golden path example workflow (copy into .github/workflows/).
Exit codes
| Code | Meaning |
|---|---|
0 | SHIP — gate passed |
1 | NO_SHIP — failed gate, setup error, or artifact write failure |
Same convention as other ShipGate CLI commands that use ISL_ERROR for failure.
See also
- CLI: gate — spec-based SHIP/NO_SHIP
- CLI: verify — full verification against ISL specs
- Specless mode