安装
-> % sudo npm install -g cc-connect
-> % cc-connect
2026/10/05 21:05:41 INFO acquired instance lock path=/home/catroll/.cc-connect/.config.toml.lock
Created default config at /home/catroll/.cc-connect/config.toml
Please edit this file to add your agent and platform credentials, then run cc-connect again.
-> % cat /home/catroll/.cc-connect/config.toml
配置
# cc-connect configuration
# Docs: https://github.com/chenhg5/cc-connect
[log]
level = "info"
[[projects]]
name = "my-project"
[projects.agent]
type = "claudecode" # "claudecode", "codex", "cursor", "gemini", "qoder", "opencode", or "iflow"
[projects.agent.options]
work_dir = "/path/to/your/project"
mode = "default"
# model = "claude-sonnet-4-20250514"
# --- Choose at least one platform below ---
# Feishu / Lark (WebSocket, no public IP needed)
[[projects.platforms]]
type = "feishu"
[projects.platforms.options]
app_id = "your-feishu-app-id"
app_secret = "your-feishu-app-secret"
# For more platforms (DingTalk, Telegram, Slack, Discord, LINE, WeChat Work)
# see: https://github.com/chenhg5/cc-connect/blob/main/config.example.toml
[log]
level = "debug"
[[projects]]
name = "WinnieBot"
[projects.agent]
type = "cursor"
[projects.agent.options]
work_dir = "/home/catroll/Documents/Mine/Winnie/Bot"
mode = "default"
[[projects.platforms]]
type = "wecom"
[projects.platforms.options]
mode = "websocket"
bot_id = "xxxxxx"
bot_secret = "xxxxxx"
ws_url = "wss://openws.work.weixin.qq.com"
allow_from = "*"
[management]
enabled = true
port = 9820
token = "zU4xNiDavzIFHxMQ"
启动
-> % cc-connect
2026/10/05 21:33:06 INFO acquired instance lock path=/home/catroll/.cc-connect/.config.toml.lock
2026/10/05 21:33:06 INFO config loaded path=/home/catroll/.cc-connect/config.toml
time=2026-10-05T21:33:06.516+08:00 level=ERROR msg="failed to create agent" project=WinnieBot error="cursor: \"agent\" CLI not found in PATH, install with: npm i -g @anthropic-ai/cursor-agent (or from Cursor IDE settings)"
-> % sudo npm i -g @anthropic-ai/cursor-agent
[sudo: authenticate] 密码:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@anthropic-ai%2fcursor-agent - Not found
npm ERR! 404
npm ERR! 404 '@anthropic-ai/cursor-agent@*' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2026-10-05T13_34_49_042Z-debug-0.log
按照官方提供的方法安装 Cursor Agent:
-> % curl https://cursor.com/install -fsS | bash
Cursor Agent Installer
✓ Detected linux/x64
✓ Package downloaded and extracted
✓ Package installed successfully
✓ Bin directory ready
✓ Symlink created
✨ Installation Complete!
Start using Cursor Agent:
agent
Happy coding! 🚀
-> % which agent
/home/catroll/.local/bin/agent
-> % agent --help
-> % agent --version
-> % agent login
# 进入项目目录,比如我这个示例采用的 ~/Documents/Mine/Winnie/Bot 目录,执行 agent 命令,会加信任,否则会报错:Workspace Trust Required
-> % cc-connect
2026/10/05 21:51:49 INFO acquired instance lock path=/home/catroll/.cc-connect/.config.toml.lock
2026/10/05 21:51:49 INFO config loaded path=/home/catroll/.cc-connect/config.toml
time=2026-10-05T21:51:49.601+08:00 level=WARN msg="admin_from is not set — privileged commands (/shell, /show, /dir, /restart, /upgrade) are blocked. Set admin_from in config to enable them, or use disabled_commands to hide them." project=WinnieBot
time=2026-10-05T21:51:49.601+08:00 level=INFO msg="project: reset_on_idle_mins not set, applying default — set reset_on_idle_mins = 0 to opt out, see docs/usage.md" project=WinnieBot default_minutes=0
time=2026-10-05T21:51:49.603+08:00 level=INFO msg="platform ready" project=WinnieBot platform=wecom
time=2026-10-05T21:51:49.603+08:00 level=INFO msg="engine started" project=WinnieBot agent=cursor platforms=1
time=2026-10-05T21:51:49.603+08:00 level=INFO msg="cron: scheduler started" jobs=0
time=2026-10-05T21:51:49.603+08:00 level=INFO msg="timer: scheduler started" scheduled=0 missed_fired=0 skipped_stale=0 total=0
time=2026-10-05T21:51:49.603+08:00 level=INFO msg="wecom-ws: connecting" endpoint=wss://openws.work.weixin.qq.com
time=2026-10-05T21:51:49.604+08:00 level=INFO msg="api server started" socket=/home/catroll/.cc-connect/run/api.sock
time=2026-10-05T21:51:49.604+08:00 level=INFO msg="cc-connect is running" projects=1
time=2026-10-05T21:51:49.872+08:00 level=INFO msg="wecom-ws: subscribed successfully" bot_id=aibqo84rckr3O9ykAEG1xh21e_bK8me041u
time=2026-10-05T21:52:19.872+08:00 level=DEBUG msg="wecom-ws: ping sent" missed_pong=1
time=2026-10-05T21:52:19.922+08:00 level=DEBUG msg="wecom-ws: heartbeat ack received"