Slack

PocketPaw integrates with Slack via slack-bolt using Socket Mode. No public URL or ngrok tunnel needed — the connection is initiated from your machine.

Setup

Create a Slack app

  1. Go to api.slack.com/apps and create a new app
  2. Enable Socket Mode under Settings
  3. Generate an App-Level Token with connections:write scope

Configure bot permissions

Under OAuth & Permissions, add these Bot Token Scopes:

  • app_mentions:read
  • chat:write
  • im:history
  • im:read
  • im:write

Enable events

Under Event Subscriptions, subscribe to:

  • app_mention
  • message.im

Install to workspace

Install the app to your workspace and copy the Bot User OAuth Token.

Configure PocketPaw

Terminal window
export POCKETCLAW_SLACK_BOT_TOKEN="xoxb-..."
export POCKETCLAW_SLACK_APP_TOKEN="xapp-..."

Start

Terminal window
pocketpaw --slack

Configuration

SettingEnv VariableDescription
Bot tokenPOCKETCLAW_SLACK_BOT_TOKENBot User OAuth Token (xoxb-)
App tokenPOCKETCLAW_SLACK_APP_TOKENApp-Level Token (xapp-)
Allowed channelsPOCKETCLAW_SLACK_ALLOWED_CHANNEL_IDSComma-separated channel IDs

Features

Socket Mode

Socket Mode means:

  • No public URL needed — Works behind firewalls and NAT
  • No webhook server — Connection is outbound from your machine
  • Low latency — WebSocket-based real-time events

Thread Support

Responses are sent as thread replies using thread_ts metadata. This keeps conversations organized in Slack channels.

Interaction Types

  • @mention — Mention the bot in any channel: @PocketPaw what time is it?
  • Direct message — Send a DM to the bot for private conversations

Streaming

Slack responses are buffered and the thread message is updated as tokens arrive.

Installation

Terminal window
curl -fsSL https://pocketpaw.xyz/install.sh | sh
# Or add the Slack extra manually
pip install pocketpaw[slack]

This installs slack-bolt as an optional dependency.