lox/slack-cli · Archived

slack

Read Slack messages, threads, channels, users, and files via CLI. Use when asked to view Slack URLs, search Slack, look up users, or work with Slack files.

First seen Feb 19, 2026

Installation

$ npx skills add lox/slack-cli --skill slack

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 4
License MIT
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash(slack-cli:*)

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,571 B
  • docs SUMMARY.md 168 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 29 installs

SKILL.md

Slack CLI

A CLI for reading Slack content, searching messages, browsing users, and working with files.

Installation

If slack-cli is not on PATH, install it:

brew install --cask lox/tap/slack-cli

Or: go install github.com/lox/slack-cli@latest

See https://github.com/lox/slack-cli for setup instructions (Slack app creation and OAuth).

Available Commands

slack-cli view <url>          # View any Slack URL (message, thread, or channel)
slack-cli search <query>      # Search messages
slack-cli channel list        # List channels you're a member of
slack-cli channel read        # Read recent messages from a channel name, ID, or URL
slack-cli channel info        # Show channel information by name, ID, or URL
slack-cli file list           # List recent files
slack-cli file info           # Show file metadata
slack-cli file download       # Download a file by ID
slack-cli file upload         # Upload and share a file
slack-cli file delete         # Delete a file by ID
slack-cli thread read         # Read a thread by URL or channel+timestamp (supports --markdown)
slack-cli user list           # List users in the workspace
slack-cli user info           # Show user information
slack-cli auth login          # Authenticate with Slack via OAuth
slack-cli auth status         # Show authentication status

Common Patterns

View a Slack URL the user shared

slack-cli view "https://workspace.slack.com/archives/C123/p1234567890" --markdown

Search for messages

slack-cli search "from:@username keyword"
slack-cli search "in:#channel-name keyword"

Read a channel

slack-cli channel read "#general" --limit 50
slack-cli channel read "https://workspace.slack.com/archives/C123" --markdown

Upload a file

slack-cli file upload "#general" ./report.txt
slack-cli file upload @alice ./report.txt --comment "latest version"

Filter by date

search supports calendar filters: --after, --before, and --on. channel read and thread read also support rolling windows with --last. Dates are interpreted in UTC and accept unambiguous calendar-day formats such as YYYY-MM-DD, YYYY/MM/DD, 18 Apr 2026, and Apr 18 2026. Timestamps, partial dates, and other inputs with times are rejected.

slack-cli search "deploy" --after 2026-04-01 --before 2026-04-30
slack-cli search "incident" --on "Apr 18 2026"
slack-cli channel read "#general" --last 2w
slack-cli thread read "$URL" --on "18 Apr 2026" --json

Machine-readable output (--json / --jsonl)

These commands support --json (pretty array or object) and --jsonl (one record per line): search, channel read, channel list, channel info, file list, file info, thread read, user list, user info.

Message records emit a full normalized shape for machines: ts, threadts (when Slack provides it), type, subtype (when set, e.g. botmessage, channeljoin, channelarchive, huddlethread), user, userid, text (resolver-formatted), textraw, channel, workspace, permalink, replycount, and files when those fields are available. When Slack channel metadata is available, channel.type is one of channel, private_channel, im, or mpim.

slack-cli search "deploy" --limit 20 --jsonl | jq -c 'select(.channel.type == "channel")'
slack-cli channel read "#general" --limit 50 --json
slack-cli file list --limit 20 --jsonl
slack-cli thread read "$URL" --json
slack-cli channel list --json
slack-cli user list --json
slack-cli channel info C123 --json

Discovering Options

To see available subcommands and flags, run --help on any command:

slack-cli --help
slack-cli view --help
slack-cli search --help

Notes

  • Use --markdown with view, thread read, or channel read when you need structured terminal output
  • file upload accepts channel names, conversation IDs, @username, or U123
  • Use --json / --jsonl for agent consumption; --jsonl pipes cleanly into jq -c
  • Thread URLs with thread_ts parameter are automatically detected
  • Channel names can include or omit the # prefix
  • If you see channelnotfound and multiple workspaces are configured, retry with --workspace <workspace>
  • User lookup accepts both user IDs (U123ABC) and email addresses