Control Slack from your command line
Recommended - install globally with uv (best for use with coding agents like Claude Code, Cursor):
uv tool install slack-clacksAlternative - run directly without installation:
uvx --from slack-clacks clacksAlternative - works with pip, poetry, or any package manager:
pip install slack-clacksAuthenticate via OAuth:
clacks auth login -c <context-name>clacks supports three authentication modes:
clacks mode (default): Full workspace access via OAuth
clacks auth login --mode clacksPermissions: channels, groups, DMs, MPIMs, files, search
clacks-lite mode: Secure, DM-focused access via OAuth
clacks auth login --mode clacks-litePermissions: DMs, MPIMs, reactions only
cookie mode: Browser session authentication
clacks auth login --mode cookieExtract xoxc token and d cookie from browser. No OAuth app needed. See docs/cookie-auth.md for extraction instructions.
Use clacks-lite for security-conscious environments where channel access isn't needed. Use cookie mode for quick testing or when OAuth is impractical. Operations requiring unavailable scopes will fail with a clear error message and re-authentication instructions.
OAuth requires HTTPS. Generate a self-signed certificate:
clacks auth cert generateView current authentication status:
clacks auth statusRevoke authentication:
clacks auth logoutMultiple authentication contexts supported. Initialize configuration:
clacks config initList available contexts:
clacks config contextsSwitch between contexts:
clacks config switch -C <context-name>View current configuration:
clacks config infoSend to channel:
clacks send -c "#general" -m "message text"
clacks send -c "C123456" -m "message text"Send direct message:
clacks send -u "@username" -m "message text"
clacks send -u "U123456" -m "message text"Reply to thread:
clacks send -c "#general" -m "reply text" -t "1234567890.123456"Read messages from channel:
clacks read -c "#general"
clacks read -c "#general" -l 50Read direct messages:
clacks read -u "@username"Read thread:
clacks read -c "#general" -t "1234567890.123456"Read specific message:
clacks read -c "#general" -m "1234567890.123456"View recent messages across all conversations:
clacks recent
clacks recent -l 50All commands output JSON to stdout. Redirect to file:
clacks auth status -o output.json- Python >= 3.13
- Slack workspace admin approval for OAuth app installation