Slackpit is a small, zero-configuration Slack message testing tool & API for developers.
It captures Slack API calls during development and displays them in a web UI with full Block Kit rendering. No messages are sent to real Slack — everything stays local.
Slackpit is inspired by Mailpit which does the same for email.
- Runs entirely from a single static binary
- Modern web UI to view captured Slack messages with full Block Kit rendering (headers, sections, actions, context, dividers, markdown formatting)
- REST API for automated integration testing
- Real-time web UI updates using polling for new messages
- Optional browser notifications for new messages
- Message type badges (DM, Channel, Webhook)
- Dark theme matching Slack's interface
- Configurable port via CLI flag or environment variable
The Slackpit web UI listens by default on http://0.0.0.0:9025 and the API on the same port.
Slackpit runs as a single binary and can be installed in different ways:
brew install moritzbeck93/tap/slackpitTo run automatically in the background:
brew services start slackpitgit clone https://github.com/moritzbeck93/slackpit.git
cd slackpit
bun install
npm run build:release
./dist/slackpitslackpit [options]
Options:
-p, --port <port> Port for UI and API (default: 9025, env: SLACKPIT_PORT)
-v, --version Show version
-h, --help Show help
If installed using Homebrew, you may run brew services start slackpit to always run slackpit automatically in the background.
| Flag / Env Variable | Default | Description |
|---|---|---|
-p, --port / SLACKPIT_PORT |
9025 |
Port for both UI and API |
Configure your application to POST Slack messages to Slackpit instead of the real Slack API:
curl -X POST http://localhost:9025/api/v1/messages \
-H "Content-Type: application/json" \
-d '{
"type": "dm",
"to": "user@example.com",
"text": "Hello!",
"blocks": [
{ "type": "section", "text": { "type": "mrkdwn", "text": "*Bold* message" } }
]
}'Send a message to Slackpit.
{
"type": "dm",
"to": "user@example.com",
"text": "Hello!",
"blocks": [...],
"metadata": {}
}| Field | Required | Description |
|---|---|---|
type |
Yes | "dm", "channel", or "webhook" |
to |
Yes | Recipient (email, channel name, or webhook URL) |
text |
No | Plain text fallback |
blocks |
No | Slack Block Kit blocks array |
metadata |
No | Additional metadata object |
List all captured messages.
Get a single message by ID.
Clear all messages.
Health check endpoint.
{ "status": "ok", "version": "0.1.0", "messages": 5 }- Header blocks
- Section blocks (with text, fields, and accessories)
- Divider blocks
- Actions blocks (buttons, selects, overflow menus)
- Context blocks (text and images)
- Image blocks
- Mrkdwn formatting (bold, italic, strikethrough, code, links, blockquotes, lists, emoji)
Slackpit can also be used as a library:
import { createServer } from "slackpit";
const { app, storage, port } = createServer({ port: 9025 });
app.listen(port);| Mailpit | Slackpit | |
|---|---|---|
| Captures | Emails (SMTP) | Slack messages (HTTP) |
| Protocol | SMTP server | REST API |
| UI | HTML email viewer | Slack Block Kit renderer |
| Storage | SQLite | In-memory |
| Background | brew services start mailpit |
brew services start slackpit |
MIT
