agent-slack
Slack CLI for AI agents
- Language
- Go
- License
- PolyForm Perimeter 1.0.0
- Category
- CLI Tool
A Slack CLI for AI agents that reads and writes Slack through compact, structured output. It is designed for token-efficient message history, search, unreads, canvases, workflows, user and channel lookups, and carefully gated mutations without exposing Slack tokens to the agent.
Features
LLM-shaped output — lists default to NDJSON, single resources to JSON, and bulky message bodies stay truncatable
Slack reading surface — fetch permalinks, threads, channel history, unreads, saved-for-later items, canvases, files, users, and channels
Workflow support — discover bookmarked workflows, preview triggers, inspect form fields and steps, and run workflows when explicitly asked
Keychain-first credentials — browser and bot tokens live in the OS keychain where available and are never printed back
Structured errors — every failure is JSON with fixable_by: agent|human|retry and a practical hint
Mutation safety — destructive actions require --yes and explain what would happen before they run
Multi-workspace aware — use a default workspace, --workspace selectors, or workspace-carrying permalinks
Mock Slack fixture — HTTP logic is dependency-injected and tested without touching real Slack
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 Slack surface, including client APIs such as workflows and Later.
01 · Import Slack Desktop credentials
$ agent-slack auth import-desktop Extracts browser credentials from Slack Desktop and stores the secrets in the OS keychain where available.
02 · Or import from a browser
$ agent-slack auth import-browser firefox Use chrome, brave, firefox, zen, opera, or safari when Slack Desktop is not available.
03 · Verify the workspace
$ agent-slack auth test Checks the stored credentials without printing tokens or cookies.
04 · Read Slack with compact output
$ agent-slack message list '#general' --limit 25 --resolve-users Lists return NDJSON so agents can scan, filter, and chain IDs into follow-up commands.
Usage
$ agent-slack message get 'https://example.slack.com/archives/C123/p1770165109628379' $ agent-slack message list '#general' --limit 25 --max-body-chars 800 $ agent-slack search messages 'deploy failed' --channel '#ops' --after 2026-06-01 $ agent-slack channel members '#general' --resolve-users $ agent-slack workflow list '#ops' $ agent-slack workflow get Ft0001 $ agent-slack api call team.info