Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
237ea5c
chore: update gitignore
hereww May 18, 2026
91e8256
update crates/codex-plus-core/src/lib.rs
hereww May 18, 2026
93c3547
update README.md
hereww May 18, 2026
d526616
update README_EN.md
hereww May 18, 2026
80146a3
update apps/codex-plus-launcher/src/main.rs
hereww May 18, 2026
3eb1f06
update apps/codex-plus-manager/src-tauri/src/commands.rs
hereww May 18, 2026
080e3e3
update apps/codex-plus-manager/src/styles.css
hereww May 18, 2026
9bb576e
update codex_session_delete/app_paths.py
hereww May 18, 2026
eabd67b
update codex_session_delete/macos_installer.py
hereww May 18, 2026
864aa9b
update crates/codex-plus-core/src/app_paths.rs
hereww May 18, 2026
ae2008f
update crates/codex-plus-core/src/cli_wrapper.rs
hereww May 18, 2026
cf259db
update crates/codex-plus-core/src/install/macos.rs
hereww May 18, 2026
3d6167d
update crates/codex-plus-core/src/settings.rs
hereww May 18, 2026
8d7e91d
update crates/codex-plus-core/tests/installers.rs
hereww May 18, 2026
cefeac4
update scripts/installer/macos/package-dmg.sh
hereww May 18, 2026
f742c99
update tests/test_app_paths.py
hereww May 18, 2026
704ba18
update tests/test_macos_installer.py
hereww May 18, 2026
f7c4e67
update tests/test_macos_package_dmg.py
hereww May 18, 2026
a345bb9
update apps/codex-plus-manager/src/App.tsx
hereww May 18, 2026
9b554da
update crates/codex-plus-core/src/launcher.rs
hereww May 18, 2026
40ac6b9
update crates/codex-plus-core/src/relay_config.rs
hereww May 18, 2026
987e4db
update crates/codex-plus-core/src/relay_proxy.rs
hereww May 18, 2026
869839b
update crates/codex-plus-core/tests/bridge_routes.rs
hereww May 18, 2026
343f647
update crates/codex-plus-core/tests/launcher.rs
hereww May 18, 2026
cc61918
update crates/codex-plus-core/tests/relay_config.rs
hereww May 18, 2026
7098308
add crates/codex-plus-core/src/relay_proxy.rs
hereww May 18, 2026
5bf7bef
add tests/test_macos_package_dmg.py
hereww May 18, 2026
4b275c7
remove misplaced macos package test
hereww May 18, 2026
c574e15
Merge remote-tracking branch 'origin/main' into codex/pr-155
hereww May 19, 2026
26dd62e
Merge remote-tracking branch 'origin/main' into codex/pr-155
hereww May 19, 2026
b4d1067
Merge branch 'main' into codex/improve-relay-image-proxy-macos
hereww May 20, 2026
cc2576a
Merge remote-tracking branch 'origin/main' into codex/pr-155
hereww May 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ venv/
build/
dist/
target/
node_modules/
apps/codex-plus-manager/src-tauri/gen/

.codex_asar_extract/
Expand Down
52 changes: 46 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@

Codex++ 是面向 Codex App 的外部增强启动器和管理工具。它不修改 Codex App 原始安装文件,而是通过外部 launcher 启动 Codex,并使用 Chromium DevTools Protocol 注入增强脚本。

## 目录

- [快速使用](#快速使用)
- [Windows 使用](#windows-使用)
- [中转注入](#中转注入)
- [增强功能](#增强功能)
- [自动更新与安装包](#自动更新与安装包)
- [常见问题](#常见问题)
- [开发](#开发)

## 快速使用

从 [GitHub Releases](https://github.com/BigPizzaV3/CodexPlusPlus/releases) 下载最新版安装包:
Expand All @@ -33,6 +43,10 @@ Codex++ 是面向 Codex App 的外部增强启动器和管理工具。它不修

Windows 安装包会创建桌面和开始菜单快捷方式。macOS DMG 会安装 `/Applications/Codex++.app` 和 `/Applications/Codex++ 管理工具.app`。

## Windows 使用

Windows 用户下载 `windows-x64-setup.exe` 后直接运行安装包。安装完成后,从桌面或开始菜单启动 `Codex++` 即可。

## 赞助商
<a href="mailto:1727532@qq.com">想显示在下方?</a>
<p align="center">
Expand Down Expand Up @@ -100,26 +114,38 @@ Windows 安装包会创建桌面和开始菜单快捷方式。macOS DMG 会安

<img src="docs/images/discussion-group-qr.jpg" alt="Codex++ 交流群二维码" width="260">

## 赞赏支持

如果 Codex++ 帮到了你,可以请我喝杯咖啡,或者随手赞赏支持一下继续维护。

<p align="center">
<img src="docs/images/sponsor-alipay.jpg" alt="支付宝赞赏码" width="220">
<img src="docs/images/sponsor-wechat.jpg" alt="微信赞赏码" width="220">
</p>

## 主要功能
## 功能亮点

- Rust 后端和静默 launcher,启动时不依赖额外运行时。
- Tauri + React 管理工具,支持深色/浅色切换。
- 外部 CDP 注入,不改 `app.asar`,不向 Codex 安装目录写入 DLL。
- 中转注入模式:支持多个中转配置,写入 `CodexPlusPlus` provider,并可切回官方 ChatGPT 登录态。
- 传统增强模式:插件入口解锁、特殊插件强制安装、会话删除、Markdown 导出、项目移动、Timeline 等。
- 用户脚本独立管理,可在启动时注入自定义脚本。
- Provider 同步:启动前同步本地会话 metadata,切换供应商后旧会话仍可见
- Provider 同步:启动前同步本地会话 metadata,切换 model_provider 后不丢历史会话
- Zed 打开入口:识别远程 SSH 上下文后,可从 Codex 直接打开对应文件到 Zed Remote Development。
- GitHub Release 自动更新,管理工具和静默启动器都会检测可用更新。
- Windows 单实例、无黑框启动、管理员权限清单、系统桌面路径识别。
- macOS x64/arm64 分架构 DMG,静默入口隐藏 Dock 图标。
- macOS x64/arm64 分架构 DMG,自动识别 Codex bundle,静默入口隐藏 Dock 图标。

## 项目数据

<p align="center">
<img src="https://contrib.rocks/image?repo=BigPizzaV3/CodexPlusPlus" alt="Codex++ contributors">
</p>

<p align="center">
<img src="https://api.star-history.com/svg?repos=BigPizzaV3/CodexPlusPlus&type=Date" alt="Codex++ star history">
</p>

## 痛点与解决

Expand Down Expand Up @@ -148,8 +174,9 @@ Codex++ 启动后会解锁插件入口,并在会话列表悬停时显示删除

1. 确认已经检测到 ChatGPT 登录状态。
2. 添加一个或多个中转配置,填写 Base URL 和 Key。
3. 选择当前配置并应用中转注入。
4. 启动 `Codex++`。
3. 按需打开“允许当前中转使用图片生成”。如果主中转组没有图片权限,保持关闭;如果希望图片生成走单独通道,填写独立图片 Base URL 和 Key。
4. 选择当前配置并应用中转注入。
5. 启动 `Codex++`。

Codex++ 会在 `~/.codex/config.toml` 中写入类似配置:

Expand All @@ -160,10 +187,16 @@ model_provider = "CodexPlusPlus"
name = "CodexPlusPlus"
wire_api = "responses"
requires_openai_auth = true
base_url = "https://example.com/v1"
base_url = "http://127.0.0.1:57323/v1"
disabled_tools = ["image_generation"]
codex_plus_text_base_url = "https://example.com/v1"
experimental_bearer_token = "sk-..."
```

图片生成关闭时,Codex++ 会把 provider 写到本地 `127.0.0.1:57323` 代理。代理会在转发到当前中转前裁剪 `image_generation` 工具,避免部分中转组未开启图片生成权限时,Codex 会话请求被上游以 `Image generation is not enabled for this group` 拒绝。

如果在管理工具中开启“图片生成使用独立 API 和 Key”,同一个本地代理会把普通请求转发到当前中转,把包含 `image_generation` 工具的 Responses 请求转发到图片生成 API。

如果需要回到官方登录态,在“中转注入”页面点击清除 API 模式即可移除 `OPENAI_API_KEY` 相关配置并切回官方 ChatGPT 登录模式。

## 增强功能
Expand Down Expand Up @@ -221,6 +254,10 @@ Invoke-RestMethod -Method Post -Uri http://127.0.0.1:57321/backend/status -Body

可以。Release 会分别提供 `macos-x64.dmg` 和 `macos-arm64.dmg`。Intel Mac 下载 x64 包,Apple Silicon 下载 arm64 包。

### macOS 找不到 Codex App

Codex++ 会优先检查 `/Applications`,再检查 `~/Applications`,并通过 `Info.plist` 中的 OpenAI Codex bundle 标识识别应用。若你把 Codex 放在其他目录,可以在管理工具中填写 Codex App 路径,或通过启动参数指定 `--app-path "/path/to/Codex.app"`。

## 开发

```bash
Expand All @@ -235,6 +272,9 @@ cd ../..
cargo fmt --check
cargo test
cargo build --release

# macOS 打包
scripts/installer/macos/package-dmg.sh 1.1.1 arm64
```

主要结构:
Expand Down
34 changes: 29 additions & 5 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,21 @@ The Windows installer creates desktop and Start Menu shortcuts. The macOS DMG in
- Relay injection mode with multiple relay profiles, `CodexPlusPlus` provider configuration, and a one-click switch back to official ChatGPT login mode.
- Traditional enhancement mode with plugin entry unlock, forced plugin install, session delete, Markdown export, project move, Timeline, and more.
- Independent user script management with startup injection.
- Provider Sync to keep historical sessions visible after switching providers.
- Provider Sync to switch model_provider without losing historical conversations.
- Zed open entry detects remote SSH context and opens the matching remote file in Zed Remote Development from Codex.
- GitHub Release updates. Both the manager and silent launcher can detect available updates.
- Windows single instance, no console window, administrator manifest, and system Desktop path detection.
- Separate macOS x64 and arm64 DMGs. The silent launcher hides its Dock icon.
- Separate macOS x64 and arm64 DMGs, automatic Codex bundle detection, and a hidden Dock icon for the silent launcher.

## Project Stats

<p align="center">
<img src="https://contrib.rocks/image?repo=BigPizzaV3/CodexPlusPlus" alt="Codex++ contributors">
</p>

<p align="center">
<img src="https://api.star-history.com/svg?repos=BigPizzaV3/CodexPlusPlus&type=Date" alt="Codex++ star history">
</p>

## Relay Injection

Expand All @@ -116,8 +126,9 @@ In the manager's Relay Injection page:

1. Make sure ChatGPT login status is detected.
2. Add one or more relay profiles with Base URL and Key.
3. Select the active profile and apply relay injection.
4. Launch `Codex++`.
3. Enable image generation for the current relay only when that relay group has image permission. To use a separate image-generation provider, enter the image Base URL and Key.
4. Select the active profile and apply relay injection.
5. Launch `Codex++`.

Codex++ writes configuration similar to this into `~/.codex/config.toml`:

Expand All @@ -128,10 +139,16 @@ model_provider = "CodexPlusPlus"
name = "CodexPlusPlus"
wire_api = "responses"
requires_openai_auth = true
base_url = "https://example.com/v1"
base_url = "http://127.0.0.1:57323/v1"
disabled_tools = ["image_generation"]
codex_plus_text_base_url = "https://example.com/v1"
experimental_bearer_token = "sk-..."
```

When image generation is disabled, Codex++ writes the provider through a local `127.0.0.1:57323` proxy. The proxy removes the `image_generation` tool before forwarding regular requests to the current relay, preventing relays without image-generation permission from rejecting Codex session requests with `Image generation is not enabled for this group`.

When the manager is configured to use a separate image-generation API, the same local proxy forwards regular requests to the current relay and forwards Responses requests containing the `image_generation` tool to the image-generation API.

To return to the official login mode, use the clear API mode button in the Relay Injection page. This removes `OPENAI_API_KEY` related configuration and switches Codex back to official ChatGPT authentication.

## Enhancements
Expand Down Expand Up @@ -189,6 +206,10 @@ Unsigned and unnotarized builds may be blocked by Gatekeeper. Allow the app in S

Yes. Releases provide both `macos-x64.dmg` and `macos-arm64.dmg`. Intel Macs should use the x64 package, while Apple Silicon Macs should use the arm64 package.

### Codex++ cannot find Codex App on macOS

Codex++ checks `/Applications` first, then `~/Applications`, and identifies Codex through the OpenAI Codex bundle identifier in `Info.plist`. If Codex is installed somewhere else, set the Codex App path in the manager or launch with `--app-path "/path/to/Codex.app"`.

## Development

```bash
Expand All @@ -203,6 +224,9 @@ cd ../..
cargo fmt --check
cargo test
cargo build --release

# macOS package
scripts/installer/macos/package-dmg.sh 1.1.1 arm64
```

Project structure:
Expand Down
9 changes: 7 additions & 2 deletions apps/codex-plus-launcher/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use codex_plus_core::launcher::{
};
use codex_plus_core::models::{DeleteResult, ExportResult, SessionRef};
use codex_plus_core::routes::{BridgeContext, BridgeDataService, BridgeRuntimeService};
use codex_plus_core::settings::BackendSettings;
use codex_plus_core::user_scripts::UserScriptManager;
use serde_json::{Value, json};
#[cfg(windows)]
Expand Down Expand Up @@ -163,8 +164,12 @@ impl LaunchHooks for LauncherHooks {
Ok(())
}

async fn start_helper(&self, helper_port: u16) -> anyhow::Result<()> {
self.core.start_helper(helper_port).await
async fn start_helper(
&self,
helper_port: u16,
settings: &BackendSettings,
) -> anyhow::Result<()> {
self.core.start_helper(helper_port, settings).await
}

async fn launch_codex(
Expand Down
15 changes: 10 additions & 5 deletions apps/codex-plus-manager/src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::path::{Path, PathBuf};
use std::time::{SystemTime, UNIX_EPOCH};

use codex_plus_core::install::SILENT_BINARY;
use codex_plus_core::relay_config::RelayApplyOptions;
use codex_plus_core::settings::{BackendSettings, SettingsStore};
use codex_plus_core::status::{LaunchStatus, StatusStore};
use codex_plus_core::user_scripts::UserScriptManager;
Expand Down Expand Up @@ -576,11 +577,15 @@ pub fn apply_relay_injection() -> CommandResult<RelayPayload> {

let settings = SettingsStore::default().load().unwrap_or_default();
let relay = settings.active_relay_profile();
match codex_plus_core::relay_config::apply_relay_config_to_home(
&home,
&relay.base_url,
&relay.api_key,
) {
let options = RelayApplyOptions {
base_url: relay.base_url,
bearer_token: relay.api_key,
image_generation_enabled: relay.image_generation_enabled,
image_generation_use_separate_api: relay.image_generation_use_separate_api,
image_generation_base_url: relay.image_generation_base_url,
image_generation_bearer_token: relay.image_generation_api_key,
};
match codex_plus_core::relay_config::apply_relay_config_to_home_with_options(&home, &options) {
Ok(result) => {
let status = codex_plus_core::relay_config::relay_status_from_home(&home);
ok(
Expand Down
Loading