agent-slack
Slack CLI for AI agents
- Language
- Go
- Version
- 0.47.1
- License
- PolyForm Perimeter 1.0.0
- Category
- CLI Tool
A Slack CLI for AI agents that reads and carefully writes Slack through compact, structured output. Messages, threads, search, unreads, saved-for-later, canvases, workflows, emoji, usergroups and file downloads, plus live delivery over the same WebSocket the Slack client uses — all without the agent ever seeing a token.
Features
LLM-shaped output — NDJSON lists, JSON single resources, empty fields pruned aggressively, bodies truncatable with --max-body-chars
Live delivery without polling — message await blocks until the next reply or reaction, message stream emits NDJSON events, both over the WebSocket the Slack client itself uses, so neither spends rate-limit budget
Fourteen command domains — message, channel, user, usergroup, emoji, search, workflow, canvas, unreads, later, file, cache, config and a raw api escape hatch
Workflow support — discover bookmarked workflows, preview triggers, inspect form fields and steps, and run them with --field form submission
Keychain-first credentials — browser (xoxc/xoxd) and bot (xoxb/xoxp) tokens live in the OS keychain and are never printed back
Mutation safety — edit, delete, cancel, channel new/invite and emoji add/remove require --yes, and describe what they would do without it
MCP server with named principals — pair add --bind workspace=<alias> gives each person their own fail-closed workspace binding
Browser self-enrollment — a principal minted without --bind pastes their own Slack token during OAuth approval; it is verified via auth.test and bound automatically
Filesystem-free clients supported — a read-only fs MCP tool reads back downloaded attachments, images returned as image blocks
Six credential import paths — Slack Desktop, or chrome, brave, firefox, zen, opera and safari
Multi-workspace — disambiguate with --workspace by URL or substring, or let a permalink carry the workspace
Tested against a fixture Slack server — mockslack serves a fake event socket too, so await and stream are exercised without a real workspace
Install
Homebrew
$ brew install shhac/tap/agent-slack AI Agent Skill
$ npx skills add shhac/agent-skills --skill agent-slack --global GitHub Release (macOS)
$ curl -L https://github.com/shhac/agent-slack/releases/latest/download/agent-slack-darwin-arm64.tar.gz | tar xz Go Install
$ go install github.com/shhac/agent-slack/cmd/agent-slack@latest Build from Source
$ git clone https://github.com/shhac/agent-slack.git && cd agent-slack && make build Getting Started
agent-slack authenticates against a real Slack workspace while keeping secrets out of chat, argv and agent context. Browser credentials unlock the broadest surface — client APIs such as workflows, Later and the event socket — where a bot token falls back to polling.
01 · Import Slack Desktop credentials
$ agent-slack auth import-desktop Works on macOS, Linux and Windows. Secrets go straight into the OS keychain where available.
02 · Or import from a browser
$ agent-slack auth import-browser firefox chrome, brave, firefox, zen, opera or safari. agent-slack auth usage documents every method, including bot tokens, cURL parsing and env vars.
03 · Verify the workspace
$ agent-slack auth test Checks the stored credentials without printing tokens or cookies.
04 · Ask the tool for its own map
$ agent-slack usage An LLM-oriented overview; every domain has its own detail page too, e.g. agent-slack message usage.
Usage
$ agent-slack message get 'https://example.slack.com/archives/C123/p1770165109628379' $ agent-slack message await 'https://example.slack.com/archives/C123/p1770165109628379' $ agent-slack message stream '#ops' $ agent-slack search messages 'deploy failed' --channel '#ops' --after 2026-06-01 $ agent-slack unreads $ agent-slack workflow run Ft0001 --field title='Ship it' --yes $ agent-slack emoji search party $ agent-slack api call team.info