Quick start
Requires Node 24 or later.
Start any of the other seventeen by name, alone or next to the defaults. A service started alone listens on
4000:
127.0.0.1). Start prints each service URL, the API reference at http://localhost:3999/docs, a control token, and an inspector link. The Providers page lists all 28 by category, and each provider’s page shows how to point its SDK at the emulator.
CLI
Options
| Flag | Default | Description |
|---|---|---|
-p, —port | 4000 | Base port (auto-increments per service) |
—host | 127.0.0.1 | Listening address; use 0.0.0.0 to allow network access |
—single-port | off | Not supported: each service listens on its own port. See Configuration |
—console-port | base port − 1 | Port for the API reference at /docs and the control API |
—no-console | off | Do not open the console port |
-s, —service | the 11 defaults | Comma-separated services to enable |
—seed | auto-detect | Path to seed config (JSON or YAML) |
—base-url | none | Override the advertised base URL (supports template) |
—generated-secrets-file | none | Generate omitted service secrets and write them to a new owner-only JSON file |
—state | none (in memory) | Save state to a JSON file, sqlite:<path>, or libsql:// database and restore it
on the next start. See Saved state |
—reset-state | off | Ignore saved state, reseed from config, and overwrite it |
—watch | off | Reload on changes to imports and fixtures |
setfacl and getfacl from the acl package. The flag fails closed when access controls cannot be verified and is not supported on Windows.
The port can also be set via BASELINE_PORT or PORT environment variables.
For access from a container or another machine, use npx @deploybaseline/cli start --host 0.0.0.0. Set --base-url to a URL reachable by those clients when using OAuth redirects or other advertised URLs.
Local HTTPS
Baseline serves plain HTTP. For HTTPS URLs, put any reverse proxy in front of it and pass the public URL with--base-url (or BASELINE_BASE_URL). The {service} placeholder is replaced with each service name, so OAuth redirects and webhook URLs use the proxy address.
With Caddy and locally trusted certificates:
*.localhost resolves to the loopback address, so no hosts file entry is needed. mkcert with any other reverse proxy works the same way.
For any other proxy or domain:
Programmatic API
You can also use Baseline as a library in your tests. See the Programmatic API page forcreateEmulator, Vitest/Jest setup, and instance methods.
Where to go next
Providers
All 28 emulators by category, with behavior, seed config, and limits.
API reference
Every route each emulator serves, at
/docs on your machine while it runs.Configuration
Seed data, tokens, ports, and per-service options in
baseline.config.json, and validate to check it.Contributing
Run Baseline from source, add a provider, and how the checks work.