Skip to content
localhost2137

A local runtime for service emulators.

Setting up API keys
is worse than 9/11.

Your own local versions of any service you want to integrate with.
APIs for your app. Data and events your agent can control.

No provider accounts. No real API keys.

Skip the setup

01 The bottleneck

Sir, a second API key
has hit the .env.

All this to find out whether “ping” produces “pong.”

  1. 01Set up each service
  2. 02Connect keys and webhooks
  3. 03Create test users and data
  4. 04Reproduce the failure. Again.

Your agent wrote the integration. You’re still setting up services and testing it by hand.

02 Try it

Your agent wrote the bot.
You’re still setting up Slack.

Give it a local Slack workspace where it can create users, send messages, and test the bot.

Everything on localhostBrowser simulation
localhost:2137/dev/slack
# general
Ada

Send “ping” to see the bot reply.

localhost.config.ts
import { defineConfig } from "localhost2137";import { slack } from "@localhost2137/slack";export default defineConfig({  services: {    slack: slack({      config: {        workspaceName: "Local workspace",        botToken: "xoxb-local",        signingSecret: "local-secret",        eventsUrl:          "http://localhost:3000/slack/events",      },      seed: {        users: [{ id: "U_ADA", name: "Ada" }],        channels: [{          name: "general",          members: ["U_ADA"],        }],      },    }),  },});
index.ts
import { App } from "@slack/bolt";const app = new App({  token: "xoxb-local",  signingSecret: "local-secret",  clientOptions: {    slackApiUrl:      "http://localhost:2137/dev/slack/api/",  },  endpoints: "/slack/events",});app.message(/^ping$/, async ({ say }) => {  await say("pong");});await app.start(3000);
$ node index.ts
  1. Message, waiting
  2. Event, waiting
  3. Handler, waiting
  4. Reply, waiting

Send ping to follow the round trip.

Browser simulation. Run the example to try the emulator with the Slack SDK.

Run the Slack example

Run it with your agent.

03 Available emulators

Two official emulators. For now.

Slack and Stripe are available today.
Need another service? Build a plugin.

Slack

01 / MESSAGING

Test your Slack bot.

Create users and public channels, send messages, and receive signed events. See the conversation in a local dashboard.

@localhost2137/slackExplore Slack

Stripe

02 / BILLING

Test the next billing cycle.

Create subscriptions, advance time, and test successful or failed renewals—with invoices and signed webhooks.

@localhost2137/stripeExplore Stripe

Supports documented workflows. Check coverage

04 The runtime

An inside job.

All services run on your machine.

Configure plugins in localhost.config.ts. Control them through the CLI or TypeScript.

Explore the runtime
Your appSDK / HTTP
Tests + agentsCLI / TypeScript
localhost:2137on your machine
Service APIsControl operations
Instance
Slack/dev/slack/api/
3 users2 channels
Stripe/dev/stripe/v1/
2 customers1 subscription
Pinned clock
Illustrative instances. Separate state and clocks, shared runtime.

Built for automated tests, too.

Create test data, trigger failures, and give each test its own state and clock.

01 / CONTROL

Set up the data.

Create users, send messages, and choose payment outcomes.

instance.slack.createUser({ name: "Ada" })Control operations
02 / TIME

Skip the wait.

Advance the emulator clock to test a renewal. Your app stays on real time.

await instance.clock.advance("30d")Virtual time
03 / ISOLATION

Break it. Reset it.

Give each test separate state and a clock. Reset or destroy it when done.

await instance.destroy()Isolated tests

05 Bring your own service

Need another service?

Build an emulator with TypeScript, Hono, and Zod. Publish it as an npm package, or keep it private.

YOUR NEXT EMULATOR.tgz
@you/your-service
  • 01 Service API Routes & responses
  • 02 Stateful behavior Data & events
  • 03 Control operations CLI & TypeScript
  • 04 Compatibility tests Prove the workflow

06 FAQ

Common questions.

Can I use my existing SDK?

Yes, for supported workflows. The Slack and Stripe guides show the local configuration and adapters for their official SDKs.

Do I need real API keys?

No. Use local placeholder credentials such as xoxb-local. You don’t need a provider account.

Does it reproduce the entire service?

No. Each plugin supports specific workflows. Check the coverage; test unsupported behavior against the real provider.

Is this only for coding agents?

No. Developers, scripts, and CI can use the same APIs, CLI, and TypeScript operations.

Get started

Run it. Test it.
Reset it. Repeat.

Give your agent local services it can set up, inspect, and reset.

pnpm add -g localhost2137

Requires Node.js 24+ and pnpm.

Give your agent the setup.

Copy this prompt into your coding agent to run and verify the Slack example locally.