When downloading Slack files via url_private_download, the code was already setting the Bearer token correctly. However, there was no error detection for cases where Slack returns an HTML login page instead of the actual file content. This commit adds: - Fallback to url_private when url_private_download is empty - Status code validation (fail on non-200 responses) - HTML content detection (fail with clear error message) - Improved error logging with redacted URL - Unit tests for the downloadSlackFile function The HTML detection is particularly important because when auth fails (e.g., wrong bot token, expired token), Slack returns a login page with HTTP 200 instead of an error code. Without this check, the HTML content would be passed to the AI agent as if it were an image, causing confusing errors. Fixes #185 Co-authored-by: Shawn <shawn@chenhg5.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Control your local AI agents from any chat app. Anywhere, anytime.
cc-connect bridges AI agents running on your machine to the messaging platforms you already use.
Code review, research, automation, data analysis — anything an AI agent can do,
now accessible from your phone, tablet, or any device with a chat app.
✨ Why cc-connect?
🤖 Universal Agent Support
7 AI Agents — Claude Code, Codex, Cursor Agent, Qoder CLI, Gemini CLI, OpenCode, iFlow CLI. Use whichever fits your workflow, or all of them at once.
📱 Platform Flexibility
9 Chat Platforms — Feishu, DingTalk, Slack, Telegram, Discord, WeChat Work, LINE, QQ, QQ Bot (Official). Most need zero public IP.
🔄 Multi-Agent Orchestration
Multi-Bot Relay — Bind multiple bots in a group chat and let them communicate with each other. Ask Claude, get insights from Gemini — all in one conversation.
🎮 Complete Chat Control
Full Control from Chat — Switch models (/model), tune reasoning (/reasoning), change permission modes (/mode), manage sessions, all via slash commands.
🧠 Persistent Memory
Agent Memory — Read and write agent instruction files (/memory) without touching the terminal.
⏰ Intelligent Scheduling
Scheduled Tasks — Set up cron jobs in natural language. "Every day at 6am, summarize GitHub trending" just works.
🎤 Multimodal Support
Voice & Images — Send voice messages or screenshots; cc-connect handles STT/TTS and multimodal forwarding.
📦 Multi-Project Architecture
Multi-Project — One process, multiple projects, each with its own agent + platform combo.
🌍 Multilingual Interface
5 Languages — Native support for English, Chinese (Simplified & Traditional), Japanese, and Spanish. Built-in i18n ensures everyone feels at home.
Left:Lark | Telegram | Right:Wechat
🚀 Quick Start
🤖 Install & Configure via AI Agent (Recommended)
The easiest way — Send this to Claude Code or any AI coding agent, and it will handle the entire installation and configuration for you:
Follow https://raw.githubusercontent.com/chenhg5/cc-connect/refs/heads/main/INSTALL.md to install and configure cc-connect.
📦 Manual Install
Via npm:
# Stable version
npm install -g cc-connect
# Beta version (more features, may be unstable)
npm install -g cc-connect@beta
Download binary from GitHub Releases:
# Linux amd64 - Stable
curl -L -o cc-connect https://github.com/chenhg5/cc-connect/releases/latest/download/cc-connect-linux-amd64
chmod +x cc-connect
sudo mv cc-connect /usr/local/bin/
# Beta version (from pre-release)
curl -L -o cc-connect https://github.com/chenhg5/cc-connect/releases/download/v1.x.x-beta/cc-connect-linux-amd64
Build from source (requires Go 1.22+):
git clone https://github.com/chenhg5/cc-connect.git
cd cc-connect
make build
⚙️ Configure
mkdir -p ~/.cc-connect
cp config.example.toml ~/.cc-connect/config.toml
vim ~/.cc-connect/config.toml
▶️ Run
./cc-connect
🔄 Upgrade
# npm
npm install -g cc-connect
# Binary self-update
cc-connect update # Stable
cc-connect update --pre # Beta (includes pre-releases)
📊 Support Matrix
| Component | Type | Status |
|---|---|---|
| Agent | Claude Code | ✅ Supported |
| Agent | Codex (OpenAI) | ✅ Supported |
| Agent | Cursor Agent | ✅ Supported |
| Agent | Gemini CLI (Google) | ✅ Supported |
| Agent | Qoder CLI | ✅ Supported |
| Agent | OpenCode (Crush) | ✅ Supported |
| Agent | iFlow CLI | ✅ Supported |
| Agent | Goose (Block) | 🔜 Planned |
| Agent | Aider | 🔜 Planned |
| Platform | Feishu (Lark) | ✅ WebSocket — no public IP needed |
| Platform | DingTalk | ✅ Stream — no public IP needed |
| Platform | Telegram | ✅ Long Polling — no public IP needed |
| Platform | Slack | ✅ Socket Mode — no public IP needed |
| Platform | Discord | ✅ Gateway — no public IP needed |
| Platform | LINE | ✅ Webhook — public URL required |
| Platform | WeChat Work | ✅ WebSocket / Webhook |
| Platform | QQ (NapCat/OneBot) | ✅ WebSocket — Beta |
| Platform | QQ Bot (Official) | ✅ WebSocket — no public IP needed |
📖 Platform Setup Guides
| Platform | Guide | Connection | Public IP? |
|---|---|---|---|
| Feishu (Lark) | docs/feishu.md | WebSocket | No |
| DingTalk | docs/dingtalk.md | Stream | No |
| Telegram | docs/telegram.md | Long Polling | No |
| Slack | docs/slack.md | Socket Mode | No |
| Discord | docs/discord.md | Gateway | No |
| WeChat Work | docs/wecom.md | WebSocket / Webhook | No (WS) / Yes (Webhook) |
| QQ / QQ Bot | docs/qq.md | WebSocket | No |
🎯 Key Features
💬 Session Management
/new [name] Start a new session
/list List all sessions
/switch <id> Switch session
/current Show current session
🔐 Permission Modes
/mode Show available modes
/mode yolo # Auto-approve all tools
/mode default # Ask for each tool
🔄 Provider Management
/provider list List providers
/provider switch <name> Switch API provider at runtime
⏰ Scheduled Tasks
/cron add 0 6 * * * Summarize GitHub trending
📎 Agent Attachment Send-Back
When an agent generates a local screenshot, chart, PDF, bundle, or other file, it can send that attachment back to the current chat.
First release supports:
- Feishu
- Telegram
If your agent does not natively inject the system prompt, run this once in chat after upgrading:
/bind setup
or:
/cron setup
This refreshes the cc-connect instructions in the project memory file so the agent knows how to send attachments back.
You can control this feature globally in config.toml:
attachment_send = "on" # default: "on"; set to "off" to block image/file send-back
This switch is independent from the agent's /mode. It only controls cc-connect send --image/--file.
Examples:
cc-connect send --image /absolute/path/to/chart.png
cc-connect send --file /absolute/path/to/report.pdf
cc-connect send --file /absolute/path/to/report.pdf --image /absolute/path/to/chart.png
Notes:
- Absolute paths are the safest option.
--imageand--filecan both be repeated.attachment_send = "off"disables only attachment send-back; ordinary text replies still work.- This command is for generated attachments, not ordinary text replies.
📖 Full documentation: docs/usage.md
📚 Documentation
- Usage Guide — Complete feature documentation
- INSTALL.md — AI-agent-friendly installation guide
- config.example.toml — Configuration template
👥 Community
🙏 Contributors
⭐ Star History
📄 License
MIT License
Built with ❤️ by the cc-connect community
