Slackbot Agent CLI
Command-line interface for Slack bot management
Manage and run Slack bots from the command line.
Quick Start
- Simple Usage
bash praisonai-ts slack start --port 3000 - With Configuration
bash praisonai-ts slack logs
Commands
Start Bot
# Start Slack bot with webhook mode
praisonai-ts slack start \
--bot-token $SLACK_BOT_TOKEN \
--signing-secret $SLACK_SIGNING_SECRET \
--port 3000
# Start with Socket Mode
praisonai-ts slack start \
--bot-token $SLACK_BOT_TOKEN \
--app-token $SLACK_APP_TOKEN \
--socket-modeConfigure Bot
# Set bot instructions
praisonai-ts slack config \
--instructions "You are a helpful assistant" \
--model gpt-4o
# Add tools
praisonai-ts slack config \
--tools search,calculatorTest Bot
# Send test message
praisonai-ts slack test \
--message "Hello, bot!" \
--channel C1234567890Options
| Option | Type | Default | Description |
|---|---|---|---|
--bot-token | string | env | Slack bot token |
--signing-secret | string | env | Signing secret |
--app-token | string | env | App token for socket mode |
--socket-mode | boolean | false | Enable socket mode |
--port | number | 3000 | HTTP server port |
--instructions | string | – | Agent instructions |
--model | string | gpt-4o | Model to use |
Environment Variables
| Variable | Required | Description |
|---|---|---|
SLACK_BOT_TOKEN | Yes | Bot token (xoxb-…) |
SLACK_SIGNING_SECRET | Webhook | Signing secret |
SLACK_APP_TOKEN | Socket | App token (xapp-…) |
OPENAI_API_KEY | Yes | For the agent |
Examples
Development Mode
# Run in socket mode for local development
SLACK_BOT_TOKEN=xoxb-... \
SLACK_APP_TOKEN=xapp-... \
praisonai-ts slack start --socket-modeProduction Mode
# Run with webhook mode
praisonai-ts slack start \
--port 3000 \
--instructions "You are a helpful Slack assistant"Related Commands
praisonai-ts slack logs– View bot logspraisonai-ts slack stats– View usage statistics