docs/cli/connectors.mdx
Connectors let you chat with your agent from messaging platforms. Each incoming message creates or continues an agent session, and the agent's response is sent back to the conversation.
Run cline connect to open an interactive wizard that guides you through platform selection, credential entry, security configuration, and advanced options (provider, model, system prompt, agent mode).
cline connect
| Platform | Direct Command | Required Credentials |
|---|---|---|
| Telegram | cline connect telegram | Bot token |
| Slack | cline connect slack | Bot token plus webhook signing secret/base URL or socket app token |
| Discord | cline connect discord | Application ID, bot token, public key, base URL |
| Google Chat | cline connect gchat | Service account credentials JSON, base URL |
cline connect whatsapp | Phone number ID, access token, app secret, verify token, base URL | |
| Linear | cline connect linear | API key, webhook signing secret, base URL |
1. Enter a display name (e.g., "Cline")
2. Enter a username ending in `bot` (e.g., `cline_myname_bot`). Must be unique across Telegram.
3. BotFather responds with your bot token (looks like `7123456789:AAH...`)
The connector discovers the bot username from the token. Use `--bot-username` only if you need to override it.
By default, anyone who finds your bot can message it and it will execute tasks on your machine. The cline connect wizard asks whether to restrict Telegram access and can configure this for you.
Choose Telegram, enter the bot token, answer yes to access restriction, then enter your user ID.
```bash
cline connect telegram -k <BOT-TOKEN> \
--allowed-user-id 12345
```
Use --hook-command only when you need custom access logic. The hook receives each incoming message with sender info via stdin. Your script returns {"action": "allow"} or {"action": "deny", "message": "reason"}. Without --allowed-user-id or --hook-command, everything is auto-approved, so restrict Telegram bots that can reach a running Cline instance.
Slack supports webhook mode and socket mode. Each Slack thread maps to an agent session, so the agent maintains conversation context within a thread.
Webhook mode requires a bot token, signing secret, and public base URL:
cline connect slack \
--bot-token <BOT-TOKEN> \
--signing-secret <SECRET> \
--base-url <URL>
Configure the Slack app's event subscription and interactivity request URLs to <URL>/api/webhooks/slack.
Socket mode requires a bot token and an app-level token with the connections:write scope:
cline connect slack \
--bot-token <BOT-TOKEN> \
--app-token <APP-LEVEL-TOKEN>
Enable Socket Mode in the Slack app. Socket mode does not need a public request URL and is single-workspace only.
Requires a Discord application ID, bot token, public key, and public base URL.
The connector listens for Discord interactions at /api/webhooks/discord and
also starts a Discord gateway listener for mentions, replies, reactions, and DMs.
1. In **General Information**, copy the **Application ID** and **Public Key**.
2. In **Bot**, create a bot if one does not exist, then reset and copy the bot token.
3. Enable **Message Content Intent** if you want normal messages, replies, and DMs to include text content.
```bash
ngrok http 8788
```
Copy the HTTPS forwarding URL. This is your connector base URL, for example
`https://1234-5678.ngrok-free.app`.
`--app-id` is an alias for `--application-id`, and `--token` is an alias for
`--bot-token`.
`--enable-tools` allows the agent to inspect files, run commands, edit code,
and prepare PRs from Discord. Omit it if the bot should only chat.
```text
<base-url>/api/webhooks/discord
```
For example:
```text
https://1234-5678.ngrok-free.app/api/webhooks/discord
```
You can verify the connector is reachable with:
```bash
curl <base-url>/health
```
Send these commands in Discord:
| Command | Description |
|---|---|
/help or /start | Show connector help |
/new or /clear | Start a fresh session for this Discord conversation |
/whereami | Show thread, channel, DM state, cwd, workspaceRoot, tools, and yolo state |
/tools [on|off|toggle] | View or change whether repo/file/shell tools are allowed |
/yolo [on|off|toggle] | View or change automatic tool approval |
/cwd [path] | View or change the working directory for this conversation |
/schedule create/list/trigger/delete | Manage scheduled workflows targeting this conversation |
/abort | Stop the current task |
/exit | Stop the connector |
Normal messages are treated as agent tasks. If a task is already running, normal messages steer the active task.
By default, anyone who can reach the bot can ask it to run tasks. Restrict access
with --hook-command. The hook receives the Discord user as a participant key
such as discord:user:123456789.
cline connect discord \
--application-id <ID> \
--bot-token <TOKEN> \
--public-key <KEY> \
--base-url <URL> \
--hook-command 'jq -r ".payload.actor.participantKey" | grep -q "discord:user:123456789" && echo "{\"action\":\"allow\"}" || echo "{\"action\":\"deny\",\"message\":\"unauthorized\"}"'
Requires a service account credentials JSON file and public base URL.
cline connect gchat --credentials <JSON> --base-url <URL>
Requires a phone number ID, access token, app secret, webhook verify token, and public base URL.
cline connect whatsapp --phone-id <ID> --token <TOKEN> --app-secret <SECRET> --base-url <URL>
Requires an API key, webhook signing secret, and public base URL.
cline connect linear --api-key <KEY> --signing-secret <SECRET> --base-url <URL>
# Stop all connectors
cline connect --stop
# Stop a specific connector
cline connect telegram --stop
The --hook-command pattern works across all connectors. The script receives a JSON payload via stdin:
{
"payload": {
"actor": {
"participantKey": "telegram:id:12345",
"displayName": "User Name"
},
"message": "The incoming message text"
}
}
Return {"action": "allow"} or {"action": "deny", "message": "reason"}.
Multiple connectors can run simultaneously. They all share the same hub:
# Terminal 1
cline connect telegram -k $TELEGRAM_TOKEN
# Terminal 2
cline connect slack --bot-token $SLACK_TOKEN --signing-secret $SECRET --base-url $URL
Connectors require the hub. Start it with cline hub start if it doesn't auto-start.