$ npx @deploybaseline/cli
baseline
github http://localhost:4001
google http://localhost:4002
slack http://localhost:4003
apple http://localhost:4004
microsoft http://localhost:4005
okta http://localhost:4006
resend http://localhost:4008
stripe http://localhost:4009
clerk http://localhost:4010
linear http://localhost:4011
twilio http://localhost:4012
API reference: http://localhost:3999/docs (every service above)
Control API: http://localhost:3999/_baseline/control (also on any service port)
Token: W7f_nW_UTAtbvfnv6NldeGCMYNaVoWeb (header X-Baseline-Control-Token)
Inspector: http://localhost:3999/_baseline/control/inspector?token=... (faults, state, snapshots)
Ready.
{
"$schema": "...",
"identities": [
{ "name": "Ada Lovelace", "email": "ada@example.com" }
],
"github": {
"users": [{ "login": "octocat", "nmae": "The Octocat" }],
"repos": [{ "owner": "octocat", "name": "hello-world", "auto_init": true }]
},
"stripe": {
"version": "^0.14",
"faults": { "profile": "degraded" }
},
"state": ".baseline/state.json"
}
$ npx @deploybaseline/cli validate
baseline.config.json:7:37
github.users[0].nmae: unknown property "nmae"
fix: Did you mean "name"?
$ npx @deploybaseline/cli snapshot save before-checkout
Saved snapshot before-checkout (stripe, github, slack; 11.7 KB)
# run the checkout flow, break things, look around...
$ npx @deploybaseline/cli snapshot list
NAME SAVED SIZE SERVICES
before-checkout 2026-10-22T20:13:04.203Z 11.7 KB stripe, github, slack
$ npx @deploybaseline/cli snapshot restore before-checkout
Restored snapshot before-checkout: stripe, github, slack
$ npx @deploybaseline/cli snapshot export --redact -o share.json
$ curl -X POST localhost:3999/_baseline/faults \
-H "X-Baseline-Control-Token: $TOKEN" -H "Content-Type: application/json" \
-d '{"service":"stripe","faults":{"profile":"throttled"}}'
{"service":"stripe","faults":{"profile":"throttled","rules":[{"match":"*","rate":0.3,
"response":{"status":429,"headers":{"Retry-After":"1"}, ...}}]}}
$ curl -i -u sk_test_123: localhost:4009/v1/customers
HTTP/1.1 429 Too Many Requests
retry-after: 1
x-baseline-fault: injected
$ curl -i -u sk_test_123: localhost:4009/v1/customers
HTTP/1.1 200 OK
$ curl -X DELETE -H "X-Baseline-Control-Token: $TOKEN" \
localhost:3999/_baseline/faults/stripe
{"service":"stripe","faults":{"rules":[]}}
import { createEmulator, type Emulator } from '@deploybaseline/cli'
import { Octokit } from '@octokit/rest'
let github: Emulator
beforeAll(async () => {
github = await createEmulator({ service: 'github', port: 4001 })
})
afterEach(() => github.reset())
afterAll(() => github.close())
test('creates a repository', async () => {
const octokit = new Octokit({ baseUrl: github.url, auth: 'test_token_admin' })
const { data } = await octokit.rest.repos.createForAuthenticatedUser({ name: 'hello-world' })
expect(data.full_name).toBe('admin/hello-world')
})