{"slug": "let-your-ai-agent-use-slack-one-cli-no-slack-app-needed", "title": "Let Your AI Agent Use Slack: One CLI, No Slack App Needed", "summary": "Shaharia Lab has released SlackCLI, an open-source command-line tool that lets AI agents interact with Slack without building a Slack app or obtaining OAuth approval. The tool captures session tokens via browser login or accepts bot tokens, and outputs JSON for all read commands, enabling agents to search messages, read threads, and send replies directly from the terminal. It supports features like reading Canvases as Markdown, sending Block Kit messages, and using Slack's search operators, with credentials stored locally with restricted permissions.", "body_md": "Your AI agent can read your repo, run your tests, and open a pull request. Then it hits a wall. The context it needs is in Slack: the incident thread, the decision nobody wrote down, the \"we changed the deploy order last week\" message.\n\nGetting an agent into Slack normally means building a Slack app, picking OAuth scopes, and waiting for an admin to approve it. That is a lot of work before the first useful message.\n\n** SlackCLI** is a different path. It is a single open source binary that talks to Slack from your terminal, and every read command speaks JSON. If your agent can run a shell command, it can use Slack.\n\nSlackCLI is an unofficial project. It is not affiliated with or supported by Slack Technologies.\n\n```\nbrew tap shaharia-lab/tap\nbrew install slackcli\n\nslackcli auth login-auto\n```\n\n`login-auto`\n\nopens a browser, you sign in to Slack the way you always do, and SlackCLI captures the session tokens for **every workspace on that account**. Nothing leaves your machine. Credentials land in `~/.config/slackcli/workspaces.json`\n\nwith file mode `0600`\n\n.\n\nPrefer a real bot token for a server or a CI job? That works too:\n\n```\nslackcli auth login --token=xoxb-your-token --workspace-name=\"My Team\"\n```\n\nNow try something:\n\n```\nslackcli conversations unread\n```\n\nDemo: [https://github.com/shaharia-lab/slackcli#-see-it-in-action](https://github.com/shaharia-lab/slackcli#-see-it-in-action)\n\nSign in, browse conversations, search the workspace, read a thread from a permalink, reply, react, read a Canvas as Markdown, and pipe `--json`\n\ninto `jq`\n\n. All from the terminal.\n\nMost agent frameworks are happiest when a tool is a plain command with plain output. SlackCLI is built exactly that way.\n\n`--json`\n\n, so the agent gets structured data instead of screen scraping.`0`\n\non success, `1`\n\non failure. An empty search result is still a success, so check the data, not the exit code.`--workspace=automation-bot`\n\nto any command to pick an identity on purpose.\n\n```\nslackcli conversations unread --json | jq '[.unread_channels[] | {name, unread_count}]'\n```\n\nFeed that to a model and you have a morning digest.\n\n```\nslackcli conversations read --permalink=\"$LINK\" --json | jq -r '.messages[].text'\n```\n\nThe JSON also carries a resolved `users`\n\narray, so user IDs are not opaque.\n\n```\nslackcli search messages \"deploy failed\" --in=engineering --limit=50 --json\n```\n\nAll of Slack's own search operators work: `in:`\n\n, `from:`\n\n, `before:`\n\n, `after:`\n\n, `has:`\n\n, `is:`\n\n.\n\n```\nslackcli search channels incident --json\nslackcli search people \"ada@example.com\" --json\nslackcli messages send --permalink=\"$LINK\" --message=\"Root cause found, fix is in #4821\"\n```\n\nPassing a permalink replies in that thread, so no ID juggling is needed.\n\n```\nslackcli messages send \\\n  --recipient-id=C1234567890 \\\n  --message=\"Nightly build report\" \\\n  --blocks='[{\"type\":\"markdown\",\"text\":\"# Nightly build\\n\\n- [x] Build\\n- [x] Tests\\n- [ ] Deploy\"}]'\n```\n\nNative Block Kit `markdown`\n\nand `table`\n\nblocks mean headings, task lists, code fences, and real tables instead of a wall of text.\n\n```\nslackcli canvas read F1234567890 --json | jq -r '.markdown'\n```\n\nTeam runbooks and specs often live in a Canvas. Now they are just Markdown your agent can read.\n\nYou do not need an SDK or an MCP server. Give the agent shell access and one short instruction block:\n\n```\nYou can use the `slackcli` command to work with Slack.\n\nRead commands (always add --json):\n  slackcli conversations unread --json\n  slackcli conversations read <channel-id|--permalink=URL> --json\n  slackcli search messages \"<query>\" --in=<channel> --json\n  slackcli canvas read <file-id> --json\n\nWrite commands (ask me first):\n  slackcli messages send --permalink=<url> --message=\"<text>\"\n  slackcli messages react --permalink=<url> --emoji=<name>\n\nRun `slackcli <group> --help` if you need the exact options.\n```\n\nThat is the whole integration. A useful first prompt:\n\nRead the last 50 messages in #incidents, find any unresolved issue from today, and draft a summary for me. Do not post it yet.\n\nBecause `slackcli <group> --help`\n\nprints the authoritative options for the installed version, an agent can discover the rest on its own.\n\nSlack access is real access, so a few rules are worth setting up front.\n\n`~/.config/slackcli/workspaces.json`\n\nand the browser profile hold live credentials. Do not commit them, sync them, or copy them around. `slackcli auth logout`\n\nclears both.`slackcli auth login-auto --headless`\n\nrenews them in an unattended job once the profile has signed in once.\n\n```\nbrew tap shaharia-lab/tap\nbrew install slackcli\nslackcli auth login-auto\nslackcli conversations unread\n```\n\nSlackCLI is MIT licensed, built with [Bun](https://bun.sh), and ships prebuilt binaries for macOS, Linux, and Windows. It has over 400 tests and a full [user guide](https://github.com/shaharia-lab/slackcli/blob/main/docs/README.md).\n\n** ⭐ Star it on GitHub** if it saves you a trip to the Slack tab, and tell me in the comments what you would want your agent to do in Slack. Feature requests start as", "url": "https://wpnews.pro/news/let-your-ai-agent-use-slack-one-cli-no-slack-app-needed", "canonical_source": "https://dev.to/shaharia/let-your-ai-agent-use-slack-one-cli-no-slack-app-needed-1279", "published_at": "2026-08-23 14:44:36+00:00", "updated_at": "2026-08-23 15:13:27.031159+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-tools"], "entities": ["Shaharia Lab", "SlackCLI", "Slack"], "alternates": {"html": "https://wpnews.pro/news/let-your-ai-agent-use-slack-one-cli-no-slack-app-needed", "markdown": "https://wpnews.pro/news/let-your-ai-agent-use-slack-one-cli-no-slack-app-needed.md", "text": "https://wpnews.pro/news/let-your-ai-agent-use-slack-one-cli-no-slack-app-needed.txt", "jsonld": "https://wpnews.pro/news/let-your-ai-agent-use-slack-one-cli-no-slack-app-needed.jsonld"}}