Local API emulation for dev and CI

Stateful, production-fidelity replacements for Stripe, GitHub, Google, AWS, and 7 more services. No API keys. No network. Not mocks.

$ npx emulate --portless

emulate v0.4.1

  Vercel        https://vercel.emulate.localhost
  GitHub        https://github.emulate.localhost
  Google        https://google.emulate.localhost
  Slack         https://slack.emulate.localhost
  Apple         https://apple.emulate.localhost
  Microsoft     https://microsoft.emulate.localhost
  AWS           https://aws.emulate.localhost
  Okta          https://okta.emulate.localhost
  MongoDB Atlas https://mongoatlas.emulate.localhost
  Resend        https://resend.emulate.localhost
  Stripe        https://stripe.emulate.localhost

What this gives you

Stateful

Create a GitHub repo, push commits, open a PR. Send an email through Resend. Charge a card on Stripe. State persists across requests.

Real protocols

OAuth flows with RS256 ID tokens. AWS XML responses. Slack cursor pagination. Your SDK works without changes.

Zero config

Run npx emulate and all 11 services start with sensible defaults. Seed data via YAML when you need it.

Offline and CI-ready

No network, no Docker, no flaky sandbox accounts. Same deterministic behavior in GitHub Actions as on your laptop.

Point your SDK at localhost

Your existing code stays the same. Just change the host.

Before
const stripe = new Stripe(
  process.env.STRIPE_SECRET_KEY
)

// needs network
// needs a test-mode account
// rate-limited
With emulate
const stripe = new Stripe("anything")
stripe.config.host = "localhost"
stripe.config.port = 4010
stripe.config.protocol = "http"

// offline, instant, stateful

Use it your way

CLI

Run alongside your dev server. Pick which services you need.

npx emulate --service github,stripe
Programmatic API

Import into Vitest or Jest. Start per-suite, reset between tests.

import { createEmulator } from "emulate"

const github = await createEmulator({ service: "github", port: 4001 })
afterEach(() => github.reset())
afterAll(() => github.close())
Next.js adapter

Embed in your app. Same origin, no CORS issues, works on Vercel preview deployments.

npm install @emulators/adapter-next @emulators/github