pp-slack
Original:🇺🇸 English
Translated
Slack workspace CLI for the terminal. Send messages, search channels and DMs, list conversations, get user/bot/emoji info, analyze channel health, find stale threads, and sync the workspace locally for fast offline queries. Two auth surfaces coexist: SLACK_BOT_TOKEN (xoxb-, for workspace-wide read + post) and SLACK_USER_TOKEN (xoxp-, for user-scoped actions like DM history or search). Use when the user asks to send a Slack message, search Slack, check channel activity, summarize a digest, find who's on a team, find stale threads, analyze channel health, list users / emoji / reminders / pinned items, or wants offline-capable Slack queries.
4installs
Added on
NPX Install
npx skill4agent add mvanhorn/printing-press-library pp-slackTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Slack - Printing Press CLI
Prerequisites: Install the CLI
This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
slack-pp-cli- Install via the Printing Press installer:
bash
npx -y @mvanhorn/printing-press install slack --cli-only - Verify:
slack-pp-cli --version - Ensure (or
$GOPATH/bin) is on$HOME/go/bin.$PATH
If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
npxbash
go install github.com/mvanhorn/printing-press-library/library/productivity/slack/cmd/slack-pp-cli@latestIf reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds.
--version$PATHWhen to Use This CLI
Reach for this when the user wants:
- send a Slack message to a channel or DM
- search Slack across channels, DMs, and threads (live or synced)
- list users, channels, usergroups, custom emoji, pinned items, or reminders
- understand channel health (quiet channels, activity trends, response times, digest)
- find stale or unanswered threads across the workspace
- pull an activity summary for a user or channel
- export channel history to JSONL for archival or migration
- discover the funniest messages in public channels (local-sync-powered novelty query)
Skip it when the user wants to create Slack apps, workflows, or manage admin-only team settings beyond access logs. Those surfaces are better served by the Slack web admin.
teamTwo Auth Surfaces
Slack has two parallel token types and this CLI supports both:
| Token | Scopes | When to use |
|---|---|---|
| workspace-scoped bot permissions | Default for post-message, read-channel, list-users, etc. |
| user-scoped | DM history, search on behalf of a user, stars, reminders |
Set whichever the workspace permits. If both are set, user-token wins for user-scoped endpoints and bot-token otherwise. Get a token at -> your app -> OAuth & Permissions.
https://api.slack.com/appsArgument Parsing
Parse :
$ARGUMENTS- Empty, , or
help-> show--helpslack-pp-cli --help - Starts with -> ends with
install-> MCP installation; otherwise -> CLI installationmcp - Anything else -> Direct Use (map to the best command and run it)
MCP Server Installation
The CLI also ships an MCP server at . Install and register:
slack-pp-mcpbash
go install github.com/mvanhorn/printing-press-library/library/productivity/slack/cmd/slack-pp-mcp@latest
claude mcp add -e SLACK_BOT_TOKEN=xoxb-... slack-pp-mcp -- slack-pp-mcpAsk the user for the actual token value before running.
Direct Use
- Check installed: . If missing, offer CLI installation.
which slack-pp-cli - Discover commands: ; drill into
slack-pp-cli --help.slack-pp-cli <cmd> --help - Match the user query to the best command (see Notable Commands below).
- Execute with for structured output:
--agentbashslack-pp-cli <command> [args] --agent - The flag sets
--agent.--json --compact --no-input --no-color --yes
Source routing (local vs live) is controlled by : (default) prefers local-synced data with live fallback; always hits the API; runs fully offline against the SQLite snapshot. Run first to populate the local store for analytics queries.
--data-sourceautolivelocalslack-pp-cli syncNotable Commands
| Command | What it does |
|---|---|
| List channels and DMs in the workspace |
| List all users in the workspace |
| Full-text search across synced messages (or live API with |
| Daily/weekly activity digest from locally synced data |
| Channel health report (activity, engagement, stagnation) |
| Find dead or low-activity channels |
| Average first-response time in threads |
| Unanswered or stale threads |
| Activity summary across channels from local sync |
| Week-over-week channel activity trends |
| Populate the local SQLite store for offline analytics |
| Workspace directory queries |
| Access logs (requires admin token) |
Run any command with for full flag documentation.
--helpAgent Mode
Add to any command. Expands to: .
--agent--json --compact --no-input --no-color --yes- Pipeable — JSON on stdout, errors on stderr
- Filterable — keeps a subset of fields, with dotted-path support (see below)
--select - Previewable — shows the request without sending
--dry-run - Cacheable — GET responses cached for 5 minutes, bypass with
--no-cache - Non-interactive — never prompts, every input is a flag
Filtering output
--selectbash
slack-pp-cli <command> --agent --select id,name
slack-pp-cli <command> --agent --select items.id,items.owner.nameUse this to narrow huge payloads to the fields you actually need — critical for deeply nested API responses.
Response envelope
Data-layer commands wrap output in . Parse for data and to know whether it's or local. The summary is printed to stderr only when stdout is a TTY; piped/agent consumers see pure JSON on stdout.
{"meta": {...}, "results": <data>}.results.meta.sourceliveN results (live)Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error (wrong arguments) |
| 3 | Resource not found (channel, user, message) |
| 4 | Authentication required (token missing or invalid) |
| 5 | API error (Slack upstream, including |
| 7 | Rate limited (Slack 429; CLI honors |