> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Slackbot Agent CLI

> Command-line interface for Slack bot management

Manage and run Slack bots from the command line.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    User([User]) --> CLI[CLI]
    CLI --> Slack([Slack Bot])

    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef tool fill:#189AB4,stroke:#7C90A0,color:#fff

    class Slack agent
    class CLI,User tool
    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff
```

## Quick Start

<Steps>
  <Step title="Simple Usage">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai-ts slack start --port 3000
    ```
  </Step>

  <Step title="With Configuration">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai-ts slack logs
    ```
  </Step>
</Steps>

***

## Commands

### Start Bot

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# 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-mode
```

### Configure Bot

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Set bot instructions
praisonai-ts slack config \
  --instructions "You are a helpful assistant" \
  --model gpt-4o

# Add tools
praisonai-ts slack config \
  --tools search,calculator
```

### Test Bot

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Send test message
praisonai-ts slack test \
  --message "Hello, bot!" \
  --channel C1234567890
```

## Options

| 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

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Run in socket mode for local development
SLACK_BOT_TOKEN=xoxb-... \
SLACK_APP_TOKEN=xapp-... \
praisonai-ts slack start --socket-mode
```

### Production Mode

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# 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 logs
* `praisonai-ts slack stats` - View usage statistics

## Related

<CardGroup cols={2}>
  <Card title="Slackbot Agent" icon="slack" href="/docs/js/slackbot-agent">Slack bot SDK</Card>
  <Card title="Server Adapters" icon="server" href="/docs/js/server-adapters">HTTP deployment</Card>
</CardGroup>
