A CLI for Slack - search, read channels/threads, and browse users from the command line.
brew install lox/tap/slack-cligo install github.com/lox/slack-cli@latestDownload from releases.
git clone https://github.com/lox/slack-cli.git
cd slack-cli
mise run buildEach workspace requires a Slack app for OAuth:
- Go to https://api.slack.com/apps → Create New App → From an app manifest
- Select your workspace
- Paste the contents of
slack-app-manifest.yaml - Click Create
- From Basic Information, copy the Client ID and Client Secret
slack-cli auth configThis will prompt you to paste your Client ID and Secret, which are stored in ~/.config/slack-cli/config.json.
slack-cli auth loginThis opens your browser for OAuth. Approve the permissions and you're logged in.
For CI or automation, you can use environment variables instead of auth config:
export SLACK_CLIENT_ID="your-client-id"
export SLACK_CLIENT_SECRET="your-client-secret"
slack-cli auth loginEnvironment variables take precedence over the config file.
slack-cli view <url> # View message, thread, or channel
slack-cli view <url> --markdown # Output as markdownslack-cli channel list # List channels you're in
slack-cli channel read #general # Read recent messages
slack-cli channel info #general # Show channel detailsslack-cli search "from:@alice project" # Search messages
slack-cli search "in:#engineering bug" # Search in channelslack-cli thread read <url> # Read thread by URL
slack-cli thread read -c C123 -t 1234567890.123 # Read by channel+tsslack-cli user list # List workspace users
slack-cli user info U123 # Show user details
slack-cli user info alice@acme.com # Lookup by emailslack-cli auth config # Configure Slack app credentials
slack-cli auth login # Authenticate with Slack
slack-cli auth status # Check auth status
slack-cli auth logout # Clear stored tokenAn Amp skill is included for AI agent integration:
amp skill add lox/slack-cliThis enables agents to use the CLI when asked to view Slack URLs, search messages, or look up users. See the Amp manual for more on skills.
The included manifest requests these user token scopes:
channels:history- Read public channel messageschannels:read- List public channelsgroups:history- Read private channel messagesgroups:read- List private channelssearch:read- Search messagesusers:read- List usersusers:read.email- Lookup users by email
MIT