Codis

Codis — C++ AI Coding Assistant

Codis is a C++20-based AI coding assistant — multi-provider, full-duplex WebSocket streaming, tool calls, SQLite session persistence, and an FTXUI-powered terminal TUI. One server, many clients.

$ curl -fsSL https://codis.chat/install | bash
codis
$ codis -c
▌ User  list all TODOs in this repo
▌ Codis Let me search for them.
▾ bash grep -rn "TODO" --include="*.cpp" .
│ libs/server/src/server.cpp:42:  // TODO: retry on 429
│ libs/cli/src/tui.cpp:110:  // TODO: fold long outputs
▾ grep TODO --include="*.cpp"
│ 2 results in 0.02s
▌ Codis Found 2 TODOs (see tool output above). Want me to fix them?

Features

An AI coding assistant built for the terminal

多 Provider

OpenAI / DeepSeek / GLM / Groq,配置文件驱动,运行时可随时切换。

全双工 WebSocket

一条连接既发请求又收流式推送,模型输出按 token 实时到达,含思维链。

工具调用

bash / read / write / edit / glob / grep,支持 C ABI 插件动态扩展。

多客户端共享会话

CLI / TUI / 飞书机器人共用同一 session,互不干扰。

会话持久化

SQLite 存储,支持恢复历史、切换、删除、搜索;消息排队补跑不丢失。

终端 TUI

FTXUI 界面:颜色区分消息、滚轮滚动、双击 ESC 取消任务、断线自动重连补发。

Docker 一键部署

单容器运行,开箱即用。

纯 C++20

CMake + vcpkg 构建,无运行时依赖,开源自托管。

Download

Prebuilt binaries from GitHub Releases — extract and run

Linux x86_64
Download Linux
macOS Apple Silicon
Download macOS
Windows x86_64
Download Windows
Source GitHub
Clone ↗

…or build from source

# 依赖:CMake 3.20+ / vcpkg / C++20 编译器
git clone https://github.com/xyanrch1024/Codis.git
# vcpkg install cpp-httplib nlohmann-json cli11 tomlplusplus openssl sqlite3 ftxui asio
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
cmake --build build -j$(nproc)

Quickstart

Set your API key, then run — the CLI auto-starts the server

$ export GLM_API_KEY="your-api-key"
$ codis
$ codis -c          # continue last session
$ codis -p 8711 -m glm-4.5-flash   # port / model

Docker deployment

$ docker run -d --name codis \
  -e GLM_API_KEY="xxx" \
  -p 8711:8711 \
  ghcr.io/xyanrch1024/codis:latest

TUI shortcuts: ↑↓ / scroll · ESC ESC cancel · Ctrl+S sessions · Ctrl+C quit