Skip to content

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.

0
network calls to the real API during tests
6/6
stateful consistency checks passed
7.9 ms
p50 restore for a 10k-row snapshot
carbon emulate --port 8787example output
~/workspace · carbon
$ 
OpenAPIAsyncAPIgRPC descriptorsProtobufHARGraphQL

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.

01

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.

02

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.

03

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.

04

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.

POST
/customers
creates state
GET
/customers/:id
reads mutation
SNAPSHOT
seeded-checkout
freezes graph
REPLAY
ci/pr-184
same result

A compiler pipeline.

Every input flows through the same six stages. AI runs in ingestion only.

  1. 01
    Ingestion
    OpenAPI · AsyncAPI · Protobuf · gRPC · GraphQL · HAR · Postman · Live traffic
  2. 02
    Parser
    Normalizes every input into one intermediate representation
  3. 03
    Behavior graph
    Resources, relationships, transitions, side effects
  4. 04
    State engine
    Deterministic CRUD · snapshots · rollback · persistence
  5. 05
    Runtime shell
    Fastify · plugins · auth · logging · rate limits
  6. 06
    Local endpoint
    http://localhost:8787 · reference target under 1s

Four commands.

Your application only needs a different base URL.

  1. 01

    Point

    carbon record https://api.stripe.com

    Give Carbon an OpenAPI spec, AsyncAPI document, protobuf service, Postman collection, HAR file, GraphQL schema, or URL to observe.

  2. 02

    Analyze

    carbon inspect

    The ingestion pipeline builds an intermediate representation and a behavior graph — resources, relationships, transitions.

  3. 03

    Emulate

    carbon emulate --port 8787

    A deterministic Fastify runtime boots on localhost. Swap your base URL and run without the upstream API.

  4. 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 | sh
carbonPrint 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.

tests/checkout.test.tstypescript
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.

01

OpenAPI 3.x

stable

Full schema walk with $ref resolution, security schemes, examples.

02

Swagger 2.0

stable

Read through the same OpenAPI adapter.

03

HAR (HTTP Archive)

stable

Endpoint templates inferred from observed exchanges; id-like params detected.

04

Postman v2.1

stable

Collections import as endpoints; folders map to tags.

05

GraphQL SDL

stable

Types → resources, queries → get/list, mutations → create/update/delete.

06

Live traffic

stable

carbon record starts an HTTP proxy that captures and redacts.

07

gRPC / Protobuf

supported

Messages map to resources and service RPCs map to callable runtime endpoints.

08

AsyncAPI

supported

Channels map to deterministic runtime actions for event-driven API flows.

What each option gives you.

CapabilityCarbonMock libsShared stagingPostman / 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.

MetricLatest runWhat it means
Stateful consistency6/6 checkscreate, read-after-create, update, read-after-update, delete, read-after-delete
10,000 row snapshot restore7.90 ms p5013.12 ms p95 from the committed snapshot harness
HTTP runtime throughput43,015 req/s100 connections for 30s, 1,290,418 2xx responses, 0 non-2xx
Memory after 1,000 writes32.8 MB heap80.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.

record → emulate
# 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.

Download for macOSDownload .zip insteadStandalone CLI for Windows & Linux

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.

npm i -g carbon-apibrew install carbon-dev/carbon/carbonStandalone binaries + checksums

Language clients

Typed clients for the control-plane API, generated from the same schema.

pip install carbon-clientnpm i @carbon/client

Full 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

$0forever, for one 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 popular
$29per developer / month

Scheduled 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

$79per developer / month

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

Contact usannual, tailored to your footprint

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
CapabilityFreeProTeamEnterprise
CLI + local runtime, all 8 adaptersUnlimitedUnlimitedUnlimitedUnlimited
Local JSON snapshotsUnlimitedUnlimited + versioned libraryUnlimited + versioned libraryUnlimited + versioned library
Chaos (error + latency injection)FullFull + saved presetsFull + saved presetsFull + saved presets
Drift detection against upstreamScheduled replay + emailScheduled + team dashboardScheduled + Slack / webhook alerts
AI-assisted resource / relationship inference10 ingests / monthUnlimitedUnlimitedUnlimited + BYO LLM key
Cloud-hosted shared project & snapshot syncSingle-seatIncludedIncluded
Dashboard, activity feed, member rolesIncludedIncluded + custom roles
Snapshot / event retention7-day local cache90 days90 daysConfigurable / unlimited
Audit log90-day viewFull export + SIEM webhook
SSOSAML + OIDCSAML + OIDC
SCIM provisioningIncluded
Self-hosted control planeIncluded
SupportGitHub issuesEmail, business hoursPriority email + shared SlackDedicated 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.

Basics

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`.

Local development

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.

Teams & cloud

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.

Under the hood

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.