Crux
GPU-accelerated terminal emulator for macOS, built with Rust and Metal.
Designed for the AI coding era — with a native MCP server and first-class Korean/CJK IME.
English · 한국어
早期开发(第1阶段,共6阶段) 核心终端渲染工作。以下大多数功能都在路线图上。 看 计划.md 全面实施计划。
______________________________________________________________________
为什么是Crux?
像Claude Code这样的AI编码工具需要 程序化窗格控件 --拆分终端、发送命令、读取输出。今天,这意味着将AppleScript包装器连接到终端上,或者通过tmux路由所有内容。没有一个终端本身就内置了这个功能。
Crux旨在从头开始解决这两个问题:
- 本地MCP服务器 --AI代理(Claude Desktop、Claude Code、Cursor)直接控制Crux,无需配置
- 一流的韩语/CJK输入法 --这不是事后的想法,而是从第一天开始的核心设计约束
- 程序化窗格控件 -一个真正的API,用于拆分窗格、命令执行和输出监视
- GPU加速 --金属渲染通过 GPUI,目标为120 FPS
______________________________________________________________________
今天什么有效
- 通过GPUI渲染的金属GPU终端窗口
- 全VT100/xtm仿真由 敏捷终端
- 真彩色(24位RGB)+256色支持
- 带修饰键处理的键盘输入
- SGR鼠标报告和括号粘贴
- 自定义术语输入(
xterm-crux)与xterm-256color后备方案
______________________________________________________________________
路线图
| 阶段 | 焦点 | 状态 |
|---|---|---|
| 1.基本终端 | 外壳渲染、键盘、VT仿真、terminfo | 进行中 |
| 2.选项卡和窗格 | 拆分窗格、IPC服务器、CLI客户端、shell集成 | 已计划 |
| 3. 韩国/捷克IME | NSTextInputClient、韩文排版、候选窗口 | 已计划 |
| 4.功能丰富 | Markdown预览、可点击链接、图形协议 | 已计划 |
| 5.人工智能集成 | 原生MCP服务器(30个工具)、tmux compat、配置系统 | 计划中 |
| 6.分布 | 自制、代码签名、公证、通用二进制 | 计划中 |
看 计划.md 查看包含200多个项目的详细清单。
______________________________________________________________________
从源头构建
先决条件:macOS 13+(Ventura),Rust稳定工具链,完整版 Xcode.app 安装(仅命令行工具无法工作——Metal着色器编译需要完整的IDE)。
# Verify Metal compiler
xcrun -sdk macosx metal --version
# Clone, build, and run
git clone https://github.com/HarryJhin/crux.git
cd crux
cargo run -p crux-app(可选)编译terminfo条目以进行全功能协商:
tic -x -e xterm-crux,crux,crux-direct extra/crux.terminfo______________________________________________________________________
项目结构
7箱货物工作区:
crux-terminal VT emulation (alacritty_terminal + portable-pty)
crux-terminal-view GPU rendering (GPUI canvas, cells, cursor, selection)
crux-app Application shell (window management, GPUI bootstrap)
crux-protocol Shared types and protocol definitions [stub]
crux-ipc Unix socket server, JSON-RPC 2.0 [stub]
crux-clipboard Rich clipboard and drag-and-drop [stub]
crux-mcp Native MCP server [planned]看 研究/ 架构决策和技术深度探索目录。
______________________________________________________________________
贡献
欢迎捐款——该项目尚处于早期阶段,现在是参与的好时机。
- 语言:生锈(稳定的工具链)
- 风格:
cargo fmt+cargo clippy -- -D warnings - 提交: 常规承诺 具有机箱名称范围(例如。
feat(terminal): add sixel support) - 测试:新功能所需
______________________________________________________________________
许可证
双重许可 麻省理工学院 和 Apache 2.0。选择你喜欢的。
______________________________________________________________________
Crux — Latin for "the essential point" and the Southern Cross constellation.
The crux of terminal UX for AI coding.
