OotbDevteam.SlackConsole
1.1.0
dotnet tool install --global OotbDevteam.SlackConsole --version 1.1.0
dotnet new tool-manifest
dotnet tool install --local OotbDevteam.SlackConsole --version 1.1.0
#tool dotnet:?package=OotbDevteam.SlackConsole&version=1.1.0
nuke :add-package OotbDevteam.SlackConsole --version 1.1.0
OotbDevteam.SlackConsole
Global CLI for the Slack Web API. Channels, messages, threads, Block Kit, reactions, files, and users — built for scripts and AI agent workflows.
Command name: slack-console
Publisher: Ootb Devteam
Install
Requires .NET 10.
dotnet tool install --global OotbDevteam.SlackConsole
dotnet tool update --global OotbDevteam.SlackConsole
dotnet tool uninstall --global OotbDevteam.SlackConsole
Environment variables
All configuration is via environment variables. There are no config files and no token files.
| Variable | Required | Default | Purpose |
|---|---|---|---|
SLACK_TOKEN |
Yes | — | Bot token (xoxb-...) for most commands. Use xoxp-... for message search. |
SLACK_BASE_URL |
No | https://slack.com/api/ |
Slack Web API base URL |
SLACK_PAGE_SIZE |
No | 50 |
Default page size (1–1000) |
SLACK_OUTPUT_FORMAT |
No | text |
Default output when --format omitted: text or json |
Legacy .NET config keys (Slack__BaseUrl, etc.) also work if already set.
Setup example:
$env:SLACK_TOKEN = "xoxb-..."
slack-console channel list --format json
Bot token scopes
| Scope | Used by |
|---|---|
channels:read, groups:read |
channel list, channel members |
channels:history, groups:history |
message history, message thread |
chat:write |
message post, message edit, message delete |
reactions:read, reactions:write |
reaction list, reaction add/remove |
users:read, users:read.email |
user list, name resolution |
files:read, files:write |
file list, file upload |
search:read |
message search (user token only) |
Global options
| Option | Description |
|---|---|
--format text\|json |
Output format. Overrides SLACK_OUTPUT_FORMAT. |
--verbose |
API URLs and HTTP status to stderr. |
--json <string\|-> |
Parameters as JSON. ASCII-only. |
--json-file <path> |
UTF-8 JSON parameters file. Use for non-ASCII text. |
Exit codes: 0 success, 1 error (message on stderr).
JSON input
CLI flags take precedence. Keys are camelCase.
| Command | JSON keys |
|---|---|
message post |
channel, text, blocks (array or JSON string), threadTs |
message edit |
channel, ts, text, blocks |
message delete |
channel, ts |
message history |
channel, limit, oldest, latest |
message thread |
channel, threadTs |
message search |
query, count |
reaction add/remove/list |
channel, ts, emoji |
file list |
channel, user, count |
file upload |
channel, path, title, comment |
channel members |
channel |
Block Kit post example (--json-file): see examples/block-kit-post.json, or inline:
{
"channel": "C0123456789",
"text": "Notification fallback",
"blocks": [
{ "type": "header", "text": { "type": "plain_text", "text": "Report" } },
{ "type": "section", "text": { "type": "mrkdwn", "text": "*Status:* compliant" } }
]
}
Provide --text, blocks, or both. Use --no-unfurl when messages contain Slack permalinks.
JSON output (--format json)
channel list
JSON array: { "id", "name", "numMembers", "isPrivate", "isArchived", "purpose" }.
message history / message thread / message search
JSON array of messages:
{
"ts": "1700000000.000001",
"user": "U0123456789",
"userName": "Alex Rivers",
"text": "message body",
"resolvedText": "message with @names resolved",
"threadTs": "1700000000.000001",
"replyCount": 3,
"channel": { "id": "C0123456789", "name": "team-platform" },
"permalink": "https://example.slack.com/archives/C0123456789/p1700000000000001"
}
message post / message edit (success)
{ "ok": true, "ts": "1700000001.000001" }
user list
JSON array: { "id", "name", "realName", "email", "title", "isBot" }.
reaction list
JSON array: { "name", "users": ["U...", ...] }.
User IDs in message output are resolved to display names in userName / resolvedText when --format text; raw IDs remain in JSON fields for scripting.
Commands
slack-console channel list [--include-archived] [--format json]
slack-console channel members --channel <id>
slack-console message search --query "ACME-1444"
slack-console message history --channel <id> [--limit 200] [--oldest <unix>] [--latest <unix>]
slack-console message thread --channel <id> --thread-ts <ts>
slack-console message post --channel <id> [--text "..."] [--blocks-file blocks.json] [--no-unfurl] [--thread-ts <ts>]
slack-console message edit --channel <id> --ts <ts> [--text "..."] [--blocks-file blocks.json]
slack-console message delete --channel <id> --ts <ts>
slack-console reaction add --channel <id> --ts <ts> --emoji thumbsup
slack-console file upload --channel <id> --path ./file.pdf [--title "..."]
slack-console user list
Cursor CLI
"permissions": { "allow": ["Shell(slack-console)"], "deny": [] }
Ensure SLACK_TOKEN is set in the environment the agent uses.
Agent skill (Cursor)
The CLI ships via NuGet; the agent skill lives in this repo as SKILL.md.
Copy into your personal skills folder:
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.cursor\skills\slack-console"
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/ognjenkatic/ootb-devteam/main/slack/SKILL.md" -OutFile "$env:USERPROFILE\.cursor\skills\slack-console\SKILL.md"
Or download SKILL.md from GitHub and place it at ~/.cursor/skills/slack-console/SKILL.md.
Source
https://github.com/ognjenkatic/ootb-devteam/tree/main/slack — see DEVELOPMENT.md for building from source.
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0 | 94 | 5/25/2026 |