slack-axi
A CLI for reading, searching, and citing Slack with agent-ergonomic (TOON) output. Replaces the
flaky Slack MCP: a stored user token (no logouts, works headless), all conversation types discoverable,
human date windows (no epoch math), threads inlined, and permalinks on demand.
Run commands with npx -y slack-axi <command> (or slack-axi if installed on PATH). Channel
arguments accept #name, bare name, or an id (C…/G…/D…) interchangeably.
Orient
npx -y slack-axi — home: active workspace + your channel count.
npx -y slack-axi doctor — verify the token works and scopes are covered.
Find channels (incl. private channels, group DMs, DMs)
npx -y slack-axi channels — your conversations across ALL types (capped; use --match/--type).
npx -y slack-axi channels --match proj — fuzzy-find by name.
npx -y slack-axi channels --type private — filter (public|private|mpim|im); --all for the whole workspace.
npx -y slack-axi dms — DMs and group DMs with participants.
npx -y slack-axi members <channel> — channel members; external/shared-channel and guest names resolved on demand, unresolvable ids shown as Uxxxx (unresolved).
npx -y slack-axi user <id|@handle> [...] — look up users by id or handle: real/display name and whether each is external (Slack Connect), a guest, or a bot. Resolves shared-channel members the roster misses.
Read a channel over a time window (the primary verb)
npx -y slack-axi read <channel> — last 7 days, thread replies inlined, names resolved.
npx -y slack-axi read <channel> --from 2026-04-23 --to 2026-04-29 — explicit window (human dates).
npx -y slack-axi read <channel> --since 24h — relative span (90m, 24h, 7d).
- Flags:
--threads full|summary|none, --limit <n>, --exclude-bots, --tz <zone>, --cite, --full.
- The output header echoes the resolved range with explicit year + timezone (sanity-check the year),
a
complete: true|false marker, and a top-level messages: N of M count — coverage is never silently
partial.
npx -y slack-axi thread <channel> <ts> — read one thread fully.
read/thread show a counts-only reactions column (:emoji:×N) when any message in view has
reactions — free, already in the data. For who reacted, use the reactions command below.
read/thread also show a files column when a message has attachments — name (type, size) [F-id],
free from the same payload. Use the F-id with download to fetch the bytes.
Files / attachments
npx -y slack-axi download <file-id…> [--out <dir>] — fetch one or more attachments (file ids from a
read/thread files column) to local files; prints the saved absolute paths so you can open them
(e.g. to view a screenshot). Read-only against Slack; needs the files:read scope. Downloading is
explicit — reading a thread lists attachments but never fetches their bytes on its own.
Reactions (who reacted)
npx -y slack-axi reactions <channel> <ts> — every emoji on a message + the complete, name-resolved
roster of who reacted (count-desc). Sourced from reactions.get full=true (the only complete source;
the inline counts come truncated-roster-free from history). Pass a ts handle from a read/search
row.
Search (find a thing — NOT a window sweep)
npx -y slack-axi search "<query>" — across the workspace.
- Modifiers:
--in <channel>, --from <@user> (sender), --with <@user> (conversations including a
person), --after <date|span>, --before <date|span>, --limit <n>, --cite.
- To read a channel over a window completely, use
read --from --to, not search.
Cite (permalinks for the messages you reference)
Read/search rows carry a compact ts handle, not a full permalink. To turn handles into permalinks:
npx -y slack-axi cite <channel> <ts> [<ts> ...] — reconstructs permalinks (with thread_ts for
replies) and emits {channel, ts, permalink} per message — ready to drop into a citation record.
- Or pass
--cite to read/search to inline permalinks up front (for bulk ingestion).
Setup (once per workspace)
npx -y slack-axi auth setup — generates an app manifest (all scopes pre-filled, token rotation off)
and walks you through creating + installing a Slack app, then auth login --token xoxp-….
npx -y slack-axi setup hooks — install a SessionStart hook so each agent session starts with the
slack-axi home view as ambient context.
1---2name: slack-axi3description: Read, search, and cite Slack from the shell. Use when asked to read or summarize a Slack channel, find a discussion across Slack, look up private channels / group DMs / DMs, read a channel over a date range, follow a thread, or produce permalink citations for Slack messages. Token-efficient TOON output; human date ranges in, permalinks out.4---56# slack-axi78A CLI for reading, searching, and citing Slack with agent-ergonomic (TOON) output. Replaces the9flaky Slack MCP: a stored user token (no logouts, works headless), all conversation types discoverable,10human date windows (no epoch math), threads inlined, and permalinks on demand.1112Run commands with `npx -y slack-axi <command>` (or `slack-axi` if installed on PATH). Channel13arguments accept `#name`, bare `name`, or an id (`C…`/`G…`/`D…`) interchangeably.1415## Orient1617- `npx -y slack-axi` — home: active workspace + your channel count.18- `npx -y slack-axi doctor` — verify the token works and scopes are covered.1920## Find channels (incl. private channels, group DMs, DMs)2122- `npx -y slack-axi channels` — your conversations across ALL types (capped; use `--match`/`--type`).23- `npx -y slack-axi channels --match proj` — fuzzy-find by name.24- `npx -y slack-axi channels --type private` — filter (public|private|mpim|im); `--all` for the whole workspace.25- `npx -y slack-axi dms` — DMs and group DMs with participants.26- `npx -y slack-axi members <channel>` — channel members; external/shared-channel and guest names resolved on demand, unresolvable ids shown as `Uxxxx (unresolved)`.27- `npx -y slack-axi user <id|@handle> [...]` — look up users by id or handle: real/display name and whether each is external (Slack Connect), a guest, or a bot. Resolves shared-channel members the roster misses.2829## Read a channel over a time window (the primary verb)3031- `npx -y slack-axi read <channel>` — last 7 days, thread replies inlined, names resolved.32- `npx -y slack-axi read <channel> --from 2026-04-23 --to 2026-04-29` — explicit window (human dates).33- `npx -y slack-axi read <channel> --since 24h` — relative span (`90m`, `24h`, `7d`).34- Flags: `--threads full|summary|none`, `--limit <n>`, `--exclude-bots`, `--tz <zone>`, `--cite`, `--full`.35- The output header echoes the resolved range **with explicit year + timezone** (sanity-check the year),36 a `complete: true|false` marker, and a top-level `messages: N of M` count — coverage is never silently37 partial.38- `npx -y slack-axi thread <channel> <ts>` — read one thread fully.39- `read`/`thread` show a counts-only `reactions` column (`:emoji:×N`) when any message in view has40 reactions — free, already in the data. For **who** reacted, use the `reactions` command below.41- `read`/`thread` also show a `files` column when a message has attachments — `name (type, size) [F-id]`,42 free from the same payload. Use the `F-id` with `download` to fetch the bytes.4344## Files / attachments4546- `npx -y slack-axi download <file-id…> [--out <dir>]` — fetch one or more attachments (file ids from a47 `read`/`thread` files column) to local files; prints the saved absolute paths so you can open them48 (e.g. to view a screenshot). Read-only against Slack; needs the `files:read` scope. Downloading is49 explicit — reading a thread lists attachments but never fetches their bytes on its own.5051## Reactions (who reacted)5253- `npx -y slack-axi reactions <channel> <ts>` — every emoji on a message + the complete, name-resolved54 roster of who reacted (count-desc). Sourced from `reactions.get full=true` (the only complete source;55 the inline counts come truncated-roster-free from history). Pass a `ts` handle from a `read`/`search`56 row.5758## Search (find a thing — NOT a window sweep)5960- `npx -y slack-axi search "<query>"` — across the workspace.61- Modifiers: `--in <channel>`, `--from <@user>` (sender), `--with <@user>` (conversations including a62 person), `--after <date|span>`, `--before <date|span>`, `--limit <n>`, `--cite`.63- To read a channel over a window completely, use `read --from --to`, not `search`.6465## Cite (permalinks for the messages you reference)6667Read/search rows carry a compact `ts` handle, not a full permalink. To turn handles into permalinks:6869- `npx -y slack-axi cite <channel> <ts> [<ts> ...]` — reconstructs permalinks (with `thread_ts` for70 replies) and emits `{channel, ts, permalink}` per message — ready to drop into a citation record.71- Or pass `--cite` to `read`/`search` to inline permalinks up front (for bulk ingestion).7273## Setup (once per workspace)7475- `npx -y slack-axi auth setup` — generates an app manifest (all scopes pre-filled, token rotation off)76 and walks you through creating + installing a Slack app, then `auth login --token xoxp-…`.77- `npx -y slack-axi setup hooks` — install a SessionStart hook so each agent session starts with the78 slack-axi home view as ambient context.