A Slack bot that processes app mentions by running Warp CLI agent commands. The bot can handle both direct mentions and threaded conversations, providing full context to the Warp agent.
- π± Responds to Slack app mentions
- π§΅ Processes entire thread context for threaded conversations
- π Runs in Docker for consistent environment
- π Persists repository data between container restarts
- π§ Integrates with Warp CLI agent
The easiest way to set up your Slack app is using the provided manifest file:
- Go to https://api.slack.com/apps
- Click "Create New App"
- Select "From an app manifest"
- Choose your workspace
- Copy and paste the contents of
slack_app_manifest.json: - Install the app to your workspace
Copy the example environment file and fill in your tokens:
cp .env.example .envEdit .env with your credentials:
Follow the instructions in .env for where to get relevant variables.
See https://docs.warp.dev/developers/cli#generating-api-keys for generating API key.
Create your repository configuration from the template:
cp repos.yaml.template repos.yamlThen edit repos.yaml to specify which repositories to monitor:
repositories:
- url: "username/repository-name"
branch: "main"
- url: "org/private-repo"
branch: "develop"Repository Configuration Options:
url: GitHub repository in formatowner/repo-namebranch: Git branch to checkout and keep up to date as the 'base' branch for that repo
Examples:
repositories:
- url: "mycompany/secret-api"
branch: "production"
- url: "mycompany/frontend"
branch: "main"The Slackbot uses a customizable prompt to process Slack messages and generate appropriate responses. Here's how to set it up:
-
See an example prompt - We use a comprehensive prompt at Warp to power our Slackbot that handles code questions and formulates PRs based on Slack discussions.
-
Use Warp Drive Notebooks - The Slackbot is designed to work with prompts stored in Warp Drive Notebooks. This allows you to dynamically iterate on your prompt without needing to re-deploy the bot.
-
Configure the notebook ID - To get your notebook ID:
- Type
@in your Warp input - Select your notebook from the dropdown
- Copy the alphanumeric code that appears after
<notebook:{id}> - Add this ID to your
.envfile as the notebook reference
- Type
This setup enables you to refine your bot's behavior by editing the notebook prompt in real-time through the Warp Drive interface.
# Build and start the container
docker-compose up --build
# Run in background
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the bot
docker-compose down- Invite the bot to channels where you want to use it
- Mention the bot with
@Warp your message here - Use in threads - the bot will include full thread context
Example interactions:
@Warp analyze the recent changes in the main branch
@Warp help me fix the bug discussed in the thread.