Slack
01 / MESSAGINGTest your Slack bot.
Create users and public channels, send messages, and receive signed events. See the conversation in a local dashboard.
@localhost2137/slackExplore Slack A local runtime for service emulators.
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.
01 The bottleneck
.env.All this to find out whether “ping” produces “pong.”
02 Try it
Give it a local Slack workspace where it can create users, send messages, and test the bot.
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"], }], }, }), },});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.tsSend ping to follow the round trip.
Browser simulation. Run the example to try the emulator with the Slack SDK.
Run the Slack example03 Available emulators
Slack and Stripe are available today.
Need another service? Build a plugin.
Create users and public channels, send messages, and receive signed events. See the conversation in a local dashboard.
@localhost2137/slackExplore Slack 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
All services run on your machine.
Configure plugins in localhost.config.ts. Control them through the CLI or TypeScript.
/dev/slack/api//dev/stripe/v1/Create test data, trigger failures, and give each test its own state and clock.
Create users, send messages, and choose payment outcomes.
instance.slack.createUser({ name: "Ada" })Control operations Advance the emulator clock to test a renewal. Your app stays on real time.
await instance.clock.advance("30d")Virtual time Give each test separate state and a clock. Reset or destroy it when done.
await instance.destroy()Isolated tests 05 Bring your own service
Build an emulator with TypeScript, Hono, and Zod. Publish it as an npm package, or keep it private.
06 FAQ
Yes, for supported workflows. The Slack and Stripe guides show the local configuration and adapters for their official SDKs.
No. Use local placeholder credentials such as xoxb-local. You don’t need a provider account.
No. Each plugin supports specific workflows. Check the coverage; test unsupported behavior against the real provider.
No. Developers, scripts, and CI can use the same APIs, CLI, and TypeScript operations.
Get started
Give your agent local services it can set up, inspect, and reset.
pnpm add -g localhost2137Requires Node.js 24+ and pnpm.