Agent-friendly Slack CLI with local sync. Markdown I/O by default.
npm install -g @rusintez/slackOr run directly with npx:
npx @rusintez/slack --helpAdd your Slack workspace token (get from Slack App Settings > OAuth & Permissions):
slack config add work xoxb-your-bot-token
slack config default workRequired OAuth scopes:
channels:read,channels:history— read public channelschannels:join— join channelsgroups:read,groups:history— read private channelsusers:read,users:read.email— read user infochat:write— send/edit/delete messagesreactions:write— add/remove reactionssearch:read— search messages
Or use env var for one-off commands:
SLACK_TOKEN=xoxb-xxx slack meslack config list # List all workspaces
slack config add <name> <key> # Add/update workspace
slack config remove <name> # Remove workspace
slack config default <name> # Set default workspaceslack me # Current user
slack team # Workspace info
slack channels # List channels
slack channel #general # Channel details
slack users # List users
slack user @john # User details
slack messages #general # Get messages
slack thread #general 1234.56 # Thread replies
slack search "deploy" # Search messages
slack inbox # DMs, mentions, activityslack send #general "Hello!" # Send message
slack reply #general 1234.5678 "Thanks!" # Reply to thread
slack react #general 1234.5678 thumbsup # Add reaction
slack unreact #general 1234.5678 thumbsup # Remove reaction
slack edit #general 1234.5678 "Updated text" # Edit message
slack delete #general 1234.5678 # Delete messageData syncs to ~/.local/share/slack/{workspace}/ as flat JSON files (one file per entity).
slack sync # Sync channels, users
slack sync --full # Full sync (remove deleted items)
slack sync --channels # Sync only channels
slack status # Show sync statsslack channels # Markdown table (default)
slack channels -f json # JSON
slack channels -f minimal # Tab-separated, one per lineslack -w work messages #general
slack -w personal channelsThe CLI accepts readable names instead of IDs:
- Channels:
#general,general, orC1234567890 - Users:
@john,john,john@example.com, orU1234567890 - Special:
meresolves to the current user
~/.config/slack-cli/config.json
MIT