Claude Code Feishu Bridge — 在飞书中与本地 Claude Code 对话
Project description
cc-feishu-bridge
Claude Code 飞书桥接插件 — 在飞书中与本地 Claude Code 对话。
核心特性
工作目录即 Claude 的工作目录。 在哪个目录下启动 cc-feishu-bridge,Claude 就在哪个目录下工作。这意味着:
- 可以同时运行多个实例(多开),每个实例对应不同的飞书机器人、不同的 Claude 工作目录
- 例如在
/project-A启动一个机器人,在/project-B启动另一个机器人,两者互不干扰
快速开始
方式一:直接运行编译好的 CLI(推荐)
下载对应平台的压缩包并解压,然后将其加入系统 PATH 环境变量:
| 平台 | 架构 | 下载文件 |
|---|---|---|
| macOS | Apple Silicon (arm64) | cc-feishu-bridge-macos-arm64 |
| macOS | Intel (x86_64) | cc-feishu-bridge-macos-x86_64 |
| Windows | x86_64 | cc-feishu-bridge-windows-x86_64.exe |
macOS / Linux:
# 下载并解压后,移入 PATH
chmod +x cc-feishu-bridge-*
sudo mv cc-feishu-bridge-* /usr/local/bin/cc-feishu-bridge
# 验证安装成功
cc-feishu-bridge
Windows:
- 下载
cc-feishu-bridge-windows-x86_64.exe并放到任意目录,例如C:\Program Files\cc-feishu-bridge\ - 按
Win + R输入sysdm.cpl→ 高级 → 环境变量 - 在用户变量或系统变量的
Path中添加该目录路径 - 重新打开命令提示符验证:
cc-feishu-bridge.exe
首次运行会自动进入安装流程。
方式二:pip 安装
pip install cc-feishu-bridge
cc-feishu-bridge
方式三:源码安装
git clone https://github.com/Hu1J/cc-feishu-bridge.git
cd cc-feishu-bridge
pip install -e .
cc-feishu-bridge
安装配置
首次运行 cc-feishu-bridge 时会自动进入安装流程,按提示操作即可:
- 使用飞书扫码授权
- 扫码完成后自动创建机器人并保存配置
安装完成后配置文件位于 .cc-feishu-bridge/config.yaml(相对于启动目录)。
手动配置
如果需要手动配置,复制 config.example.yaml 为 .cc-feishu-bridge/config.yaml(相对于启动目录):
feishu:
app_id: cli_xxx # 飞书应用 App ID
app_secret: xxx # 飞书应用 App Secret
bot_name: Claude
auth:
allowed_users: # 允许使用机器人的用户 open_id 列表
- ou_xxx
claude:
cli_path: claude # claude CLI 路径
max_turns: 50 # 最大对话轮数
approved_directory: /path/to/workdir # Claude 工作目录
storage:
db_path: .cc-feishu-bridge/sessions.db
server:
host: "0.0.0.0"
port: 8080
webhook_path: /feishu/webhook
使用方法
启动机器人:
cc-feishu-bridge
机器人启动后,在飞书中向机器人发送消息即可与 Claude Code 对话。
多开实例
在不同目录下启动 cc-feishu-bridge,即可同时运行多个机器人实例,每个实例有独立的工作目录和配置文件:
cd /path/to/project-A && cc-feishu-bridge # 机器人 A 在 /path/to/project-A 下工作
cd /path/to/project-B && cc-feishu-bridge # 机器人 B 在 /path/to/project-B 下工作
命令
/new— 创建新会话/status— 查看当前会话状态
安全说明
cc-feishu-bridge 以 bypassPermissions 模式运行,Claude Code 可执行任意终端命令、读写本地文件,无需每次授权确认。请仅在可信任的网络环境下使用。
获取帮助
如有问题请提交 Issue。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cc_feishu_bridge-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cc_feishu_bridge-0.1.1-py3-none-any.whl
- Upload date:
- Size: 24.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40cb6670f59001fcb28b8a30870a9a69645b7c8d909b5c2455eff64ee3c9af79
|
|
| MD5 |
edd99e22437fa23ef9c40f00c3d1f956
|
|
| BLAKE2b-256 |
72c5d7891866c89223b24eeda74959885d44b286180947f250e3d7757e200494
|
Provenance
The following attestation bundles were made for cc_feishu_bridge-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on Hu1J/cc-feishu-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cc_feishu_bridge-0.1.1-py3-none-any.whl -
Subject digest:
40cb6670f59001fcb28b8a30870a9a69645b7c8d909b5c2455eff64ee3c9af79 - Sigstore transparency entry: 1206187759
- Sigstore integration time:
-
Permalink:
Hu1J/cc-feishu-bridge@7ff515325f873fa3f2c7c78e7547a13be4b1d909 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Hu1J
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7ff515325f873fa3f2c7c78e7547a13be4b1d909 -
Trigger Event:
workflow_dispatch
-
Statement type: