appitool slack
Sends a message to Slack using either an incoming webhook or a bot token. The bold title and message go in the top-level text; a colored attachment (green for success / red for failure) carries the status bar and footer.
Formatting & Mentions
--title and --message are sent unescaped as Slack mrkdwn, so Slack's syntax is parsed and the text is used for mobile notifications:
| Syntax | Result |
|---|---|
*bold*, _italic_, ~strike~, `code`, > quote | Text styling |
<https://example.com|label> | Link with label |
<@U0123456789> | User mention (notifies only members of the channel) |
<#C0123456789> | Channel link |
<!here>, <!channel>, <!everyone> | Special mentions |
<!subteam^S0123456789> | User group mention |
<!date^1700000000^{date_short}|fallback> | Localized date |
Mentions use IDs, not display names. Write a literal &, <, or > as &, <, >. In flow notifications, title and message are escaped and shown literally instead.
Delivery Modes
| Mode | Credentials | Channel | Threads |
|---|---|---|---|
| Incoming webhook | --url / SLACK_URL | Fixed by the webhook | No |
Bot token (chat.postMessage) | --token / SLACK_BOT_TOKEN (xoxb-…, chat:write scope) | --channel / SLACK_CHANNEL (ID or name) | --thread-ts |
Destination Resolution
--urland--tokentogether is an error.--token→ bot token mode.--url→ webhook mode (never falls back toSLACK_BOT_TOKEN).- Otherwise
SLACK_BOT_TOKEN(bot token mode) takes precedence overSLACK_URL(webhook mode).
In bot token mode a channel is required. --channel and --thread-ts are rejected in webhook mode. The bot must be a member of the channel (or have the chat:write.public scope for public channels). On success, the posted message's ts is printed so you can reply to it with --thread-ts.
Synopsis
appitool slack -m <message> [options]Options
| Option | Default / .env Fallback | Description |
|---|---|---|
--title <title> | appitool | Bold first line of the message (mrkdwn, sent as-is). |
-m, --message <message> | Required | Message text (Slack mrkdwn, sent as-is). |
--status <status> | success | Attachment color: success (green) or failure (red). |
--url <url> | SLACK_URL | Slack incoming webhook URL. |
--token <token> | SLACK_BOT_TOKEN (when --url is omitted) | Slack bot token (xoxb-…). |
--channel <channel> | SLACK_CHANNEL | Channel ID or name (bot token only). |
--thread-ts <ts> | — | Parent message ts to reply in a thread (bot token only). |
Examples
# Webhook, using SLACK_URL from .env
appitool slack -m "Release v1.2.0 deployed to TestFlight."
# Mention a user and the channel's active members
appitool slack -m "<!here> *v1.2.0* is live. Thanks <@U0123456789>!"
# Bot token to a specific channel
appitool slack --token "xoxb-…" --channel C0123456789 --title "CI" -m "Build #128 failed." --status failure
# Reply in a thread (ts printed by a previous bot token send)
appitool slack --channel C0123456789 --thread-ts 1700000000.000100 -m "Retry succeeded."