Skip to content

CLI: gate

The gate command is the definitive SHIP/NO_SHIP decision for your pipeline. It verifies an implementation against an ISL specification, computes a trust score, and returns exit code 0 (SHIP) or 1 (NO_SHIP). Use it in CI to block unverified code from shipping.

Usage

Terminal window
shipgate gate <spec> -i <impl> [options]

The spec is the path to an ISL file; the implementation is the file or directory containing code that implements the spec.

Options

FlagDescription
-i, --impl <file>Required. Implementation file or directory to verify
-t, --threshold <score>Minimum trust score to SHIP (default: 95)
-o, --output <dir>Output directory for evidence bundle (default: current directory)
--ciCI mode: minimal output, exit code only
--verboseVerbose output
--format <format>Output format: pretty, json, quiet
--skip-policySkip organization policy (.shipgate.policy.yml).
--policy-file <path>Explicit policy YAML path (overrides auto-detect).
--policy-profile <profile>strict, standard, or lenient.
--policy-lenientIf policy enforcement throws (not validation violations), continue without failing. Default is fail-closed (NO_SHIP) so CI cannot silently skip policy.

Examples

Basic gate

Terminal window
shipgate gate user-service.isl --impl ./src/user-service.ts

Custom threshold

Terminal window
shipgate gate user-service.isl --impl ./src/user-service.ts --threshold 80

CI usage

Terminal window
# Minimal output; rely on exit code (0 = SHIP, 1 = NO_SHIP)
shipgate gate specs/auth.isl --impl src/ --ci
# With minimum score
shipgate gate specs/auth.isl --impl src/ --ci --threshold 90

JSON output

Terminal window
shipgate gate user-service.isl --impl ./src/user-service.ts --format json

Output

Pretty output (default)

┌─────────────────────────────┐
│ Verdict: SHIP │
│ Trust Score: 100/100 │
│ Confidence: 95% │
│ Duration: 1.2s │
└─────────────────────────────┘

Exit code 0 means SHIP; exit code 1 means NO_SHIP. Use this in your CI pipeline.

Exit codes

After a successful invocation, shipgate gate exits with result.exitCode from the gate engine — typically 0 (SHIP) or 1 (NO_SHIP).

The CLI may also exit with:

CodeMeaning
0SHIP — verification passed, score meets threshold
1NO_SHIP — verification failed or score below threshold
2Usage error (e.g. missing --impl, unknown option) — see global exit handling
3Internal error (rare)

For a Tier-1 summary across commands, see Exit codes (Tier-1).

See also