A Rust CLI with interactive TUI for receiving Claude Code session notifications via Slack.
- Slack Notifications: Receive notifications when Claude Code sessions start, need input, or complete
- Interactive TUI: Monitor active sessions and view logs
- Multiple Sessions: Track multiple concurrent Claude Code sessions
curl -fsSL https://raw.githubusercontent.com/tonyjom/slack-code/main/scripts/install.sh | bashThis will automatically download the pre-built binary for your platform and install it to ~/.local/bin.
Download the latest release for your platform from GitHub Releases:
| Platform | Architecture | Download |
|---|---|---|
| Linux | x86_64 | slack-code-vX.X.X-x86_64-unknown-linux-gnu.tar.gz |
| Linux | ARM64 | slack-code-vX.X.X-aarch64-unknown-linux-gnu.tar.gz |
| macOS | Apple Silicon | slack-code-vX.X.X-aarch64-apple-darwin.tar.gz |
Extract and copy both slack-code and slack-code-hook to a directory in your PATH.
If you prefer to build from source (requires Rust):
curl -fsSL https://raw.githubusercontent.com/tonyjom/slack-code/main/scripts/install.sh | bash -s -- --from-source
git clone https://github.com/tonyjom/slack-code
cd slack-code
cargo install --path crates/slack-code
cargo install --path crates/slack-code-hook- Go to api.slack.com/apps
- Click "Create New App" → "From scratch"
- Name it "slack-code" and select your workspace
- Go to OAuth & Permissions → Scopes → Bot Token Scopes
- Add these scopes:
chat:writeim:writeusers:read
- Go to Install App
- Click "Install to Workspace"
- Copy the Bot User OAuth Token (starts with
xoxb-)
slack-code setupFollow the prompts to enter your tokens and configure the integration.
slack-code# Install Claude Code hooks
slack-code hooks install
# Check hook status
slack-code hooks status
# Uninstall hooks
slack-code hooks uninstall# Start daemon in background
slack-code daemon start
# Check daemon status
slack-code daemon status
# Stop daemon
slack-code daemon stop| Key | Action |
|---|---|
1 |
Sessions view |
2 |
Config view |
3 |
Logs view |
? |
Toggle help |
q |
Quit |
| Key | Action |
|---|---|
j / ↓ |
Next item |
k / ↑ |
Previous item |
Enter |
Select |
Esc |
Cancel/Back |
| Key | Action |
|---|---|
t |
Test tokens |
h |
Manage hooks |
Configuration is stored at ~/.config/slack-code/config.toml:
[slack]
bot_token = "xoxb-your-bot-token"
user_id = "U12345678"
[daemon]
log_level = "info"
[defaults]
hook_timeout = 5Tokens can also be set via environment variables:
SLACK_CODE_BOT_TOKEN
┌─────────────────────────────────────────────────────────┐
│ TUI (ratatui) │
└──────────────────────────┬──────────────────────────────┘
│ IPC (Unix Socket)
┌──────────────────────────▼──────────────────────────────┐
│ Daemon Process │
│ ┌──────────────┐ ┌───────────────┐ │
│ │ Session │ │ IPC Server │ │
│ │ Manager │ │ │ │
│ └──────────────┘ └───────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ Slack Web │ │
│ │ API Client │ │
│ └─────────────┘ │
└─────────────────────────────────────────────────────────┘
▲
┌──────────────────────────│──────────────────────────────┐
│ Claude Code Hook Script │
│ SessionStart/End/Notification → JSON stdin → IPC │
└─────────────────────────────────────────────────────────┘
- When you start a Claude Code session in your terminal, the installed hooks notify the daemon
- The daemon sends a Slack notification to your DM channel
- As Claude works, status updates are posted to the Slack thread
- You can monitor all active sessions in the TUI
MIT