Open Source CLI Tool

Stop waiting for the Backend.
Start Building ASAP!

Contour reads your OpenAPI and Swagger specs and spins up a functional mock server with realistic data in seconds.

Built for developers who
are tired of waiting

Contour gives you a production-grade mock server that understands your API contract.

01

Schema-Aware Generation

Reads your OpenAPI types, formats, and enums to produce data that actually matches your contract. No more mismatched mocks.

02

Property Heuristics

Fields named email, phone, city produce realistic values. 40+ smart field-name patterns built in.

03

Stateful CRUD

In-memory store: POST creates, GET retrieves, PUT updates, DELETE removes. Full CRUD without a database.

04

Request Validation

POST, PUT, and PATCH bodies are validated against your schema. Invalid payloads get a proper 400 with error details.

05

Chaos Engineering

Simulate 500 errors, slow responses, and flaky connectivity. Test how your app handles the real world.

06

x-contour Extensions

Control array sizes, per-route delays, and deterministic seeding directly in your OpenAPI spec. Your contract, your rules.

One command. That's it!

Zero config files. Zero setup. Just your terminal ๐Ÿ˜

01

Install

Install Contour globally with npm or pnpm. One dependency, nothing else to configure.

$ npm install -g @trillionclues/contour
โœ” Installed successfully
$ contour start openapi.yaml
โฌก Contour
Shape your API mocks from OpenAPI specs
โœ“ Mock server running
โ†’ Local: http://localhost:3001
โ†’ Endpoints: 8
02

Point to your spec

Pass any OpenAPI spec โ€” local file or remote URL. Contour parses it, resolves references, and registers every endpoint.

03

Build against real responses

Your frontend gets type-safe, realistic responses instantly. Names, emails, phone numbers โ€” not John Doe.

$ curl http://localhost:3001/users
[
{
"name": "Sarah Chen",
"email": "sarah.chen@gmail.com",
"city": "San Francisco"
}
]

Get started in seconds

Install the CLI globally or locally and you're good to go ๐Ÿš€

$ npm install -g @trillionclues/contour

Commands

Command Description
contour start <spec> Start the mock server
contour start --stateful Enable in-memory CRUD persistence
contour start --deterministic Reproducible data for E2E tests
contour start --delay 200-500 Simulate network latency
contour start --error-rate 10 Random 500 failures
contour cache list List cached specs
contour cache clear Clear spec cache