Skip to main content

Discord bridge for Kimi CLI with cmux integration

Project description

kimi-discord-bridge

Discord bridge for Kimi CLI with cmux integration.

Run Kimi sessions inside Discord threads while simultaneously driving a toad TUI in a cmux pane — both views stay in sync.

Installation

uv tool install --python 3.14 kimi-discord-bridge

Or install from source:

git clone https://github.com/HyeongJunMin/kimi-cli-discord.git
cd kimi-cli-discord
uv tool install --python 3.14 .

Requirements

  • Python 3.14+
  • uv (recommended) or pip
  • cmux (required for TUI sync)
  • kimi CLI (required for ACP sessions)

Note: cmux and kimi are listed as "required" because the core value of this bridge is bidirectional sync between Discord and the toad TUI. Without them the bot can still start, but it will operate in a limited Discord-only mode.

Quick Start

  1. Create a Discord bot application (if you don't have one):

    • Go to Discord Developer Portal
    • New Application → Bot tab → Add Bot
    • Enable Message Content Intent
    • OAuth2 URL Generator: scopes bot + applications.commands, permissions listed in INSTALL.md
    • Authorize the bot into your server
  2. Configure environment variables:

cp .env.example .env
# Edit .env with your Discord token, client ID, and guild ID
  1. Validate (catches credential/format errors early):
kimi-discord-bridge doctor
  1. Register slash commands (once per guild):
kimi-discord-bridge deploy-commands
  1. Run the bot:
kimi-discord-bridge run

Persistence warning: The bot creates sessions.json and logs/ in the current working directory. Always restart the bot from the same directory or sessions will not be resumed.

Commands

Command Description
/new Create a new Kimi session (workspace select → name)
/list List active sessions
/status <name> Check session status
/close [name] Close a session
/steer <name> <message> Send follow-up message
/interrupt <name> Interrupt active turn
/peek <name> [lines] Preview cmux screen

Architecture

Discord Thread  <--->  Bot (discord.py)  <--->  AcpMux  <--->  kimi acp
                                               ^
                                               |
cmux pane  <--->  toad TUI  <--->  attach (unix socket)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kimi_discord_bridge-0.1.5.tar.gz (101.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kimi_discord_bridge-0.1.5-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

Details for the file kimi_discord_bridge-0.1.5.tar.gz.

File metadata

  • Download URL: kimi_discord_bridge-0.1.5.tar.gz
  • Upload date:
  • Size: 101.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kimi_discord_bridge-0.1.5.tar.gz
Algorithm Hash digest
SHA256 cf3c3293047193f9675b40b5a1fc104ab8765096710756e1eb086ba0a5b7a676
MD5 6f2e2875cf4e5ac51bee0d3543340a33
BLAKE2b-256 f2c00a7ba9d8b3f89dbac2bd30352da4a51f2342fdc0188f7f49fd657834f642

See more details on using hashes here.

File details

Details for the file kimi_discord_bridge-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: kimi_discord_bridge-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 34.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kimi_discord_bridge-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 dbb4f942bbe65e33a43862c1a2fa66788dbe43fa58cb23377c1b03c2ec747a60
MD5 25a7b92064688c131c16b17111cf0d84
BLAKE2b-256 4c0b712d9eedfd87fe04263dd7462d5793c9f35bcd62a5a0ab7b26b67de80088

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page