← 回總覽

分享自己写的多项目 AI 终端 Codux: Codex / Claude Code 等 8 个 CLI 按项目统一管理,开源

📅 2026-07-04 23:49 349865361 人工智能 10 分鐘 11600 字 評分: 89
AI 编程 开发者工具 命令行工具 开源项目 AI 工作流
📌 一句话摘要 Codux 是一个用 Rust + GPUI 编写的开源原生终端,可统一管理 Codex、Claude Code 等 8 个 AI CLI,按项目组织任务、实时监控 agent 状态,并提供安全隔离与远程控制能力。 📝 详细摘要 本文介绍作者开发的 AI 终端管理工具 Codux(GPL-3.0 开源,2.0 RC)。起因是处理 Codex 长时间重构时停在确认等待的场景,随后将多个痛点工具整合为一。Codux 支持将 8 个主流 AI CLI(Codex、Claude Code、OpenCode、Kiro CLI、Kimi Code、CodeWhale、MiMo Code
Skip to main contentAudio 2 ![Image 2: LogoBest Blogs](https://www.bestblogs.dev/ "BestBlogs.dev")

Search Ctrl+K

Change language Switch ThemeSign In

[](https://www.bestblogs.dev/en/explore/brief "Daily Brief")[](https://www.bestblogs.dev/en/explore/newsletter "Weekly Picks")[](https://www.bestblogs.dev/en/explore/topics "Topics")[](https://www.bestblogs.dev/en/worldcup "World Cup Special")

[](https://www.bestblogs.dev/en/settings "Settings")[](https://www.bestblogs.dev/en/docs "Help Center")

Narrow Mode

89

分享自己写的多项目 AI 终端 Codux: Codex / Claude Code 等 8 个 CLI 按项目统一管理,开源

Codux is an open-source native terminal written in Rust + GPUI that unifies management of 8 AI CLIs including Codex and Claude Code, organizing tasks by project, monitoring agent status in real-time, and providing secure isolation with remote control capabilities. V V2EXFollow·

Yesterday·871 words (about 4 min)

·View Source →

AI Summary & Key Points

Summary

This article introduces Codux, an AI terminal management tool developed by the author (GPL-3.0 open source, 2.0 RC). It originated from handling scenarios where Codex gets stuck waiting for confirmation during long refactoring sessions, then consolidated multiple pain point tools into one. Codux supports integrating 8 mainstream AI CLIs (Codex, Claude Code, OpenCode, Kiro CLI, Kimi Code, CodeWhale, MiMo Code, Agy) into a project-arranged view, displaying agent status in real-time (generating/waiting for confirmation/idle/completed), with the ability to switch models, adjust inference tiers, and enable full permissions directly in the interface. The underlying implementation uses process detection and session file parsing without modifying CLI configurations or system files, reverting completely upon uninstallation. Tasks are organized based on git worktrees, where each worktree has an independent terminal, git status, and AI session; agents can only use two restricted commands (codux-ssh and codux-db), with passwords and sensitive information injected through auxiliary processes that remain inaccessible to the model. Supports desktop/phone/host pairing with end-to-end encrypted P2P connections for remote permission confirmation and task distribution. Includes built-in local memory auto-injection, token statistics, and automatic screenshot pasting. The author also notes limitations: GPUI's Linux desktop support is incomplete, currently offering only macOS native experience and Linux headless host-side capabilities.

Main Points

* 1. Codux integrates multiple AI CLIs into a unified view, organizing tasks by project and monitoring agent status in real-time.

Supports 8 CLIs including Codex and Claude Code, implemented through process detection and session file parsing without modifying any configurations or system files, reducing management overhead in multi-agent collaboration.

* 2. Security design is the core red line: agents can only execute restricted commands, with passwords and sensitive information completely isolated from the model.

Agents only expose two encapsulated commands (codux-ssh and codux-db), with real passwords injected in auxiliary processes so the model cannot see or remember them; when the database is marked read-only, DROP operations are rejected at the syntax level.

* 3. Supports multi-device pairing and remote control with end-to-end encrypted P2P connections, no public IP required.

Desktop, mobile app, and headless host can pair with each other, with relays only passing ciphertext; mobile can take over the same session for confirmation, viewing output, and distributing tasks; idle Mac mini or servers can be registered as worker machines with one click.

* 4. Integrates local memory, token statistics, and various interaction optimizations to enhance the AI coding experience.

Preferences and project notes are automatically injected back into CLI; token consumption is tracked by tool/model/project dimensions and stored in local SQLite; details like automatic screenshot pasting, IME candidate box following cursor, and agents draggable as floating windows further reduce context-switching costs.

Sign in to highlight text and take notes as you read. Sign in now

我从 2024 年开始用 AI 写代码,现在基本重度依赖 Codex 和 Claude Code 。三个月前开始把工作流里的痛点一个个做成工具,攒着攒着成了一个完整的东西:Codux ,Rust + GPUI 写的原生终端,GPL-3.0 开源,刚到 2.0 RC 。

起因很具体:有次 Codex 跑一个二十分钟的重构,我出门了,回来发现它第三分钟就停在 y/n 上等我。从那天起做的第一个功能就是把"agent 在等确认"这个状态在项目列表里亮出来。

现在它长这样:

!Image 3: iShot_2026-07-04_23.21.57.png

8 个 AI CLI ( Codex 、Claude Code 、OpenCode 、Kiro CLI 、Kimi Code 、CodeWhale 、MiMo Code 、Agy )收进一个按项目排的视图,状态分到"生成中 / 等确认 / 闲着 / 跑完"。换模型、调推理档位、开完全权限都在界面上点。实现是进程探测加会话文件解析,不写项目文件、不改 CLI 配置、不装 hook ,卸载即复原——这条是红线,不然我自己都不敢用。

任务按 git worktree 组织,每个 worktree 有自己的终端、git 状态和 AI 会话,几个 agent 各改各的互不干扰。git 面板能整目录 stage / 丢弃,agent 改了什么当场核。

我最较真的部分。agent 只能用 codux-ssh <配置名>codux-db <配置名> 两个命令,list 只给名字和主机,真实密码在辅助进程里注入,模型全程没见过——不进上下文、不进会话记录、不进 shell 历史。数据库标只读的话 wrapper 只放行单条查询,DROP 在语法层就被拒。

桌面 / 手机 App ( iOS/Android )/ 无界面主机端互相配对,端到端加密 P2P ,打不通走中继(中继只见密文),不要公网 IP 。手机接的是同一个活着的会话,不是远程桌面:确认权限、看输出、派新活都行。闲置的 Mac mini 或服务器一行脚本装上主机端,注册成 launchd/systemd 服务,就是台干活机。还有个隧道浏览器,能以主机身份打开它的 127.0.0.1:5173 ,远程调 Vite 不用配端口转发。

本地记忆(偏好、项目画像、笔记)自动注入回 CLI ,全走官方通道( developer instructions / --append-system-prompt / 托管 plugin ); token 按工具/模型/项目/worktree/日期统计,本地 SQLite 。

也磨了不少:粘贴截图自动落盘成路径直接发给 AI 、⌘F 搜滚动历史、IME 候选框跟光标、终端标题显示在跑的 AI 和模型、agent 可以拎成悬浮窗。

纯属好玩的:token 消耗喂一只像素宠物,属性长自作息,熬夜党夜行值拉满。

不足也说清楚:GPUI 的 Linux 桌面还不行,Linux 目前只有无界面主机端。没有云端没有账号,数据全在本机。

* GitHub: https://github.com/duxweb/codux * 官网: https://codux.dux.cn * macOS:brew install --cask duxweb/tap/codux

Key Quotes

> This is the red line, otherwise I wouldn't dare use it myself.

> The agent never sees it throughout — not in context, not in session history, not in shell history.

Tags

AI Coding

Developer Tools

CLI Tools

Open Source

AI Workflow

Related Articles

* From OpenClaw to FastClaw: How to Design a Great Multi-Agent Architecture * Rethinking Development Infrastructure: When Agents Become First-Class Citizens * Skill: Tips on How Vibe Coding Improves Code Quality and Efficiency * Skill: Tips on How Vibe Coding Improves Code Quality and Efficiency * Harness Engineering: Can AI Write Code in Truly "Mission-Critical" Backend Systems?, and multi-model adversarial code review, they built an engineering system that enables AI to safely and controllably produce high-quality code.") * Heart Bleeding: My 32GB 16-inch MacBook Pro 2019 Suddenly Died that bricked after a system update, ultimately diagnosed as physical damage to the iNAND inside the T2 chip, along with subsequent solutions and data recovery notes.") * Harness Engineering: How I Spent a Week Boosting AI Coding Rate to 90% in an Enterprise App * vibe-coding-template: After Losing a Codex Conversation File, I Organized a Set of Agent Long-Term Collaboration Templates to Quickly Embed AGENTS.md, Task Prompts, Code Review, Knowledge Explanations, and Web-Search Workflows into Projects * The Era of Super Individuals | Tencent Research Institute's 30,000-Word Report * AI R&D Automation: Wiki Knowledge Base + Skill Pack

Make your daily reading actually fit you.A daily brief built from the sources you follow. Get started free HomeDiscoverWorld CupSettings

查看原文 → 發佈: 2026-07-04 23:49:07 收錄: 2026-07-05 08:00:38

🤖 問 AI

針對這篇文章提問,AI 會根據文章內容回答。按 Ctrl+Enter 送出。