codexplusplus-launcher

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Codex++ Launcher Skill

Codex++ 启动器 Skill

Skill by ara.so — Codex Skills collection.
Codex++ is an external enhancement launcher for Codex App that doesn't modify the original installation. It uses Chromium DevTools Protocol (CDP) to inject enhancement scripts that unlock plugins in API key mode, enable session deletion, export conversations to Markdown, sync provider sessions, and add a timeline view.
ara.so开发的Skill — Codex Skills合集。
Codex++ 是Codex App的外部增强启动器,无需修改原始安装文件。它借助Chromium DevTools Protocol (CDP)注入增强脚本,可在API密钥模式下解锁插件、支持会话删除、将对话导出为Markdown、同步提供商会话,还能添加时间线视图。

Installation

安装

Windows

Windows

Quick setup using batch script:
bash
undefined
使用批处理脚本快速设置:
bash
undefined

Clone the repository

Clone the repository

Run setup.bat and select option [1]

Run setup.bat and select option [1]

setup.bat

**Command line installation:**

```bash
setup.bat

**命令行安装:**

```bash

Install dependencies

Install dependencies

python -m pip install -e .
python -m pip install -e .

Create shortcuts and uninstall entry

Create shortcuts and uninstall entry

python -m codex_session_delete setup
python -m codex_session_delete setup

Launch Codex++

Launch Codex++

python -m codex_session_delete launch

After setup, double-click `Codex++.lnk` on the desktop to launch.
python -m codex_session_delete launch

设置完成后,双击桌面的`Codex++.lnk`即可启动。

macOS

macOS

bash
undefined
bash
undefined

Install

Install

python -m pip install -e .
python -m pip install -e .

Create /Applications/Codex++.app bundle

Create /Applications/Codex++.app bundle

python -m codex_session_delete setup
python -m codex_session_delete setup

Launch from Applications or command line

Launch from Applications or command line

python -m codex_session_delete launch
undefined
python -m codex_session_delete launch
undefined

Key Commands

核心命令

Launch and Setup

启动与设置

bash
undefined
bash
undefined

Launch Codex++ (with CDP injection)

Launch Codex++ (with CDP injection)

python -m codex_session_delete launch
python -m codex_session_delete launch

Launch with custom ports

Launch with custom ports

python -m codex_session_delete launch --debug-port 9229 --helper-port 57321
python -m codex_session_delete launch --debug-port 9229 --helper-port 57321

Launch with specific Codex installation

Launch with specific Codex installation

python -m codex_session_delete launch
--app-dir "C:/Program Files/WindowsApps/OpenAI.Codex_xxx/app"
python -m codex_session_delete launch
--app-dir "C:/Program Files/WindowsApps/OpenAI.Codex_xxx/app"

Install shortcuts/app bundle

Install shortcuts/app bundle

python -m codex_session_delete setup
python -m codex_session_delete setup

Uninstall (keeps logs and backups)

Uninstall (keeps logs and backups)

python -m codex_session_delete remove
python -m codex_session_delete remove

Uninstall and remove all data

Uninstall and remove all data

python -m codex_session_delete remove --remove-data
undefined
python -m codex_session_delete remove --remove-data
undefined

Updates

更新

bash
undefined
bash
undefined

Check for updates

Check for updates

python -m codex_session_delete check-update
python -m codex_session_delete check-update

Update to latest version

Update to latest version

python -m codex_session_delete update
undefined
python -m codex_session_delete update
undefined

Windows Auto-Watcher (Optional)

Windows自动监控器(可选)

Automatically intercept Codex launches and use Codex++ instead:
bash
undefined
自动拦截Codex启动,转而使用Codex++:
bash
undefined

Install watcher

Install watcher

python -m codex_session_delete watch-install
python -m codex_session_delete watch-install

Remove watcher

Remove watcher

python -m codex_session_delete watch-remove
python -m codex_session_delete watch-remove

Temporarily disable watcher

Temporarily disable watcher

python -m codex_session_delete watch-disable
python -m codex_session_delete watch-disable

Re-enable watcher

Re-enable watcher

python -m codex_session_delete watch-enable
undefined
python -m codex_session_delete watch-enable
undefined

Core Features

核心功能

1. Plugin Unlock in API Key Mode

1. API密钥模式下解锁插件

When using API Key authentication, Codex App normally disables plugin access. Codex++ unlocks this functionality.
How it works:
  • Injects
    renderer-inject.js
    via CDP
  • Patches frontend to enable plugin UI
  • Allows force-installation of special plugins
使用API密钥认证时,Codex App通常会禁用插件访问权限。Codex++可解锁此功能。
工作原理:
  • 通过CDP注入
    renderer-inject.js
  • 修补前端以启用插件UI
  • 允许强制安装特殊插件

2. Session Deletion

2. 会话删除

Codex natively only allows archiving. Codex++ adds true deletion with undo support.
Features:
  • Delete button appears on hover in session list
  • Confirmation dialog before deletion
  • Undo capability via local backup
  • SQLite database cleanup
Data locations:
bash
undefined
Codex原生仅支持归档功能。Codex++添加了带撤销功能的真正删除功能。
特性:
  • 会话列表中鼠标悬停时显示删除按钮
  • 删除前弹出确认对话框
  • 通过本地备份实现撤销功能
  • 清理SQLite数据库
数据位置:
bash
undefined

Main Codex database

Main Codex database

~/.codex/state_5.sqlite
~/.codex/state_5.sqlite

Deletion backups

Deletion backups

~/.codex-session-delete/backups/
undefined
~/.codex-session-delete/backups/
undefined

3. Markdown Export

3. Markdown导出

Export conversations with local rollout data and timestamps.
Access:
  • Click
    Codex++
    menu → Export conversation
  • Exports current session to timestamped
    .md
    file
导出包含本地发布数据和时间戳的对话。
访问方式:
  • 点击
    Codex++
    菜单 → 导出对话
  • 将当前会话导出为带时间戳的
    .md
    文件

4. Provider Sync

4. 提供商同步

Syncs session metadata when switching model providers to prevent conversation loss.
Enable in settings:
  1. Click
    Codex++
    menu
  2. Open settings panel
  3. Enable "Provider 同步" (Provider Sync)
  4. Restart Codex++
What it syncs:
  • Rollout files
  • SQLite thread records
  • Project path cache
Backup location:
bash
~/.codex/backups_state/provider-sync/
切换模型提供商时同步会话元数据,避免对话丢失。
在设置中启用:
  1. 点击
    Codex++
    菜单
  2. 打开设置面板
  3. 启用“Provider 同步”
  4. 重启Codex++
同步内容:
  • 发布文件
  • SQLite线程记录
  • 项目路径缓存
备份位置:
bash
~/.codex/backups_state/provider-sync/

5. Conversation Timeline

5. 对话时间线

Shows a right-sidebar timeline of user questions with timestamps and summaries.
Usage:
  • Automatically appears in conversation view
  • Hover for message summary
  • Click to jump to message
在右侧边栏显示用户问题的时间线,包含时间戳和摘要。
使用方法:
  • 在对话视图中自动显示
  • 悬停查看消息摘要
  • 点击跳转至对应消息

Configuration

配置

Settings Panel

设置面板

Access via
Codex++
menu in the top menu bar.
Available settings:
  • Enable/disable Provider Sync
  • Configure auto-launch behavior
  • View backend status (green/red indicator)
  • Check version and updates
通过顶部菜单栏的
Codex++
菜单访问。
可用设置:
  • 启用/禁用提供商同步
  • 配置自动启动行为
  • 查看后端状态(绿色/红色指示器)
  • 检查版本和更新

Environment Variables

环境变量

bash
undefined
bash
undefined

Set proxy for GitHub resource loading

Set proxy for GitHub resource loading

export HTTP_PROXY="http://127.0.0.1:7897" export HTTPS_PROXY="http://127.0.0.1:7897"
export HTTP_PROXY="http://127.0.0.1:7897" export HTTPS_PROXY="http://127.0.0.1:7897"

Launch with proxy

Launch with proxy

python -m codex_session_delete launch

On Windows PowerShell:

```powershell
$env:HTTP_PROXY="http://127.0.0.1:7897"
$env:HTTPS_PROXY="http://127.0.0.1:7897"
python -m codex_session_delete launch
python -m codex_session_delete launch

Windows PowerShell下:

```powershell
$env:HTTP_PROXY="http://127.0.0.1:7897"
$env:HTTPS_PROXY="http://127.0.0.1:7897"
python -m codex_session_delete launch

Programmatic Launch

程序化启动

python
from codex_session_delete.launcher import launch_codex_with_cdp
python
from codex_session_delete.launcher import launch_codex_with_cdp

Launch with custom configuration

Launch with custom configuration

launch_codex_with_cdp( app_dir="C:/Program Files/WindowsApps/OpenAI.Codex_1.2024.xxx/app", debug_port=9229, helper_port=57321, user_data_dir=None # Uses default Codex user data )
undefined
launch_codex_with_cdp( app_dir="C:/Program Files/WindowsApps/OpenAI.Codex_1.2024.xxx/app", debug_port=9229, helper_port=57321, user_data_dir=None # Uses default Codex user data )
undefined

Project Structure

项目结构

codex_session_delete/
  cli.py                 # CLI entry point
  launcher.py            # Launch Codex with CDP injection
  cdp.py                 # CDP communication and bridge
  helper_server.py       # Local helper HTTP server
  storage_adapter.py     # SQLite deletion/undo operations
  provider_sync.py       # Provider metadata sync
  settings_store.py      # Settings persistence
  windows_installer.py   # Windows shortcuts and uninstaller
  macos_installer.py     # macOS app bundle generation
  watcher.py             # Windows auto-watcher (optional)
  inject/
    renderer-inject.js   # Frontend injection script
tests/                   # Test suite
codex_session_delete/
  cli.py                 # CLI entry point
  launcher.py            # Launch Codex with CDP injection
  cdp.py                 # CDP communication and bridge
  helper_server.py       # Local helper HTTP server
  storage_adapter.py     # SQLite deletion/undo operations
  provider_sync.py       # Provider metadata sync
  settings_store.py      # Settings persistence
  windows_installer.py   # Windows shortcuts and uninstaller
  macos_installer.py     # macOS app bundle generation
  watcher.py             # Windows auto-watcher (optional)
  inject/
    renderer-inject.js   # Frontend injection script
tests/                   # Test suite

Common Patterns

常见使用场景

Custom Installation Path

自定义安装路径

bash
undefined
bash
undefined

When Codex is installed in non-standard location

When Codex is installed in non-standard location

python -m codex_session_delete launch
--app-dir "/custom/path/to/Codex/app"
undefined
python -m codex_session_delete launch
--app-dir "/custom/path/to/Codex/app"
undefined

Proxy Configuration for GitHub Resources

GitHub资源代理配置

bash
undefined
bash
undefined

Auto-detection (tries common ports: 7890, 7897, 1080, 10809, 10908)

Auto-detection (tries common ports: 7890, 7897, 1080, 10809, 10908)

python -m codex_session_delete launch
python -m codex_session_delete launch

Manual proxy specification

Manual proxy specification

export HTTP_PROXY="http://127.0.0.1:7897" export HTTPS_PROXY="http://127.0.0.1:7897" python -m codex_session_delete launch
undefined
export HTTP_PROXY="http://127.0.0.1:7897" export HTTPS_PROXY="http://127.0.0.1:7897" python -m codex_session_delete launch
undefined

Backup and Recovery

备份与恢复

python
from codex_session_delete.storage_adapter import LocalStorageAdapter

adapter = LocalStorageAdapter()
python
from codex_session_delete.storage_adapter import LocalStorageAdapter

adapter = LocalStorageAdapter()

Delete a session (creates backup)

Delete a session (creates backup)

adapter.delete_session(session_id="abc123")
adapter.delete_session(session_id="abc123")

Undo deletion (restores from backup)

Undo deletion (restores from backup)

adapter.undo_delete(session_id="abc123")
undefined
adapter.undo_delete(session_id="abc123")
undefined

Provider Sync Automation

提供商同步自动化

python
from codex_session_delete.provider_sync import ProviderSync

sync = ProviderSync()
python
from codex_session_delete.provider_sync import ProviderSync

sync = ProviderSync()

Sync before launch

Sync before launch

sync.sync_all_providers()
undefined
sync.sync_all_providers()
undefined

Development

开发

Setup Development Environment

设置开发环境

bash
undefined
bash
undefined

Clone repository

Clone repository

Install with test dependencies

Install with test dependencies

python -m pip install -e .[test]
python -m pip install -e .[test]

Run tests

Run tests

python -m pytest -q
undefined
python -m pytest -q
undefined

Testing CDP Injection

测试CDP注入

python
import asyncio
from codex_session_delete.cdp import CDPClient

async def test_injection():
    client = CDPClient(port=9229)
    await client.connect()
    
    # Inject custom script
    await client.inject_script("console.log('Test injection');")
    
    await client.close()

asyncio.run(test_injection())
python
import asyncio
from codex_session_delete.cdp import CDPClient

async def test_injection():
    client = CDPClient(port=9229)
    await client.connect()
    
    # Inject custom script
    await client.inject_script("console.log('Test injection');")
    
    await client.close()

asyncio.run(test_injection())

Troubleshooting

故障排除

Codex++ Doesn't Launch

Codex++无法启动

Check logs:
bash
undefined
查看日志:
bash
undefined

Windows

Windows

type %USERPROFILE%.codex-session-delete\launcher.log
type %USERPROFILE%.codex-session-delete\launcher.log

macOS/Linux

macOS/Linux

cat ~/.codex-session-delete/launcher.log

**Common issues:**
- Codex App not installed
- Port 9229 already in use
- Python environment not accessible
- Codex path changed after update

**Solution:**

```bash
cat ~/.codex-session-delete/launcher.log

**常见问题:**
- Codex App未安装
- 端口9229已被占用
- 无法访问Python环境
- Codex路径在更新后发生变化

**解决方案:**

```bash

Find Codex installation

Find Codex installation

Windows: typically in %LOCALAPPDATA%\Programs or WindowsApps

Windows: typically in %LOCALAPPDATA%\Programs or WindowsApps

Specify path manually

Specify path manually

python -m codex_session_delete launch --app-dir "path/to/Codex/app"
undefined
python -m codex_session_delete launch --app-dir "path/to/Codex/app"
undefined

Codex++ Menu Not Appearing

Codex++菜单未显示

Verify launch method:
  • Must launch from
    Codex++
    shortcut, not original Codex
  • Check if Codex is running with
    --remote-debugging-port=9229
Check CDP connection:
bash
undefined
验证启动方式:
  • 必须从
    Codex++
    快捷方式启动,而非原始Codex
  • 检查Codex是否以
    --remote-debugging-port=9229
    参数运行
检查CDP连接:
bash
undefined

Should return JSON if CDP is active

Should return JSON if CDP is active

Plugin Loading Failed or GitHub Resource Errors

插件加载失败或GitHub资源错误

Cause: Network cannot reach GitHub directly.
Solutions:
bash
undefined
**原因:**网络无法直接访问GitHub。
解决方案:
bash
undefined

1. Use system proxy (auto-detected)

1. Use system proxy (auto-detected)

python -m codex_session_delete launch
python -m codex_session_delete launch

2. Specify proxy manually

2. Specify proxy manually

export HTTP_PROXY="http://127.0.0.1:7897" export HTTPS_PROXY="http://127.0.0.1:7897" python -m codex_session_delete launch
export HTTP_PROXY="http://127.0.0.1:7897" export HTTPS_PROXY="http://127.0.0.1:7897" python -m codex_session_delete launch

3. Check proxy is running

3. Check proxy is running

Sessions Disappear After Provider Switch

切换提供商后会话消失

Enable Provider Sync:
  1. Click
    Codex++
    menu
  2. Open settings panel
  3. Enable "Provider 同步"
  4. Restart Codex++
Manual sync:
bash
python -m codex_session_delete launch  # Syncs on startup if enabled
启用提供商同步:
  1. 点击
    Codex++
    菜单
  2. 打开设置面板
  3. 启用“Provider 同步”
  4. 重启Codex++
手动同步:
bash
python -m codex_session_delete launch  # Syncs on startup if enabled

Port Already in Use

端口已被占用

bash
undefined
bash
undefined

Use different ports

Use different ports

python -m codex_session_delete launch
--debug-port 9230
--helper-port 57322
python -m codex_session_delete launch
--debug-port 9230
--helper-port 57322

Find what's using port 9229

Find what's using port 9229

Windows

Windows

netstat -ano | findstr :9229
netstat -ano | findstr :9229

macOS/Linux

macOS/Linux

lsof -i :9229
undefined
lsof -i :9229
undefined

Watcher Not Working (Windows)

监控器无法工作(Windows)

Check watcher status:
bash
undefined
检查监控器状态:
bash
undefined

View watcher log

View watcher log

type %USERPROFILE%.codex-session-delete\watcher.log
type %USERPROFILE%.codex-session-delete\watcher.log

Reinstall watcher

Reinstall watcher

python -m codex_session_delete watch-remove python -m codex_session_delete watch-install
undefined
python -m codex_session_delete watch-remove python -m codex_session_delete watch-install
undefined

SQLite Database Locked

SQLite数据库被锁定

Cause: Codex is still running or file is locked.
Solution:
bash
undefined
**原因:**Codex仍在运行或文件被锁定。
解决方案:
bash
undefined

Close Codex completely

Close Codex completely

taskkill /F /IM Codex.exe # Windows killall Codex # macOS
taskkill /F /IM Codex.exe # Windows killall Codex # macOS

Then retry operation

Then retry operation

python -m codex_session_delete launch
undefined
python -m codex_session_delete launch
undefined

Data Locations Reference

数据位置参考

bash
undefined
bash
undefined

Codex main database

Codex main database

~/.codex/state_5.sqlite
~/.codex/state_5.sqlite

Session deletion backups

Session deletion backups

~/.codex-session-delete/backups/
~/.codex-session-delete/backups/

Provider sync backups

Provider sync backups

~/.codex/backups_state/provider-sync/
~/.codex/backups_state/provider-sync/

Launch logs

Launch logs

~/.codex-session-delete/launcher.log
~/.codex-session-delete/launcher.log

Watcher logs (Windows only)

Watcher logs (Windows only)

%USERPROFILE%.codex-session-delete\watcher.log
%USERPROFILE%.codex-session-delete\watcher.log

Settings

Settings

~/.codex-session-delete/settings.json
undefined
~/.codex-session-delete/settings.json
undefined

Security Notes

安全说明

  • Codex++ runs a local HTTP helper server (default port 57321)
  • Only accepts connections from
    localhost
    by default
  • Does not expose delete/undo endpoints to prevent accidental triggers
  • All operations require CDP bridge authentication
  • No modification of original Codex App files
  • Backups are stored locally and not transmitted
  • Codex++运行本地HTTP辅助服务器(默认端口57321)
  • 默认仅接受
    localhost
    的连接
  • 未暴露删除/撤销端点,防止误操作
  • 所有操作需要CDP桥接认证
  • 不修改原始Codex App文件
  • 备份存储在本地,不会被传输