Carbon runs a stateful replica of your API.
Run carbon emulate --from spec.yaml --port 8787 and get a deterministic local server for development and CI. POSTs create records, GETs return them, and snapshots reset the runtime between tests.
Carbon compiles OpenAPI, AsyncAPI, GraphQL, HAR, Postman, protobuf descriptors, and gRPC service contracts into the same stateful HTTP runtime.
Integration tests should be fast without becoming shallow.
Shared sandboxes drift, static fixtures lose state, and third-party latency slows feedback right when teams need confidence.
Your integration suite hits Stripe test mode and takes 4 minutes
Every CI run waits on someone else’s sandbox. Network variance turns ordinary integration coverage into slow feedback.
A coworker’s migration corrupts the shared sandbox mid-run
One team seeds fixtures, another resets them, and your PR depends on shared state nobody meant to change.
Your mock returns [] for a resource you just POSTed
Static examples are useful for smoke tests, but they do not model read-after-write flows or destructive updates.
Offline means the tests don’t run
A local test suite should not depend on a remote API being reachable before developers can ship.
Reads your spec. Runs a real server. Remembers what you did.
Carbon parses your OpenAPI, AsyncAPI, GraphQL, HAR, Postman, protobuf, or gRPC contract, infers the resource model behind it, and boots an HTTP server with journaling, snapshots, and injectable failure modes.
POST creates a record. GET returns it.
Carbon infers the resource model from your spec and runs a real HTTP server on localhost:8787 that mutates in-memory like a real backend.
No AI on the request path
Inference happens once at ingest. Every subsequent request is deterministic, offline, and answered in microseconds.
Snapshot, rewind, replay
Freeze the entire server state to JSON, restore it before each test, and rewind the journal to undo any mutation by sequence number.
Same URL in your laptop and in CI
Boot the emulator in dev, in Docker, or in GitHub Actions. The upstream API is never called after `carbon ingest` runs.
A compiler pipeline.
Every input flows through the same six stages. AI runs in ingestion only.
- 01IngestionOpenAPI · AsyncAPI · Protobuf · gRPC · GraphQL · HAR · Postman · Live traffic
- 02ParserNormalizes every input into one intermediate representation
- 03Behavior graphResources, relationships, transitions, side effects
- 04State engineDeterministic CRUD · snapshots · rollback · persistence
- 05Runtime shellFastify · plugins · auth · logging · rate limits
- 06Local endpointhttp://localhost:8787 · reference target under 1s
Four commands.
Your application only needs a different base URL.
- 01
Point
carbon record https://api.stripe.comGive Carbon an OpenAPI spec, AsyncAPI document, protobuf service, Postman collection, HAR file, GraphQL schema, or URL to observe.
- 02
Analyze
carbon inspectThe ingestion pipeline builds an intermediate representation and a behavior graph — resources, relationships, transitions.
- 03
Emulate
carbon emulate --port 8787A deterministic Fastify runtime boots on localhost. Swap your base URL and run without the upstream API.
- 04
Snapshot
carbon snapshot save "seeded-checkout"Freeze state, branch it, and replay it so each pull request can use the same setup.
Install from the repo, then run one command.
The CLI prints every available command the first time it runs, so a new install is immediately discoverable.
curl -fsSL https://raw.githubusercontent.com/TaxCollector23/carbon/master/install.sh | shcarbonPrint the welcome screen and command list.carbon initCreate carbon.config.ts in the current directory.carbon loginAttach the CLI to a dashboard account or API key.carbon record <url>Capture real request and response traffic.carbon ingest <spec>Parse OpenAPI, AsyncAPI, protobuf, gRPC, Postman, HAR, or GraphQL.carbon emulate --from <spec>Boot the deterministic local runtime.carbon inspectExplore the resource graph in your terminal.carbon snapshot save <name>Freeze state for reproducible tests.carbon replay <recording>Replay captured traffic against an emulator or upstream.Drive the runtime from a test file.
Reset between tests. Snapshot between checkpoints. Assert on state.
import { carbon } from '@carbon/sdk';
const replica = await carbon.emulate({
from: 'https://api.stripe.com',
port: 8787,
snapshot: 'seeded-checkout',
});
process.env.STRIPE_API_BASE = replica.url;
// your app talks to Stripe as usual — locally, deterministically
await replica.state.reset();
await replica.snapshot.save('after-refund');
Anything with a schema, a spec, or a wire.
Each source lands in the same intermediate representation, so behavior stays consistent after import.
OpenAPI 3.x
Full schema walk with $ref resolution, security schemes, examples.
Swagger 2.0
Read through the same OpenAPI adapter.
HAR (HTTP Archive)
Endpoint templates inferred from observed exchanges; id-like params detected.
Postman v2.1
Collections import as endpoints; folders map to tags.
GraphQL SDL
Types → resources, queries → get/list, mutations → create/update/delete.
Live traffic
carbon record starts an HTTP proxy that captures and redacts.
gRPC / Protobuf
Messages map to resources and service RPCs map to callable runtime endpoints.
AsyncAPI
Channels map to deterministic runtime actions for event-driven API flows.
What each option gives you.
| Capability | Carbon | Mock libs | Shared staging | Postman / Insomnia |
|---|---|---|---|---|
| Stateful responses | ||||
| Works offline | ||||
| Deterministic replay | ||||
| Understands relationships | ||||
| Webhook simulation | ||||
| Snapshot / rollback | ||||
| Zero rate limits | ||||
| No shared blast radius |
Everything a real backend does. None of the network.
Mutate resources, force failures, replay latency, and inspect webhook deliveries — all against a server running on your laptop.
Persists state
Every POST, PUT, PATCH, and DELETE is stored. Later GETs return what you actually wrote — not a canned example.
Freezes with snapshots
Freezes the whole server state to JSON, then restores it before each test in a millisecond. Rewind mid-run too.
Forces failures (chaos)
One flag forces timeouts, 5xx, rate limits, or partial writes. Exercise the error paths you never test on staging.
Records real traffic
Point Carbon at a real API in record mode, hit it once, and replay the traffic offline forever after.
Measured proof, not comparison theater.
The benchmark suite checks the thing Carbon has to get right: writes change future reads, snapshots restore quickly, and the runtime stays fast enough for CI.
| Metric | Latest run | What it means |
|---|---|---|
| Stateful consistency | 6/6 checks | create, read-after-create, update, read-after-update, delete, read-after-delete |
| 10,000 row snapshot restore | 7.90 ms p50 | 13.12 ms p95 from the committed snapshot harness |
| HTTP runtime throughput | 43,015 req/s | 100 connections for 30s, 1,290,418 2xx responses, 0 non-2xx |
| Memory after 1,000 writes | 32.8 MB heap | 80.3 MB RSS growth in 297.0 ms |
Harness in benchmarks/, methodology committed to the repo. Latest run Sun, 16 Aug 2026 05:06:33 GMT on v26.7.0.
Or point Carbon at your prod API for an afternoon.
It records real requests + responses, infers the resource model from observed behavior, and produces an emulator that covers the edge cases your team already hits.
Records what actually happened
A local HTTP proxy captures every request + response, redacts auth headers by default, and writes an atomic recording you can commit.
Infers the real resource model
Carbon derives resources, relationships, and pagination shape from observed traffic, including cases the written spec does not cover.
Boots deterministically from the capture
One `carbon emulate --from` and you have a stateful replica that answers in microseconds, offline, forever.
# 1. Point Carbon at your upstream. Traffic flows through
# a local proxy; requests + responses are captured.
carbon record --target https://api.stripe.com \
--out ./stripe-capture
# ...go build the integration, exercise the edge cases...
# 2. Turn the capture into a deterministic local emulator.
carbon emulate --from ./stripe-capture
# Same URL, in your laptop and in CI. No spec required.
# Auth headers redacted by default — safe to commit.Get Carbon
A native desktop app, a single-binary CLI, and language clients — same stateful runtime underneath.
Desktop app
Run emulators and watch live state from a native window. The CLI ships inside the app — no Node or npm required. macOS (Apple silicon) today; Windows and Linux from source.
The desktop app is an unsigned early beta — right-click → Open to bypass Gatekeeper.
Command line
One command to install on macOS or Linux — no runtime dependencies.
Language clients
Typed clients for the control-plane API, generated from the same schema.
pip install carbon-clientnpm i @carbon/clientFull sync + async surfaces for every route, with cursor pagination.
Free forever for solo devs. Paid the moment your emulator risks going stale.
The CLI, all 8 adapters, local snapshots, and chaos stay free forever. Pro adds drift detection so your captured traffic keeps matching production. Team and Enterprise layer shared state and compliance on top.
Free / Developer
The complete local runtime for individual development and CI smoke coverage.
- CLI + local runtime — unlimited
- All 8 adapters: OpenAPI, AsyncAPI, gRPC, protobuf, GraphQL, HAR, Postman, traffic
- Local snapshots (`.carbon/snapshots`) — unlimited
- Chaos plugins: latency + error injection
- AI-assisted inference — capped at 10 ingests / month
- Community support (GitHub issues)
Pro
Most popularScheduled drift detection, unlimited AI-assisted ingest, and a versioned snapshot library for one developer.
- Everything in Free
- Drift detection — scheduled replay of captured traffic against the real upstream
- Unlimited AI-assisted ingest (best-available model)
- Extended chaos presets — saved, reusable, matrix-runnable
- Snapshot library — versioned, tagged, shareable across your own machines
- Optional cloud sync when you want it (single-seat)
- 90-day snapshot / event retention
- Email support (business hours)
Team / Business
Shared projects, team permissions, SSO, audit history, and usage controls for engineering groups.
- Everything in Pro
- Shared cloud-hosted projects & snapshot sync (`carbon snapshot push/pull`)
- Team dashboard: projects, runs, activity feed, member roles
- Org-wide quota + spend controls
- SSO (SAML, OIDC)
- Audit log — 90-day view
- Priority email + shared Slack channel
Enterprise
Self-hosting, SCIM, SIEM export, custom retention, and support for regulated environments.
- Everything in Team
- SCIM provisioning
- Full audit log + SIEM webhook + compliance export
- Configurable / unlimited retention
- Self-hosted control plane
- Bring-your-own LLM key for AI inference
- AI-quality report artifact for compliance sign-off
- Dedicated Slack + SLA
Compare features
Full breakdown in the docs| Capability | Free | Pro | Team | Enterprise |
|---|---|---|---|---|
| CLI + local runtime, all 8 adapters | Unlimited | Unlimited | Unlimited | Unlimited |
| Local JSON snapshots | Unlimited | Unlimited + versioned library | Unlimited + versioned library | Unlimited + versioned library |
| Chaos (error + latency injection) | Full | Full + saved presets | Full + saved presets | Full + saved presets |
| Drift detection against upstream | — | Scheduled replay + email | Scheduled + team dashboard | Scheduled + Slack / webhook alerts |
| AI-assisted resource / relationship inference | 10 ingests / month | Unlimited | Unlimited | Unlimited + BYO LLM key |
| Cloud-hosted shared project & snapshot sync | — | Single-seat | Included | Included |
| Dashboard, activity feed, member roles | — | — | Included | Included + custom roles |
| Snapshot / event retention | 7-day local cache | 90 days | 90 days | Configurable / unlimited |
| Audit log | — | — | 90-day view | Full export + SIEM webhook |
| SSO | — | — | SAML + OIDC | SAML + OIDC |
| SCIM provisioning | — | — | — | Included |
| Self-hosted control plane | — | — | — | Included |
| Support | GitHub issues | Email, business hours | Priority email + shared Slack | Dedicated Slack + SLA |
Questions, answered.
Everything a first-time user tends to ask — grouped by scope so you can skim the parts that matter for you.
A CLI + runtime that turns any API spec (OpenAPI, GraphQL SDL, Postman, HAR, protobuf, AsyncAPI) into a stateful local replica you can develop and test against. If you POST /customers to Carbon, the next GET /customers/:id returns what you just created — it is not a canned mock.
Those tools return scripted responses. Carbon runs a real state engine, so writes affect reads, relationships between resources are enforced, and snapshots freeze a whole scenario for reuse across a test suite or a whole team.
Yes. Once ingestion produces the behavior graph, request handling is pure code against the state engine — no AI or network on the request path.
OpenAPI 3.x, Swagger 2.0, AsyncAPI, protobuf, gRPC service declarations, GraphQL SDL, Postman v2.1 collections, HAR files, and observed traffic captured via `carbon record`.
No. Everything the CLI does locally — `init`, `ingest`, `emulate`, `snapshot`, `record`, `replay` — works with zero credentials. An account only matters when you want cloud snapshot sync, dashboard, team roles, or the audit log.
No. `carbon record` proxies traffic once to capture it (on 127.0.0.1, with auth headers redacted by default). After that the runtime is entirely local. Opt-in anonymous telemetry (`CARBON_TELEMETRY=1`) records command name + success only.
Round 18 fixed the two common causes: a port-in-use crash that printed nothing, and a Fastify boot pause that looked like a freeze. `carbon emulate` now preflights the port, prints a `Starting emulator…` line immediately, and hard-times-out at 20s with a friendly error.
Device-code flow, exactly like `gh auth login`. `carbon login` opens the dashboard at `/cli-auth/<sessionId>` in your browser; you sign in with Better Auth (email/password or SSO for enterprise), approve the CLI, and the poll picks up the minted API key. The whole thing takes about 30 seconds.
No. Self-host it with `docker compose -f docker-compose.selfhost.yml up` — bundles Postgres, Redis, api, dashboard, and a one-shot migrate sidecar. You keep everything on your own infra.
OIDC is live today via the sign-in page's email-domain match. SAML is captured in the SSO provider CRUD but the sign-in shim currently 501s for SAML — the full SAML flow lands when the Better Auth SSO plugin ships.
The parser turns SDL types into resources and Query/Mutation fields into endpoints. It also emits REST shims at `/rest/<plural>` so GraphQL and REST clients share the same state. Subscriptions are recognized but not yet streamed — that's on the roadmap.
The emulator exposes `/__carbon/state/stream` as a WebSocket for live mutation frames — the dashboard's State section renders this in real time, and the `carbon watch` CLI tails it. The control-plane audit feed also streams over SSE at `/v1/events/stream`.
The runtime engine is in-memory by default. `carbon snapshot save/load` freezes and restores it to disk (local) or the cloud (with an account). A mutation journal lets you `rewind` / `forward` through history without a full restore.