Control your local Claude Code via IM bot (Feishu / WeCom / DingTalk / Slack / Telegram / Discord / Teams / WhatsApp, etc.)
npm install -g @ccbot/cli- Create a self-built app on Feishu Open Platform
- Add "Bot" capability
- Event subscription → set to "Long Connection"
- Add event:
im.message.receive_v1 - Enable the following permissions:
| Scope | Description |
|---|---|
im:message.p2p_msg:readonly |
Receive direct messages sent to the bot |
im:message.group_at_msg:readonly |
Receive @bot messages in group chats |
im:message:send_as_bot |
Send/reply messages as the bot |
You can also import permissions via JSON:
{
"scopes": {
"tenant": ["im:message.group_at_msg:readonly", "im:message.p2p_msg:readonly", "im:message:send_as_bot"],
"user": []
}
}- Publish the app, note down App ID and App Secret
CCBot supports two authentication methods:
Option A: OAuth (Recommended) — Run claude login to authenticate. No additional configuration needed.
Option B: API Key — Edit ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "sk-xxx",
"ANTHROPIC_BASE_URL": "https://api.anthropic.com"
}
}Navigate to your project directory and run:
ccbot startOn first run, you'll be prompted for configuration:
? Claude Code path: claude
? Feishu App ID: cli_xxx
? Feishu App Secret: ***
? Timeout in ms: 3600000
Config is saved to ccbot.json in the current directory. Subsequent runs skip the prompts.
Note: If using API Key mode, CCBot reads credentials from ~/.claude/settings.json, allowing multiple CCBot projects to share the same credentials. OAuth users don't need this configuration.
ccbot start # Start server (prompts config on first run)
ccbot stop # Stop server
ccbot restart # Restart server (use after updating)
ccbot delete # Delete ccbot process from pm2
ccbot status # Show process status
ccbot logs # Show server logsSend these in the Feishu bot conversation:
| Command | Description |
|---|---|
/new |
Reset session, start a new conversation |
/stop |
Stop the current request and clear queue |
/status |
Show current session status |
/version |
Show CCBot version |
ccbot.json:
{
"feishu": {
"appId": "cli_xxx",
"appSecret": "xxx"
},
"claude": {
"bin": "claude",
"workDir": "/path/to/project",
"timeoutMs": 3600000
}
}Claude API Config: CCBot supports OAuth login (via claude login) or API Key mode (via env.ANTHROPIC_AUTH_TOKEN and env.ANTHROPIC_BASE_URL in ~/.claude/settings.json).
MIT