CLI Reference
nolapse provides five top-level commands. Each is documented below with its synopsis, flags, and example output.
nolapse init
Section titled “nolapse init”Measure current coverage and write an initial baseline.
init — synopsis
Section titled “init — synopsis”nolapse init [--repo <path>] [--lang go|python] [--force]init — flags
Section titled “init — flags”| Flag | Type | Default | Description |
|---|---|---|---|
--repo | string | . (cwd) | Path to the repository root. |
--lang | string | auto-detect | Language runner to use: go or python. |
--force | bool | false | Overwrite an existing baseline.md and nolapse.yaml. |
init — output files
Section titled “init — output files”.audit/coverage/baseline.md— baseline header withcoverage,timestamp, andcommit.nolapse.yaml— configuration file with threshold defaults.
init — exit codes
Section titled “init — exit codes”| Code | Meaning |
|---|---|
0 | Baseline written successfully. |
| Non-zero | Error: git not available, test runner failed, or --force not passed when baseline exists. |
init — example
Section titled “init — example”nolapse init --repo . --lang goInitialized baseline: .audit/coverage/baseline.mdcoverage: 82.50% commit: a1b2c3d4... timestamp: 2026-01-15T09:00:00Znolapse run
Section titled “nolapse run”Measure current coverage, compare against the baseline, and enforce thresholds.
run — synopsis
Section titled “run — synopsis”nolapse run [--repo <path>] [--lang go|python] [--warn-threshold N] [--fail-threshold N] [--strict-mode]run — flags
Section titled “run — flags”| Flag | Type | Default | Description |
|---|---|---|---|
--repo | string | . (cwd) | Path to the repository root. |
--lang | string | from nolapse.yaml | Language runner to use: go or python. |
--warn-threshold | float | 0.5 | Coverage drop (percentage points) that triggers a warn outcome. |
--fail-threshold | float | 1.0 | Coverage drop (percentage points) that triggers a fail outcome. |
--strict-mode | bool | false | Promote warn → exit code 1. |
Flags override the corresponding values in nolapse.yaml.
run — threshold logic
Section titled “run — threshold logic”| Condition | Outcome | Exit code |
|---|---|---|
delta > -warn_threshold | pass | 0 |
delta > -fail_threshold (and not pass) | warn | 0 (or 1 with --strict-mode) |
delta ≤ -fail_threshold | fail | 1 |
run — exit codes
Section titled “run — exit codes”| Code | Meaning |
|---|---|
0 | Pass or warn outcome. |
1 | Fail outcome (regression exceeds fail threshold) or warn with --strict-mode. |
| Non-zero | Error: missing baseline, git error, test runner crash. |
run — example
Section titled “run — example”nolapse run --repo .file baseline coverage PR coverage delta outcome. 80.00% 82.30% +2.30% pass
outcome: pass delta: +2.30 coverage: 82.30% baseline: 80.00% outcome: passwarn_threshold: 0.5 fail_threshold: 1.0Coverage delta: +2.30% (threshold: 0.5%) passnolapse baseline update
Section titled “nolapse baseline update”Append a new entry to the baseline audit trail and promote it as the active baseline.
baseline update — synopsis
Section titled “baseline update — synopsis”nolapse baseline update [--repo <path>]baseline update — flags
Section titled “baseline update — flags”| Flag | Type | Default | Description |
|---|---|---|---|
--repo | string | . (cwd) | Path to the repository root. |
baseline update — behavior
Section titled “baseline update — behavior”-
Runs the test suite to measure current coverage.
-
Appends a pipe-delimited line to
.audit/coverage/baseline.md:2026-02-01T14:22:00Z | 83.10% | b2c3d4e5f6... -
Updates the header block (
coverage:,timestamp:,commit:) to the new values. -
Creates a git commit with the updated file.
baseline update — exit codes
Section titled “baseline update — exit codes”| Code | Meaning |
|---|---|
0 | Baseline updated and committed. |
| Non-zero | Error: git not available, test runner failed, nothing to commit. |
baseline update — example
Section titled “baseline update — example”nolapse baseline update --repo .Baseline updated: 82.50% → 83.10%Committed: .audit/coverage/baseline.mdnolapse audit list
Section titled “nolapse audit list”Show the last 10 baseline update entries from the audit trail.
audit list — synopsis
Section titled “audit list — synopsis”nolapse audit list [--repo <path>]audit list — flags
Section titled “audit list — flags”| Flag | Type | Default | Description |
|---|---|---|---|
--repo | string | . (cwd) | Path to the repository root. |
audit list — exit codes
Section titled “audit list — exit codes”| Code | Meaning |
|---|---|
0 | List printed successfully. |
| Non-zero | Error: baseline file not found or unreadable. |
audit list — example
Section titled “audit list — example”nolapse audit list --repo .TIMESTAMP COVERAGE COMMIT2026-02-15T11:05:00Z 84.00% c3d4e5f6...2026-02-01T14:22:00Z 83.10% b2c3d4e5...2026-01-15T09:00:00Z 82.50% a1b2c3d4...nolapse version
Section titled “nolapse version”Print the nolapse CLI version string.
version — synopsis
Section titled “version — synopsis”nolapse versionNo flags accepted.
version — exit codes
Section titled “version — exit codes”| Code | Meaning |
|---|---|
0 | Version printed successfully. |
version — example
Section titled “version — example”nolapse versionnolapse v0.1.0nolapse.yaml
Section titled “nolapse.yaml”The configuration file written by nolapse init and read by nolapse run.
lang: go # go | pythonwarn_threshold: -1.0 # negative float, percentage pointsfail_threshold: -5.0 # negative float, percentage pointsstrict_mode: false # bool| Key | Type | Description |
|---|---|---|
lang | string | Language runner: go or python. |
warn_threshold | float | Warn when delta drops below this value (expressed as a negative number). |
fail_threshold | float | Fail when delta drops to or below this value (expressed as a negative number). |
strict_mode | bool | When true, warn outcomes exit with code 1. |
Command-line flags always override nolapse.yaml values for a single invocation.
Environment variables
Section titled “Environment variables”| Variable | Description |
|---|---|
NOLAPSE_RUNNER_PATH | Absolute path to coverage_runner.py. Overrides the default lookup for Python projects. |