slackline
slackline gives an AI agent its own Slack identity in a single binary, so it can send messages, read channels, and stream real-time events.
New to slackline? Start with the overview.
One binary. One config file. One bot identity.
Install
Private repo — requires gh CLI, authenticated:
bash <(gh api repos/prime-radiant-inc/slackline/contents/install.sh --jq '.content | @base64d')
Installs to ~/.local/bin/slackline. The script verifies the downloaded release asset's GitHub SHA-256 digest before installing and warns if that directory isn't in $PATH.
When the repo goes public, gh is still required for release metadata and digest verification. Fetch the installer with curl -fsSL https://raw.githubusercontent.com/prime-radiant-inc/slackline/main/install.sh | bash, then let the script verify the release asset before install.
Supported platforms: darwin/arm64, linux/amd64
Setup
Two paths depending on your role.
Admin: provision a new bot
See Provisioning a new bot for the full agentic recipe. The short version:
# One-time per machine: store App Configuration Tokens
slackline provision bootstrap
# Per bot: create the Slack app (non-interactive, machine-readable JSON output)
slackline provision my-bot-name > /tmp/prov.json
Developer / agent: configure with existing tokens
Tokens must be provisioned by an admin first.
slackline init
Prompts for a bot token (xoxb-) and app token (xapp-), validates against the workspace, writes ~/.config/slackline/config.json.
Interactive token prompts require a terminal so pasted secrets are not echoed. For scripts and CI, set SLACKLINE_BOT_TOKEN and SLACKLINE_APP_TOKEN (and optionally SLACKLINE_WORKSPACE_URL) instead of piping tokens into slackline init.
Verify
slackline auth status
slackline auth whoami
auth status validates the bot token with auth.test and validates the app token by opening a Socket Mode connection URL via apps.connections.open.
Commands
send
slackline send --channel <channel> [--message <text>] [--thread <ts>] [--attach <path>] ... [--no-link-names] [--format text|json]
echo "text" | slackline send --channel <channel>
--channel accepts name (#ops), ID (C...), or Slack URL. --message or piped stdin. Trailing newline stripped from stdin. --attach may be repeated; message text is optional when at least one file is attached. Combined attachment size is capped at 100 MB; override with SLACKLINE_MAX_UPLOAD_BYTES.
Mentions: @handle tokens are linkified to real Slack mentions (<@U...>) so the person is actually notified. Matching is by username first (unique), then display/real name. A token that matches no unique user is left as literal text and a warning: line is written to stderr (the message still sends). Email addresses ([email protected]) are never treated as mentions. Pass --no-link-names to post @handle as literal text. Use slackline users --match <name> to find a user's ID.
Default output is compact text:
C... 1234567890.123456
Use --format json for the structured shape:
{"ok":true,"channel":"C...","thread_ts":"...","files":[{"id":"F...","title":"file.txt"}]}
thread_ts is included in output only when --thread was passed.
read
slackline read --channel <channel> [--limit 20] [--thread <ts>] [--since <RFC3339>] [--no-resolve-names] [--format text|json]
Returns the most recent --limit messages in chronological order (oldest first). For both channel and thread reads, --limit counts back from the newest message, so the latest reply is always included. Default output is compact text:
1234567890.123456 U...|alice hello <@U...|bob>
1234567890.654321 U...|bob thread=1234567890.123456 reply
file F... report.pdf 204800 application/pdf Q1 Report
User IDs are resolved to handles: the author column renders as U...|handle, and in-text mentions are enriched from <@U...> to the labeled <@U...|handle> form (the ID is preserved, so it stays machine-parseable). JSON output keeps user as the raw ID and adds a user_name field. Resolution costs one users.list lookup per read; pass --no-resolve-names to skip it and emit raw IDs. Newlines inside Slack message text are escaped as \n so each message starts on one line. Attached files are shown as indented file continuation lines. Use --format json for the JSONL shape.
permalink
slackline permalink --channel <channel> --ts <message-ts>
Prints a Slack permalink for a message:
https://example.slack.com/archives/C.../p1234567890123456
ask
slackline ask --channel <channel> [--message <text>] [--timeout 300] [--poll 10] [--no-link-names] [--no-resolve-names] [--format text|json]
echo "text" | slackline ask --channel <channel>