Rust + Tauri Tauri+ React React+ TypeScript TypeScript+ shadcn/ui shadcn/ui + Codex CLI+ Claude Code+ Agent Client Protocol (ACP)+ Zustand

用 Tauri+React 构建桌面工作站,统一管理 Codex、Claude Code 与 ACP 代理会话

✓ 多代理统一工作台✓ 数据全部本地存储 ✕ 依赖各 CLI 已安装配置✕ 桌面端平台适配成本

方案简介

Codexia 是一个轻量级代理指挥中心(Agent Workstation),把 Codex CLI、Claude Code 以及任何遵循 Agent Client Protocol (ACP) 的外部代理整合进同一个桌面工作区。它解决的问题是:开发者在多个终端窗口里分别运行不同编码代理、缺乏统一的任务调度与上下文管理。Codexia 提供 task scheduler(定时/循环任务)、git worktree 管理、IDE 风格编辑器、prompt 记事本与本地 web 预览,让代理工作流在一个界面内完成。项目由 @milisp 维护,采用 MIT 许可,适合希望在本地统一编排多代理编码工作流的开发者。

亮点与能力

  • Agent Client Protocol (ACP): Connect any external ACP agent — sessions persist across restarts, tool calls render live in the thread
  • Agent workflows: Task Scheduler for recurring jobs, remote control via headless web server (including iOS)
  • Workspace: Git worktree management, project file tree, IDE-like editor, prompt notepad, local web preview
  • Data tools: One-click PDF / XLSX / CSV preview
  • Ecosystem: MCP server marketplace, agent skills marketplace
  • Personalization: Theme and accent customization, usage analytics dashboard

组成与分工

  • Tauri v2 + Rust:桌面后端,位于 src-tauri/src/,承担桌面命令与状态管理
  • React + TypeScript + Zustand + shadcn/ui:前端界面,位于 src/
  • Codex app-server:代理运行时,通过 JSON-RPC 集成管理 session/turn 生命周期
  • Claude agent rust sdk:Claude Code 集成
  • ACP client:连接任意外部 ACP 代理,会话跨重启持久化
  • Axum web server:headless 后端(web/),提供远程控制能力

前置要求

  • macOS / Linux / Windows 桌面环境
  • 可选:任何支持 Agent Client Protocol 的代理

macOS 通过 Homebrew 安装:

sh
brew install --cask codexia

Windows 通过 Scoop 安装:

powershell
scoop bucket add milisp https://github.com/milisp/scoop-bucket
scoop install codexia

实施步骤

1. 安装 Codexia

macOS 执行 brew install --cask codexia;Windows 可用 Scoop 或下载 portable 压缩包(codexia__x64_portable.zip)免安装运行。

2. 启动并添加项目

Launch Codexia 后,Add your project directory。

3. 开始代理会话

Enter a prompt and start your agent session,即可与 Codex/Claude/ACP 代理对话。

4. 配置定时任务

Create an Agent Task Scheduler job for recurring workflows。

使用与配置要点

在 headless/web 模式下,Codexia 暴露浏览器可访问的 API:

  • 健康与流:GET /healthGET /ws
  • Codex 生命周期:/api/codex/thread//api/codex/turn//api/codex/model//api/codex/approval/
  • 自动化调度:/api/automation/*(create/update/list/run/pause/delete)
  • 文件、git、终端:/api/filesystem//api/git//api/terminal/*
  • Claude 集成:/api/cc/*

实时更新通过 /ws 的 WebSocket broadcast stream 推送给浏览器客户端。

注意事项与常见问题

  • 安全模型:代理在独立进程中运行(Process isolation),可按代理配置文件与网络访问权限,所有数据保存在本机
  • Windows portable 版无需安装即可运行
  • 社区 fork 提供变体:jeremiahodom/codex-ui(Node.js backend with API/SSE)、nuno5645/codexia(Reasoning and token count events)
  • 贡献者注意:新增 API handler 放在 ./web/src/handlers/,在 ./web/src/router.rs 注册路由,前端调用加到 src/services/tauri/

优缺点

  • ✓ 多代理统一工作台
  • ✓ 数据全部本地存储
  • ✕ 依赖各 CLI 已安装配置
  • ✕ 桌面端平台适配成本

出处

本方案挖掘自开源项目 milisp/codexia,方案内容与实施命令均来自其 README 原文。

方案出处
milisp/codexia:Lightweight Agent Workstation for Codex CLI + Claude Code — with task scheduler,
914 star Lightweight Agent Workstation for Codex CLI + Claude Code — with task scheduler, git worktree & remote control

本方案由真实开源项目挖掘整理,实施命令均来自其 README 原文,安装使用请遵循项目开源协议。