Metadata-Version: 2.4
Name: kimi-discord-bridge
Version: 0.1.0
Summary: Discord bridge for Kimi CLI with cmux integration
Project-URL: Homepage, https://github.com/yourusername/kimi-discord-bridge
Project-URL: Repository, https://github.com/yourusername/kimi-discord-bridge
License: MIT
Keywords: acp,bridge,cmux,discord,kimi
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Communications :: Chat
Requires-Python: >=3.14
Requires-Dist: batrachian-toad
Requires-Dist: discord-py>=2.4
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# kimi-discord-bridge

Discord bridge for [Kimi CLI](https://github.com/moonshot-ai/kimi-cli) with [cmux](https://github.com/...) integration.

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

## Installation

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

Or install from source:

```bash
git clone https://github.com/yourusername/kimi-discord-bridge.git
cd kimi-discord-bridge
uv tool install --python 3.14 .
```

## Requirements

- Python 3.14+
- `uv` (recommended) or `pip`
- `cmux` (optional, for TUI sync)
- `kimi` CLI (optional, for ACP sessions)

## Quick Start

1. **Configure environment variables**:

```bash
cp .env.example .env
# Edit .env with your Discord token, client ID, and guild ID
```

2. **Register slash commands** (once per guild):

```bash
kimi-discord-bridge deploy-commands
```

3. **Run the bot**:

```bash
kimi-discord-bridge run
```

## 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
