Skip to main content

kimi-bridge

English: README.en_US.md

在即时通讯对话中控制本地的 Kimi Code 智能体。

kimi-bridge 连接本地 Kimi Code 服务器与一个聊天平台,保持聊天和会话的绑定关系,并按平台能力提供流式回复、文件、会话控制和交互功能。

支持情况

平台/能力 状态
飞书、QQ、微信私聊 已支持
Telegram 私聊 实验性
Linux、macOS 和 Windows 已支持
语音消息接收 飞书、QQ 和微信支持
审批和提问卡片 仅飞书支持

快速开始

第一步先安装官方 Kimi Code(注意不是同名的旧版 Python kimi-cli),然后确认 Kimi Code 配置正常,且能够完成问答:

kimi --version
kimi doctor config
kimi -p "Hello there"

确认 Kimi Code 可用后,安装 kimi-bridge:

uv tool install kimi-bridge
kimi-bridge --version

然后选择你最常用的平台登录:

kimi-bridge {feishu, qq, wechat} login

在配置过程中可能需要点击网页链接或扫描二维码完成授权。配置成功后启动 kimi-bridge:

kimi-bridge

就可以在聊天平台中和 Kimi 对话啦!

也可以让 AI 助手全程代办:打开任意 CLI 智能体,对它说:

阅读 https://github.com/Mtrya/kimi-bridge/blob/main/INSTALL_AI.md 并帮我配置 kimi-bridge。

它会向你提问并跑完整个安装流程。

需要更详细的安装步骤、平台侧设置或定制化配置时,参考 安装与运维。配置、聊天命令和架构参考为英文文档:Configuration、Commands、Architecture。

功能特性

  • 持久的 Kimi 会话管理:创建、切换、分叉、归档与恢复,以及历史查看、重命名、压缩和撤销。
  • 原地编辑的流式回复与路由侧分块;平台支持时另有独立思考流、交互式审批与提问。
  • 提示排队、引导与取消,目标原地编辑,以及权限、计划、swarm 模式和忙碌时的模型、推理强度调整。
  • 查看智能体、待办和任务,控制后台运行;切换会话后接收工作状态通知,通过 /btw 单独提出只读问题。
  • 管理共享工作区目录,浏览、搜索、预览和发送文件,查看原生记录的更改与差异;可选择 Kimi 已配置的远程执行环境。
  • 接收图片、视频、文件和语音转写,查看技能、插件、MCP 状态及可用的托管账户额度。
  • 私聊白名单、仅监听回环地址的 Kimi 服务器监管,以及本地 doctor 诊断。

命令

聊天命令包括:

  • 会话:/new、/archive、/sessions、/switch、/fork、/restore、/status、/title、/history、/compact、/undo;
  • 控制:/mode、/model、/secondary-model、/effort、/plan、/swarm、/queue、/goal、/stop、/reload;
  • 智能体与任务:/agents、/todos、/tasks、/btw;
  • 工作区与文件:/workspace、/files、/environments;
  • 集成与用量:/skills、/plugins、/mcp、/usage;
  • 输出:/render-thinking。

在聊天中输入 /help 或 /<command> ? 查看用法;确切语法和平台限制见命令参考。

架构与安全

飞书、QQ、微信或实验性的 Telegram
                 │
                 ▼
             聊天路由器
                 │
                 ▼
           本地 `kimi web`

受监管的 Kimi 服务器只绑定回环地址并使用随机 bearer token,聊天访问由适配器白名单限制。kimi-bridge 面向一个受信任的操作者;获授权的 Kimi 智能体可以以宿主机账户的权限读写文件和执行命令,请保护宿主机、配置文件和聊天凭据。组件边界与 Kimi Code 兼容性命令见架构与兼容性。

开发

uv sync --dev
uv run pytest -q
uv run ruff check .

许可证

MIT © 2026 Mtrya

Metadata

Release files for kimi-bridge 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kimi-bridge 1.4.0
File Size Uploaded Provenance Actions
kimi_bridge-1.4.0.tar.gz 520.6 kB With provenance Details for kimi_bridge-1.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kimi-bridge 1.4.0
File Interpreter ABI Platform Actions
kimi_bridge-1.4.0-py3-none-any.whl Python 3 none any Details for kimi_bridge-1.4.0-py3-none-any.whl

Total release size: 775.1 kB

Release files / kimi_bridge-1.4.0.tar.gz

Download URL kimi_bridge-1.4.0.tar.gz
Size 520.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3cda848a98021f60ea88a640fa928025cbe0fd3f4b63bddb8abd5828bfd0fd02
BLAKE2b-256 checksum
How to use checksums
b5fdc2b513cd5c03a29233e645d12254b93ddd4d5899be180b7bf96c9a05a147
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / kimi_bridge-1.4.0-py3-none-any.whl

Download URL kimi_bridge-1.4.0-py3-none-any.whl
Size 254.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa527c05acf7cf7c5e7380e5bc8349667fac0ecd86bd05e29afcba4130f87200
BLAKE2b-256 checksum
How to use checksums
22091614d0c6fc1e7bb30ca0b8f821d6acd8f9f4ef381093fb6e169f5dc80221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Security for kimi-bridge 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kimi_bridge-1.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page