shaharia-lab/slackcli

Slack CLI for humans and AI agents. Read, send, search and reply across one or many Slack workspaces from the terminal. No Slack app needed.

151

stars

86

commits

TypeScript

primary language

Sep 10, 2026

updated

slackcli.dev/
ai-agents
ai-tools
automation
bun
cli
developer-tools
slack
slack-api
slack-cli
terminal
typescript
Browse cluster: TypeScript Automation & Workflow Tools

README

SlackCLI — give your AI agent access to Slack. Read, search, and reply from the terminal. No Slack app needed.

Work with one — or many — Slack workspaces, straight from your terminal.

Read channels, send messages, search history, and catch up on what you missed. Built to be AI-agent friendly, so your scripts and assistants can use Slack too. No Slack app to build, no admin approval to wait for.

Release CI Downloads Stars License Last commit

Quickstart · What it does · Commands · Docs · Contributing


⭐ Like the idea? Star the repo.

It takes two seconds, and it is how the next person finds SlackCLI.


🎬 See it in action

Sign in, browse conversations, search the workspace, read a thread from a permalink, reply, react, read a canvas as Markdown, and pipe --json into jq — all from the terminal.

https://github.com/user-attachments/assets/90cf1c89-2859-4b84-a731-b0ff3e1172f3

[!IMPORTANT] Unofficial project. SlackCLI is not affiliated with, endorsed by, or supported by Slack Technologies. Slack ships an official CLI for building Slack apps — this is a different tool, for driving a workspace you already belong to.


⚡ Quickstart

Three steps, about a minute.

1. Install — pick your platform

Homebrew (macOS & Linux) — recommended

brew tap shaharia-lab/tap
brew install slackcli
Linux — direct binary
# x86_64
curl -L https://github.com/shaharia-lab/slackcli/releases/latest/download/slackcli-linux -o slackcli

# arm64
curl -L https://github.com/shaharia-lab/slackcli/releases/latest/download/slackcli-linux-arm64 -o slackcli

chmod +x slackcli && mkdir -p ~/.local/bin && mv slackcli ~/.local/bin/
macOS — direct binary
# Intel
curl -L https://github.com/shaharia-lab/slackcli/releases/latest/download/slackcli-macos -o slackcli

# Apple Silicon
curl -L https://github.com/shaharia-lab/slackcli/releases/latest/download/slackcli-macos-arm64 -o slackcli

chmod +x slackcli && mkdir -p ~/.local/bin && mv slackcli ~/.local/bin/
Windows

Download slackcli-windows.exe from the latest release and put it somewhere on your PATH.

From source (Bun)
git clone https://github.com/shaharia-lab/slackcli.git
cd slackcli
bun install
bun run build        # -> ./dist/slackcli

Every release ships checksums.txt — verify your download if you care to, and you should. Full details in the installation guide.

2. Sign in — one command, no Slack app required
slackcli auth login-auto

A browser opens, you sign into Slack as you normally would, and SlackCLI captures the session tokens for every workspace on that account. Nothing leaves your machine.

Prefer a real Slack app token, or need a service account? There are three other ways — see authentication below.

3. Do something useful
slackcli conversations unread                       # what did I miss?
slackcli search messages "deploy failed" --in=engineering
slackcli messages send --permalink="$LINK" --message="On it 👀"

[!TIP] Anywhere SlackCLI wants a channel ID or a timestamp, you can paste a Slack link instead. Copy a permalink out of the Slack app and hand it straight to the CLI — see links & timestamps.


🧭 What do you want to do?

I want to…Try thisLearn more
See what I missedslackcli conversations unreadconversations
Read a channel or a threadslackcli conversations read C123 --limit=50conversations
Send, reply, edit, or reactslackcli messages send --permalink="$LINK" --message="…"messages
Search the workspaceslackcli search messages "release notes"search
Find a channel or a personslackcli search people "ada"search
Work through "saved for later"slackcli saved list --state=to_dosaved items
Read a Canvas as Markdownslackcli canvas read F123canvas
Upload a file with a messageslackcli messages send --file=./report.pdf …messages
Post rich Block Kit contentslackcli messages send --blocks=@blocks.json …messages
Script it / feed an AI agent… --json | jqscripting & JSON
Juggle several workspacesslackcli conversations list --workspace=automation-botworkspaces
Fix something that brokeslackcli auth listtroubleshooting

🤖 Built to be scripted

Every command that returns data speaks --json, so SlackCLI drops straight into shell pipelines, cron jobs, CI steps, and AI agent toolchains.

# Who is talking about the outage, and when?
slackcli search messages "outage" --in=incidents --json \
  | jq -r '.matches[] | "\(.username)\t\(.text)"'

# Turn today's unreads into a digest
slackcli conversations unread --json | jq '[.unread_channels[] | {name, unread_count}]'

# Read a thread, summarise it elsewhere, reply with the result
slackcli conversations read --permalink="$LINK" --json | jq '.messages[].text'

No Slack app, no OAuth dance, no webhook server — just a binary and a token. Patterns, exit codes, and pagination are in scripting & JSON output.


🔐 Authentication: two kinds of credentials

SlackCLI talks to Slack either as a Slack app (xoxb-* / xoxp-*) or as a signed-in browser session (xoxd-* + xoxc-*). One SlackClient abstracts both.

flowchart LR
    A["Any slackcli command"] --> B{"Workspace<br/>auth type"}
    B -->|standard| C["@slack/web-api<br/>xoxb / xoxp"]
    B -->|browser| D["fetch + session headers<br/>xoxd + xoxc"]
    C --> E(("Slack API"))
    D --> E
Four ways to sign in — and which one to pick
MethodCommandBest for
Automatic browser loginslackcli auth login-autoAlmost everyone. Sign in once, all workspaces enrolled.
Slack app tokenslackcli auth login --token=xoxb-… --workspace-name="My Team"Bots, CI, service accounts, long-lived automation.
Parse a DevTools cURLslackcli auth parse-curl --loginLocked-down browsers, or when you already copied the request.
Browser tokens by handslackcli auth login-browser --xoxd=… --xoxc=… --workspace-url=…Full control, or scripted provisioning.

Browser session tokens can create drafts, which a Slack app simply cannot do, and they back saved list and conversations unread with Slack's own native endpoints rather than approximations. Slack app tokens are more stable and survive a browser logout.

slackcli auth extract-tokens prints the manual walkthrough. The security model, the OAuth scopes each command needs, and what login-auto does with your browser profile are all in the authentication guide.

Where credentials live

Configuration lives in ~/.config/slackcli/ (directory mode 0700):

FileContents
workspaces.jsonWorkspace credentials (mode 0600)
update-check.jsonCached update check, refreshed at most daily
browser-profile/The browser profile used by auth login-auto

workspaces.json and browser-profile/ both hold live credentials — do not commit, sync, or share them. slackcli auth logout clears both.


📖 Command reference

Seven command groups. slackcli <group> --help always prints the authoritative options for the version you have installed.

auth — sign in, manage workspaces
CommandDoes
auth login-autoSign in through a browser; captures tokens automatically
auth loginSign in with a standard Slack app token (xoxb-* / xoxp-*)
auth login-browserSign in with browser session tokens (xoxd-* + xoxc-*)
auth parse-curlExtract tokens from a cURL command copied out of DevTools
auth extract-tokensPrint the manual token-extraction guide
auth listList authenticated workspaces
auth set-default <workspace>Choose the default workspace
auth remove <workspace>Remove one workspace
auth logoutRemove all workspaces and the stored browser profile

📄 authentication · workspaces & profiles

conversations — channels, DMs, threads, unreads
slackcli conversations list --types=public_channel
slackcli conversations read C1234567890 --limit=50
slackcli conversations read --permalink="$LINK"          # reads that message's thread
slackcli conversations get C1234567890 1234567890.123456
slackcli conversations unread

📄 conversations

messages — send, reply, edit, react, draft
slackcli messages send --recipient-id=C1234567890 --message="Hello team!"
slackcli messages send --permalink="$LINK" --message="On it"      # replies in-thread
slackcli messages send --recipient-id=C123 --file=./report.pdf --message="Latest numbers"
slackcli messages send --recipient-id=C123 --blocks=@blocks.json
slackcli messages react --permalink="$LINK" --emoji=+1
slackcli messages edit --channel-id=C123 --timestamp=1234567890.123456 --message="Corrected"
slackcli messages draft --recipient-id=C123 --message="Draft for later"

[!NOTE] messages draft requires browser session tokens — Slack apps cannot create drafts.

📄 messages

search — messages, channels, people
slackcli search messages "deploy failed" --in=engineering --from=ada --limit=50
slackcli search channels "incident"
slackcli search people "ada@example.com"

📄 search

saved · canvas · update
slackcli saved list --state=to_do            # saved | to_do | completed
slackcli canvas list --channel=C1234567890
slackcli canvas read F1234567890             # Canvas -> Markdown
slackcli update check                        # is there a newer version?
slackcli update                              # install it

📄 saved items · canvas


⭐ Spread the word

Made it this far? Then SlackCLI is probably useful to you — and the fastest way to keep it alive is to make it easier for the next person to find.

⭐ Star SlackCLI · 💬 Say hello in Discussions · 🐛 Report something broken


Share it with one person who lives in Slack and in a terminal

X LinkedIn Bluesky Reddit Hacker News

In rough order of usefulness:

  • Star the repo — the single highest-leverage thing.
  • 🐛 Open an issue when something breaks or a command feels wrong.
  • 💬 Tell one person who lives in Slack and in a terminal.
  • ✍️ Write about it — a blog post, a work Slack message, a comment on HN or Reddit.
  • 🛠️ Send a PR — see Contributing below.
Star history
Star history chart for shaharia-lab/slackcli

📚 Documentation

Everything lives in docs/.

User guide — how to use it

Developer docs — how to work on it


bun install
pre-commit install     # same checks CI runs
bun run dev --help     # run from source
bun test               # 400+ tests
bun run type-check
bun run build          # -> ./dist/slackcli

🤝 Contributing

Contributions are very welcome — and the process here is a little stricter than most repos, on purpose.

[!IMPORTANT] Open an issue first, and wait for the ready-for-pr label. That label is how the maintainer decides which features belong in the CLI, and it locks the feature to your PR so nobody duplicates your work. A workflow enforces the issue link.

  1. Open an issue describing WHAT the change is, WHY it is needed, and optionally HOW.
  2. Wait for triage and the ready-for-pr label.
  3. Fork, branch, and open a PR that links the issue (Closes #123).
  4. Make sure type-check, tests, and pre-commit hooks pass, and that your commits are signed.

Looking for a place to start? Try good first issue or help wanted.

The full policy is in CONTRIBUTING.md and CLAUDE.md. Security issues go through SECURITY.md — never a public issue.

Contributors

Contributors

💬 Support

📄 License

MIT — do what you like, no warranty.

Built with Bun · powered by @slack/web-api · inspired by gscli


Made with ❤️ by Shaharia Lab

Star SlackCLI if it made your day a little shorter.

Contributors

shahariaazam

35 commits

vibexp-agent

19 commits

dependabot[bot]

11 commits

Sibirius

4 commits

shaharia-lab/slackcli

Slack CLI for humans and AI agents. Read, send, search and reply across one or many Slack workspaces from the terminal. No Slack app needed.

151

stars

86

commits

TypeScript

primary language

Sep 10, 2026

updated

slackcli.dev/
ai-agents
ai-tools
automation
bun
cli
developer-tools
slack
slack-api
slack-cli
terminal
typescript
Browse cluster: TypeScript Automation & Workflow Tools

README

SlackCLI — give your AI agent access to Slack. Read, search, and reply from the terminal. No Slack app needed.

Work with one — or many — Slack workspaces, straight from your terminal.

Read channels, send messages, search history, and catch up on what you missed. Built to be AI-agent friendly, so your scripts and assistants can use Slack too. No Slack app to build, no admin approval to wait for.

Release CI Downloads Stars License Last commit

Quickstart · What it does · Commands · Docs · Contributing


⭐ Like the idea? Star the repo.

It takes two seconds, and it is how the next person finds SlackCLI.


🎬 See it in action

Sign in, browse conversations, search the workspace, read a thread from a permalink, reply, react, read a canvas as Markdown, and pipe --json into jq — all from the terminal.

https://github.com/user-attachments/assets/90cf1c89-2859-4b84-a731-b0ff3e1172f3

[!IMPORTANT] Unofficial project. SlackCLI is not affiliated with, endorsed by, or supported by Slack Technologies. Slack ships an official CLI for building Slack apps — this is a different tool, for driving a workspace you already belong to.


⚡ Quickstart

Three steps, about a minute.

1. Install — pick your platform

Homebrew (macOS & Linux) — recommended

brew tap shaharia-lab/tap
brew install slackcli
Linux — direct binary
# x86_64
curl -L https://github.com/shaharia-lab/slackcli/releases/latest/download/slackcli-linux -o slackcli

# arm64
curl -L https://github.com/shaharia-lab/slackcli/releases/latest/download/slackcli-linux-arm64 -o slackcli

chmod +x slackcli && mkdir -p ~/.local/bin && mv slackcli ~/.local/bin/
macOS — direct binary
# Intel
curl -L https://github.com/shaharia-lab/slackcli/releases/latest/download/slackcli-macos -o slackcli

# Apple Silicon
curl -L https://github.com/shaharia-lab/slackcli/releases/latest/download/slackcli-macos-arm64 -o slackcli

chmod +x slackcli && mkdir -p ~/.local/bin && mv slackcli ~/.local/bin/
Windows

Download slackcli-windows.exe from the latest release and put it somewhere on your PATH.

From source (Bun)
git clone https://github.com/shaharia-lab/slackcli.git
cd slackcli
bun install
bun run build        # -> ./dist/slackcli

Every release ships checksums.txt — verify your download if you care to, and you should. Full details in the installation guide.

2. Sign in — one command, no Slack app required
slackcli auth login-auto

A browser opens, you sign into Slack as you normally would, and SlackCLI captures the session tokens for every workspace on that account. Nothing leaves your machine.

Prefer a real Slack app token, or need a service account? There are three other ways — see authentication below.

3. Do something useful
slackcli conversations unread                       # what did I miss?
slackcli search messages "deploy failed" --in=engineering
slackcli messages send --permalink="$LINK" --message="On it 👀"

[!TIP] Anywhere SlackCLI wants a channel ID or a timestamp, you can paste a Slack link instead. Copy a permalink out of the Slack app and hand it straight to the CLI — see links & timestamps.


🧭 What do you want to do?

I want to…Try thisLearn more
See what I missedslackcli conversations unreadconversations
Read a channel or a threadslackcli conversations read C123 --limit=50conversations
Send, reply, edit, or reactslackcli messages send --permalink="$LINK" --message="…"messages
Search the workspaceslackcli search messages "release notes"search
Find a channel or a personslackcli search people "ada"search
Work through "saved for later"slackcli saved list --state=to_dosaved items
Read a Canvas as Markdownslackcli canvas read F123canvas
Upload a file with a messageslackcli messages send --file=./report.pdf …messages
Post rich Block Kit contentslackcli messages send --blocks=@blocks.json …messages
Script it / feed an AI agent… --json | jqscripting & JSON
Juggle several workspacesslackcli conversations list --workspace=automation-botworkspaces
Fix something that brokeslackcli auth listtroubleshooting

🤖 Built to be scripted

Every command that returns data speaks --json, so SlackCLI drops straight into shell pipelines, cron jobs, CI steps, and AI agent toolchains.

# Who is talking about the outage, and when?
slackcli search messages "outage" --in=incidents --json \
  | jq -r '.matches[] | "\(.username)\t\(.text)"'

# Turn today's unreads into a digest
slackcli conversations unread --json | jq '[.unread_channels[] | {name, unread_count}]'

# Read a thread, summarise it elsewhere, reply with the result
slackcli conversations read --permalink="$LINK" --json | jq '.messages[].text'

No Slack app, no OAuth dance, no webhook server — just a binary and a token. Patterns, exit codes, and pagination are in scripting & JSON output.


🔐 Authentication: two kinds of credentials

SlackCLI talks to Slack either as a Slack app (xoxb-* / xoxp-*) or as a signed-in browser session (xoxd-* + xoxc-*). One SlackClient abstracts both.

flowchart LR
    A["Any slackcli command"] --> B{"Workspace<br/>auth type"}
    B -->|standard| C["@slack/web-api<br/>xoxb / xoxp"]
    B -->|browser| D["fetch + session headers<br/>xoxd + xoxc"]
    C --> E(("Slack API"))
    D --> E
Four ways to sign in — and which one to pick
MethodCommandBest for
Automatic browser loginslackcli auth login-autoAlmost everyone. Sign in once, all workspaces enrolled.
Slack app tokenslackcli auth login --token=xoxb-… --workspace-name="My Team"Bots, CI, service accounts, long-lived automation.
Parse a DevTools cURLslackcli auth parse-curl --loginLocked-down browsers, or when you already copied the request.
Browser tokens by handslackcli auth login-browser --xoxd=… --xoxc=… --workspace-url=…Full control, or scripted provisioning.

Browser session tokens can create drafts, which a Slack app simply cannot do, and they back saved list and conversations unread with Slack's own native endpoints rather than approximations. Slack app tokens are more stable and survive a browser logout.

slackcli auth extract-tokens prints the manual walkthrough. The security model, the OAuth scopes each command needs, and what login-auto does with your browser profile are all in the authentication guide.

Where credentials live

Configuration lives in ~/.config/slackcli/ (directory mode 0700):

FileContents
workspaces.jsonWorkspace credentials (mode 0600)
update-check.jsonCached update check, refreshed at most daily
browser-profile/The browser profile used by auth login-auto

workspaces.json and browser-profile/ both hold live credentials — do not commit, sync, or share them. slackcli auth logout clears both.


📖 Command reference

Seven command groups. slackcli <group> --help always prints the authoritative options for the version you have installed.

auth — sign in, manage workspaces
CommandDoes
auth login-autoSign in through a browser; captures tokens automatically
auth loginSign in with a standard Slack app token (xoxb-* / xoxp-*)
auth login-browserSign in with browser session tokens (xoxd-* + xoxc-*)
auth parse-curlExtract tokens from a cURL command copied out of DevTools
auth extract-tokensPrint the manual token-extraction guide
auth listList authenticated workspaces
auth set-default <workspace>Choose the default workspace
auth remove <workspace>Remove one workspace
auth logoutRemove all workspaces and the stored browser profile

📄 authentication · workspaces & profiles

conversations — channels, DMs, threads, unreads
slackcli conversations list --types=public_channel
slackcli conversations read C1234567890 --limit=50
slackcli conversations read --permalink="$LINK"          # reads that message's thread
slackcli conversations get C1234567890 1234567890.123456
slackcli conversations unread

📄 conversations

messages — send, reply, edit, react, draft
slackcli messages send --recipient-id=C1234567890 --message="Hello team!"
slackcli messages send --permalink="$LINK" --message="On it"      # replies in-thread
slackcli messages send --recipient-id=C123 --file=./report.pdf --message="Latest numbers"
slackcli messages send --recipient-id=C123 --blocks=@blocks.json
slackcli messages react --permalink="$LINK" --emoji=+1
slackcli messages edit --channel-id=C123 --timestamp=1234567890.123456 --message="Corrected"
slackcli messages draft --recipient-id=C123 --message="Draft for later"

[!NOTE] messages draft requires browser session tokens — Slack apps cannot create drafts.

📄 messages

search — messages, channels, people
slackcli search messages "deploy failed" --in=engineering --from=ada --limit=50
slackcli search channels "incident"
slackcli search people "ada@example.com"

📄 search

saved · canvas · update
slackcli saved list --state=to_do            # saved | to_do | completed
slackcli canvas list --channel=C1234567890
slackcli canvas read F1234567890             # Canvas -> Markdown
slackcli update check                        # is there a newer version?
slackcli update                              # install it

📄 saved items · canvas


⭐ Spread the word

Made it this far? Then SlackCLI is probably useful to you — and the fastest way to keep it alive is to make it easier for the next person to find.

⭐ Star SlackCLI · 💬 Say hello in Discussions · 🐛 Report something broken


Share it with one person who lives in Slack and in a terminal

X LinkedIn Bluesky Reddit Hacker News

In rough order of usefulness:

  • Star the repo — the single highest-leverage thing.
  • 🐛 Open an issue when something breaks or a command feels wrong.
  • 💬 Tell one person who lives in Slack and in a terminal.
  • ✍️ Write about it — a blog post, a work Slack message, a comment on HN or Reddit.
  • 🛠️ Send a PR — see Contributing below.
Star history
Star history chart for shaharia-lab/slackcli

📚 Documentation

Everything lives in docs/.

User guide — how to use it

Developer docs — how to work on it


bun install
pre-commit install     # same checks CI runs
bun run dev --help     # run from source
bun test               # 400+ tests
bun run type-check
bun run build          # -> ./dist/slackcli

🤝 Contributing

Contributions are very welcome — and the process here is a little stricter than most repos, on purpose.

[!IMPORTANT] Open an issue first, and wait for the ready-for-pr label. That label is how the maintainer decides which features belong in the CLI, and it locks the feature to your PR so nobody duplicates your work. A workflow enforces the issue link.

  1. Open an issue describing WHAT the change is, WHY it is needed, and optionally HOW.
  2. Wait for triage and the ready-for-pr label.
  3. Fork, branch, and open a PR that links the issue (Closes #123).
  4. Make sure type-check, tests, and pre-commit hooks pass, and that your commits are signed.

Looking for a place to start? Try good first issue or help wanted.

The full policy is in CONTRIBUTING.md and CLAUDE.md. Security issues go through SECURITY.md — never a public issue.

Contributors

Contributors

💬 Support

📄 License

MIT — do what you like, no warranty.

Built with Bun · powered by @slack/web-api · inspired by gscli


Made with ❤️ by Shaharia Lab

Star SlackCLI if it made your day a little shorter.

See what people are saying

Contributors

shahariaazam

35 commits

vibexp-agent

19 commits

dependabot[bot]

11 commits

Sibirius

4 commits

Languages

TypeScript

100.0%