@rusintez/slack
v0.2.2
Published
Agent-friendly Slack CLI and library with local sync and triggers
Maintainers
Readme
@rusintez/slack
Agent-friendly Slack CLI with local sync. Markdown I/O by default.
Install
npm install -g @rusintez/slackOr run directly with npx:
npx @rusintez/slack --helpSetup
Add 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 meUsage
Config Management
slack 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 workspaceReading
slack 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, activityWriting
slack 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 messageSync (Local Cache)
Data 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 statsOutput Formats
slack channels # Markdown table (default)
slack channels -f json # JSON
slack channels -f minimal # Tab-separated, one per lineMulti-workspace
slack -w work messages #general
slack -w personal channelsHuman-Friendly Inputs
The CLI accepts readable names instead of IDs:
- Channels:
#general,general, orC1234567890 - Users:
@john,john,[email protected], orU1234567890 - Special:
meresolves to the current user
Config Location
~/.config/slack-cli/config.json
License
MIT
