Slack Integration¶
kim can send notifications to Slack channels via webhooks or bot tokens.
Configuration¶
In ~/.kim/config.json:
| Field | Type | Default | Description |
|---|---|---|---|
enabled |
boolean | false |
Enable Slack notifications |
webhook_url |
string | "" |
Slack incoming webhook URL |
bot_token |
string | "" |
Slack bot token (xoxb-...) |
channel |
string | "#general" |
Channel to post to (required for bot token) |
Important: Use either webhook_url or bot_token + channel, not both.
Setup Methods¶
Method 1: Webhook (Simple)¶
- Create an incoming webhook in your Slack workspace:
- Go to Slack API: Incoming Webhooks
- Click "Create New App" → "From scratch"
- Add "Incoming Webhooks" feature
- Activate and create a webhook for your channel
-
Copy the webhook URL
-
Configure kim:
Method 2: Bot Token (Advanced)¶
- Create a Slack app:
- Go to Slack API: Apps
- Click "Create New App" → "From scratch"
- Add "Bot" user with
chat:writepermissions -
Install to workspace and copy Bot Token (
xoxb-...) -
Invite bot to channel:
-
Configure kim:
Testing¶
Test your Slack configuration:
This will send a test message using your configured method.
Viewing Configuration¶
Shows current Slack settings (without exposing tokens).
Notification Format¶
Webhook¶
Bot Token¶
(Urgency emoji varies: ℹ️ low, 🔔 normal, 🚨 critical)
Troubleshooting¶
Webhook Not Working¶
- Verify webhook URL is correct
- Test with
curl: - Check Slack workspace permissions
Bot Token Issues¶
- Ensure bot is invited to the channel
- Verify bot has
chat:writescope - Test with
kim slack --test
Channel Not Found¶
For bot tokens, ensure:
- Channel name starts with #
- Bot is a member of the channel
- Channel exists in the workspace
Security Notes¶
- Keep webhook URLs and bot tokens secret
- Don't commit them to version control
- Use environment variables or secure secret management
- Rotate tokens if compromised
Example Configurations¶
Webhook to #general¶
Bot to Multiple Channels¶
kim currently supports a single channel. For multiple channels, use webhooks or extend the configuration.