@deploybaseline/slack
v0.14.0
Published
Slack API emulator for local development and tests: auth, chat, conversations, users, profiles, presence, files, pins, bookmarks, views, reactions, team, OAuth, incoming webhooks, interactivity, slash commands, Socket Mode, and an inspector.
Readme
@deploybaseline/slack
Slack API emulator for local development and tests: auth, chat, conversations, users, profiles, presence, files, pins, bookmarks, views, reactions, team, OAuth, incoming webhooks, interactivity, slash commands, Socket Mode, and an inspector.
Part of Baseline: local drop-in replacement services for CI and no-network sandboxes.
Usage
npx @deploybaseline/cli start --service slackSocket Mode needs the opt-in WebSocket package next to the CLI:
npx -p @deploybaseline/cli -p @deploybaseline/ws baseline start --service slackIn tests:
import { createEmulator } from "@deploybaseline/cli";
import { WebClient } from "@slack/web-api";
const slack = await createEmulator({ service: "slack" });
const client = new WebClient("xoxb-local-test", { slackApiUrl: `${slack.url}/api/` });
await client.chat.postMessage({ channel: "general", text: "Hello" });
await slack.close();Documentation
- Slack docs: Web API methods, events and signing, interactivity, Socket Mode, OAuth, seed config, and current limits
- API reference:
http://localhost:3999/docs/slackwhile the CLI runs (how it works)
License
Apache-2.0
