v0.2.2 · MVP

SpecCaster

Contract tests from your OpenAPI spec — generated, owned, and drift-protected. Zero config. One command. Runs in your CI.

Blog: why specs drift & how to catch it in CI · GitHub · npm

Get started GitHub

The problem it solves

Your API spec rotates. Your tests drift. Nobody notices until production does. Keeping hand-written documentation and assertion suites in sync is manual, boring work that everyone skips under pressure.

SpecCaster makes the spec the contract: it generates a node:test suite into your repo, and your CI fails the build whenever the committed suite falls out of sync with the spec.

You own the testsPlain committed node:test files. Extend them, don't fight a framework.
Drift = red buildspeccaster drift blocks PRs when spec and suite disagree.
Zero confignpx speccaster init. No server, no credentials, no SaaS dashboard.

Quickstart

npx speccaster demo                       # prove it in seconds
# ephemeral API + generated suite + drift demo, nothing written

npx speccaster init --spec openapi.yaml   # then your own suite
# writes speccaster/contract.test.js + .github/workflows/speccaster.yml

SPECCASTER_BASE_URL=http://localhost:8080/v1 \
  node --test speccaster/contract.test.js

Works with OpenAPI 3.0/3.1 (JSON or YAML). Node 18+. Exercised against the GitHub REST spec (815 paths) and the Swagger Petstore 3.0.4 spec.

In CI

# auto-generated workflow
- name: Regenerate + drift gate
  run: npx -y speccaster@latest drift --spec openapi.yaml --out speccaster/contract.test.js
- name: Run contract tests
  env:
    SPECCASTER_BASE_URL: ${{ secrets.SPECCASTER_BASE_URL }}
  run: node --test speccaster/contract.test.js

Status & pricing

This is an early MVP. Stars, installs and revenue are tracked publicly as they happen — nothing is asserted before it is real.