slackr is an automation-friendly Slack CLI aimed at local operators, scripts, and agent workflows.
For the machine-facing surface, see docs/cli_for_agents.md.
- Auth inspection and token refresh:
auth status,auth refresh - Workspace introspection:
auth-test,me,workspace - Agent discovery surface:
agent discover,agent workspace,agent channels,agent users,agent messages,agent threads,agent resolve,agent inspect - Agent registry export:
agent catalog - Agent triage:
agent triage - Channel workflows:
channels,channels info,channels members - User workflows:
user-lookup,users list - Message workflows:
search,channel-read,thread-read,send,reply,react,message permalink - Read-only health checks:
doctor - Operator setup:
init,config ...,completions
slackr resolves auth in this order:
SLACK_BOT_TOKENSLACK_APP_ACCESS_TOKENand optional refresh bundle- Persisted OAuth state at
~/.slackr/auth.toml
Bot token example:
SLACK_BOT_TOKEN=xoxb-...OAuth refreshable example:
SLACK_APP_ACCESS_TOKEN=xoxe.xoxp-1-...
SLACK_APP_REFRESH_TOKEN=xoxe-1-...
SLACK_APP_ACCESS_TOKEN_EXPIRES_AT=1767225600
SLACK_CLIENT_ID=1234567890.1234567890
SLACK_CLIENT_SECRET=replace-meBy default, slackr loads ~/.slackr/.env. If you use --config /path/to/config.toml, it instead loads /path/to/.env.
Initialize the config directory:
slackr initExample config.toml:
default_channel = "C1234567890"
[aliases]
general = "C1234567890"
alerts = "C1122334455"slackr agent discover
slackr agent catalog
slackr agent channels --query alerts
slackr agent messages "deploy failed"
slackr agent triage "deploy failed"
slackr agent inspect slackr://channel/C123
slackr agent threads slackr://message/C123/1712858703.123456
slackr auth status
slackr channels --query alerts
slackr channels info general
slackr channels members general --all
slackr users list --query ryan
slackr channel-read general --limit 10
slackr thread-read general 1712858703.123456
slackr send general "hello from slackr"
slackr message permalink general 1712858703.123456
slackr doctor
slackr completions powershell > slackr.ps1Use --json on most commands to get a stable wrapper:
{
"ok": true,
"data": {},
"meta": null,
"error": null
}Paged commands include metadata such as count, has_more, and next_cursor.
Release-quality checks for the current tree:
cargo fmt
cargo test
cargo clippy -- -D warnings