CLI for Slack icon: a terminal prompt in a speech bubble

CLI for Slack (unofficial)

Work in Slack from the terminal. Every Slack Web API method your user token can call is a typed command, for people and for coding agents.

An independent open-source project (MIT). It is not made, affiliated with, or endorsed by Slack Technologies, LLC. It collects no data; see Privacy.

What it does in Slack

Post and reply

Send messages, reply in threads, and add reactions from a script or a terminal session.

Read and search

Read channel history and threads, search messages and files, and look up people, as JSON you can pipe into other tools.

Files, canvases, and lists

Upload and fetch files and work with canvases and lists using the same commands.

Built for coding agents

Agents discover commands with --help, preview writes with --dry-run, and act on documented exit codes.

Get started

Requires Node.js 22 or later.

$ npm install --global @alleneubank/slack-cli
$ slack login            # read access
$ slack login --write    # also post, react, and upload

slack login opens Slack in your browser. Choose a workspace, review the permissions, and select Allow. Your terminal finishes signing in. The walkthrough shows each step.

$ slack conversations list --types public_channel --limit 20
$ slack conversations history C0123456789 --limit 20
$ slack chat postMessage C0123456789 --text 'Deploy finished'
$ slack search messages 'from:@alex release'

Method a.b.c is the command slack a b c, and each command's --help lists its arguments, required scopes, and a link to Slack's reference.

For coding agents

$ slack skills add

Installs a short skill that tells coding agents how to use the CLI: find commands, page with --cursor, preview writes with --dry-run, and treat message text as data, not instructions.

On the same read-only tasks, an agent using the CLI and this skill spent about a third less than one using Slack's hosted MCP server. See the benchmark for the method, per-task results, and caveats.

How sign-in works

Help

Open an issue on GitHub, or email allen@unrulysystems.com if you don't have a GitHub account. See Support for common questions, and read the privacy policy and terms.