Using it
In CI
slowship can gate a build: the exit code is 2 when the verdict is held, so a pipeline stops before a package that does more than it says reaches production.
#Exit codes
| Code | Means |
|---|---|
0 | Cleared to sail, or ready after a glance. Nothing is held. |
2 | Held in port. Something does more than it says. |
The nightly watch is the exception: it always exits cleanly and leaves the verdict in the report.
#Flags that suit CI
--packages-only: a CI machine has no coding agent, so skip skills and MCP servers.--no-model: most CI machines have no local model. Rules only, and the output says so.--json slowship.json: write everything found as JSON, to keep as a build artifact.--app dist/: also check the build you’re about to ship.
When output is piped, as it is in CI, slowship prints plain text by itself. --plain forces it anywhere.
#An example pipeline
A sketch for GitHub Actions. Install your dependencies with scripts off, so nothing runs before it’s been read, then let slowship read them:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci --ignore-scripts
- run: git clone --depth 1 https://github.com/nirajkhetre/slowship ../slowship && npm --prefix ../slowship install
- run: node ../slowship/bin/slowship.js . --packages-only --no-model --json slowship.jsonAdjust it to your own pipeline. slowship reads what’s installed in node_modules, so install first. Installing with --ignore-scripts means a package’s install script can’t run before slowship has read it.
#Clearing in CI
Clears are kept in slowship’s memory folder, which a fresh CI machine doesn’t have. Point SLOWSHIP_HOME at a folder you cache between runs if you want clears and memory to carry over. Clears stay tied to exact bytes, so a cached clear never covers changed code.