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

01

LLM-shaped output — NDJSON lists, JSON single resources, empty fields pruned aggressively, bodies truncatable with --max-body-chars

02

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

03

Fourteen command domains — message, channel, user, usergroup, emoji, search, workflow, canvas, unreads, later, file, cache, config and a raw api escape hatch

04

Workflow support — discover bookmarked workflows, preview triggers, inspect form fields and steps, and run them with --field form submission

05

Keychain-first credentials — browser (xoxc/xoxd) and bot (xoxb/xoxp) tokens live in the OS keychain and are never printed back

06

Mutation safety — edit, delete, cancel, channel new/invite and emoji add/remove require --yes, and describe what they would do without it

07

MCP server with named principals — pair add --bind workspace=<alias> gives each person their own fail-closed workspace binding

08

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

09

Filesystem-free clients supported — a read-only fs MCP tool reads back downloaded attachments, images returned as image blocks

10

Six credential import paths — Slack Desktop, or chrome, brave, firefox, zen, opera and safari

11

Multi-workspace — disambiguate with --workspace by URL or substring, or let a permalink carry the workspace

12

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

>_ Get one message from a permalink
$ agent-slack message get 'https://example.slack.com/archives/C123/p1770165109628379'
>_ Block until someone replies
$ agent-slack message await 'https://example.slack.com/archives/C123/p1770165109628379'
>_ Stream channel events as NDJSON
$ agent-slack message stream '#ops'
>_ Search messages in a channel
$ agent-slack search messages 'deploy failed' --channel '#ops' --after 2026-06-01
>_ What you have not read yet
$ agent-slack unreads
>_ Run a workflow with form fields
$ agent-slack workflow run Ft0001 --field title='Ship it' --yes
>_ Find a custom emoji by fuzzy match
$ agent-slack emoji search party
>_ Use the raw API escape hatch
$ agent-slack api call team.info