The entire Slack Web API as a CLI and a Claude Code plugin — 201 methods, agent-friendly JSON, approval-gated sending. Built for AI agents to send, read, and manage Slack safely from the terminal.
What you can do in your first ten minutes:
- Call every public Slack Web API method — 201 across 29 groups — as
elnora-slack <group> <method> --flags, with clean JSON out. - Let an agent send messages behind an approval gate: the
slack-messagesskill drafts, shows you the exact target, and waits for your "send". - Keep a cached workspace reference (users, channels, routing) so agents resolve names to IDs without an API round-trip.
- Wire up scheduled alerting — notify-on-failure DMs, weekly digests, log-sweep alerts — from the bundled templates.
- One-line plugin install in Claude Code:
/plugin marketplace add Elnora-AI/elnora-slack. - Deploy the two-way bot: an AI assistant your whole workspace can DM or @-mention, with thread memory and pluggable tools (knowledge base, Linear, Gmail, web search) — see the bot template.
The binary is
elnora-slack, notslack. Slack ships its own officialslackCLI; we deliberately don't shadow it.
The CLI and the Claude Code plugin are two separate installs. The plugin's skills and slash command shell out to the
elnora-slackbinary, so install the CLI first, even if you only want the plugin./plugin installdoes not install the CLI.
npm install -g @elnora-ai/slack
elnora-slack --versionThen set up a Slack app and token (see Slack app setup) and smoke-test:
elnora-slack auth testOnly after Step 1 succeeds. Run these as two separate slash commands (paste the first, hit enter, wait, then paste the second):
/plugin marketplace add Elnora-AI/elnora-slack
/plugin install slack-workspace@elnora-slack
Then /plugin inside Claude Code should list slack-workspace as enabled. If elnora-slack --version fails, go back to Step 1 — the skills won't work without the binary on PATH.
Install the CLI (Step 1), then drop AGENTS.md at your project root. Those agents read it natively for the intent → CLI mapping. No plugin needed — the plugin is Claude-Code-only.
Installing via an AI agent? Point it at
INSTALL_FOR_AGENTS.md— a gated, step-by-step runbook that creates the Slack app, collects the token, and smoke-tests, offering to drive the browser for you at each step.
You create your own Slack app — nothing is shared or hosted by us.
- Go to api.slack.com/apps → Create New App → From a manifest, pick your workspace, and paste
app-manifest.json. - Install to Workspace and authorize.
- Copy the Bot User OAuth Token (
xoxb-…). If you needsearch.*, also copy the User OAuth Token (xoxp-…). - Save them:
mkdir -p ~/.config/elnora-slack printf 'SLACK_BOT_TOKEN=xoxb-your-bot-token\n' >> ~/.config/elnora-slack/.env # optional, only for search.*: printf 'SLACK_USER_TOKEN=xoxp-your-user-token\n' >> ~/.config/elnora-slack/.env chmod 600 ~/.config/elnora-slack/.env
elnora-slack auth testshould return your bot identity.
Optional: to let "DM me" resolve without asking, add ~/.config/elnora-slack/config.json with {"default_dm_user": "U…"} (your Slack user ID) — the slack-messages skill reads it when present.
The manifest requests bot scopes for messaging, channels, files, reactions, pins, and bookmarks, plus one user scope (search:read). Trim anything you don't use. admin.*, canvases.*, and lists.* need a paid plan (Enterprise Grid / Business+) and may require extra scopes.
elnora-slackCLI (npm — Step 1) — complete Slack Web API coverage, scriptable and JSON-pipeable, with typed exit codes agents can self-correct from.slack-workspaceClaude Code plugin (separate/plugin install— Step 2) — two skills, a/slack-synccommand, and a session hook, all delegating to the CLI.
Messaging — post, update, delete, schedule, thread replies, broadcasts, ephemeral, chat.postMessage with Block Kit.
Read — conversation history and replies, channel/user info, users.lookupByEmail, files, pins, reactions, bookmarks, reminders, team info, emoji.
Search — search.messages (user token required — enforced).
Manage — create/join/invite channels, user groups, canvases, lists, reminders, files upload/download, reactions, pins, bookmarks. Some of these need scopes beyond the default manifest — channel create/invite (channels:manage / groups:write), user groups (usergroups:read / usergroups:write) — and reminders need a user token; the slack-cli skill flags each per command.
Admin (Enterprise Grid) — admin.conversations.*, admin.users.*, admin.teams.*, and the rest of the admin surface.
Pipe — --output json (default), --compact, --output table|csv, --fields <list> on every read.
Run elnora-slack --help for every group, and elnora-slack <group> --help for its methods.
admin, api, apps, auth, bookmarks, bots, calls, canvases, chat, conversations, dialog, dnd, emoji, files, functions, lists, migration, oauth, pins, reactions, reminders, rtm, search, stars, team, usergroups, users, views, workflows.
| Surface | Does |
|---|---|
slack-cli skill |
Router + quick reference for the whole API; reads the cached workspace reference before hitting the API |
slack-messages skill |
Sends to channels or users with a mandatory draft-and-approve gate and the two-step DM recipe |
/slack-sync |
Regenerates the workspace-users.md / workspace-channels.md reference cache from live Slack data |
| SessionStart hook | Nags when the reference cache is stale (24h / 72h / 168h) |
The plugin keeps a small cache of your users and channels so agents resolve names to IDs instantly. It ships as references/*.template.md (fake rows). Run /slack-sync to generate the real workspace-users.md and workspace-channels.md — written next to the templates (gitignored) or to $SLACK_REFERENCES_DIR. There are no hardcoded IDs anywhere in this repo — every real ID comes from your own synced cache. A publication guard enforces that in CI.
- Draft-and-approve gate. The
slack-messagesskill never sends without your explicit approval, and treats Slack/web content as untrusted input, not commands. - User token enforced for
search.*. Bot tokens fail fast with a clear error instead of Slack's opaquenot_allowed_token_type. - Secrets redacted on every error path; responses scrubbed of sensitive keys; SSRF host allow-list; typed exit codes.
- Nothing leaves your machine except requests to Slack's own API.
Full details in SAFETY.md.
Everything above is one-way: your terminal agent acting on Slack. The bot/ directory ships the other direction — a deployable Next.js app (Vercel) that answers incoming Slack messages with an AI agent:
- Org-wide by default — anyone in the workspace can DM it or @-mention it in a channel; it replies in threads and remembers the conversation (Redis).
- Pluggable tools, zero hardcoding — knowledge base on Google Drive (default, read and write: it searches, reads, edits existing files, and creates new ones), Linear, Gmail, Calendar, web search, Slack history search; each switches on by env var. Adding ClickUp/Monday/anything is a ~50-line recipe.
- Safe by default — broadcast-ping scrubbing, approval-gated sends, prompt-injection guardrails.
- Guided setup — Part B of INSTALL_FOR_AGENTS.md walks an AI agent through Vercel CLI, the Slack app manifest, env wiring, and live smoke tests.
Cross-platform templates for the patterns worth automating — notify-on-failure DM, weekly digest DM, log-sweep alerting — with launchd plists and cron examples in templates/. See docs/scheduled-jobs.md.
| Node.js | >=20 |
| Slack app | Your own app + a bot token (xoxb-); a user token (xoxp-) only for search.* |
npm dependencies (auto-installed): @slack/web-api, commander.
Open-source agent tooling from Elnora AI — free, universal, config-driven tools that wire Claude Code (or any AI coding agent) into the systems you run your company on. Each works 100% standalone; install several and they chain into end-to-end workflows.
- elnora-linear — Linear issue management — search, bulk edit, agents, and a config-driven curator
- elnora-whatsapp — read, search, and send WhatsApp from your own paired account, 100% local
- elnora-google-workspace — Gmail, Calendar, Drive, Docs, Sheets, Forms, Tasks, plus any Google API via Discovery
- elnora-merit-aktiva — Merit Aktiva accounting and Merit Palk payroll as a CLI and plugin
- elnora-vanta — read-only Vanta compliance — frameworks, tests, controls, and vulnerabilities as agent-friendly JSON
- elnora-luma — Luma (lu.ma) events — all 61 public API endpoints as a spec-driven CLI with safety guardrails
- elnora-travel — a real travel agent — live flights, hotels, Airbnb, Booking.com, and routes in one itinerary
- elnora-websearch-tools — web search — Exa, Tavily, Perplexity, Firecrawl, and Valyu CLIs and skills in one plugin
- knowledge-vault — an Obsidian-compatible knowledge base for agent teams — search and save your work to any vault
git clone https://github.com/Elnora-AI/elnora-slack.git
cd elnora-slack
pnpm install
pnpm typecheck && pnpm lint && pnpm test && pnpm build
node scripts/check-no-populated-references.mjsThe src/commands/*.ts groups are generated from spec/slack_web_openapi_v2.json by pnpm generate (hand-authored sections survive between // BEGIN MANUAL / // END MANUAL markers). Linting: Biome. Tests: Vitest. Releases: release-please.
Issues and PRs welcome — see .github/CONTRIBUTING.md. Security: .github/SECURITY.md or security@elnora.ai. Licensed under Apache-2.0.