Skip to content

Latest commit

 

History

History
155 lines (97 loc) · 10.6 KB

README.en.md

File metadata and controls

155 lines (97 loc) · 10.6 KB
Codex2Web connects the Windows Codex app to browsers on other devices

Keep using your desktop Codex from a browser.

简体中文 · English

Quick start · Comparison · Compatibility

What is Codex2Web?

Codex2Web is a lightweight local web gateway for the Codex desktop app installed on Windows. Open existing chats and follow task progress from a phone, tablet, or another computer.

Tasks keep running on the host PC. You reuse the app's sign-in, projects, and chats. The browser loads official interface resources instead of continuously streaming your entire desktop.

  • No second runtime copy: reuse the installed app without extracting another official runtime or modifying the installation.
  • One launcher: double-click the script, then connect the app, set an access password, and stop the gateway from the web page.
  • A browser on other devices: connect on the same network, or use your own VPN remotely.

The Windows Codex desktop app is required. Codex2Web does not include Codex itself. This is an early release; complex desktop features still need individual verification.

Who is it for?

Windows Codex users who want to follow tasks and access existing projects and chats from an Android phone, tablet, or another PC, particularly without creating another copy of the official runtime.

The host PC, Codex app, and gateway must stay running. Windows is the supported host platform. No cloud hosting or public relay service is included.

Quick start

1. Prepare the host PC

Requirement Details
Windows 11 The platform tested so far
Codex desktop app Installed, with its existing sign-in / model configuration ready
Node.js Version 22 or later; 24 recommended

No separate Codex CLI installation and no npm install are needed. The gateway has no third-party npm dependencies.

2. Open the launch center

Choose Code → Download ZIP, extract the repository to a normal folder, and double-click:

启动 Codex2Web.cmd

The launch center opens at http://127.0.0.1:4237 by default. The launcher and management UI currently use Chinese labels.

3. Connect according to the displayed state

App state What to do
App is not running Click 启动并连接 (Start and connect); the gateway opens your installed app
App is running without the web connection enabled Wait for tasks to finish, save your work, and fully quit the app. Keep the web page open, then click 启动并连接
App is connected Click 打开工作区 (Open workspace) to open a new tab, then choose an existing chat; the launch center stays open

The first connection may require restarting the app because its web connection must be enabled at launch. The gateway never forces it to quit.

Use the top-right controls to switch 简体中文 / English, light / dark / system appearance, and theme color. The first visit uses English unless the browser reports Simplified Chinese. Each browser remembers its own choices.

Later, reopening the gateway is enough while the app's interface remains enabled. Use the launch center to manage the password and device access. Clicking 停止网关 (Stop gateway) leaves app tasks running.

4. Connect another device

Access is local-only by default. To connect a phone, tablet, or another PC:

  1. On the host PC, find 其他设备访问 (Other device access) in the launch center and set a password of at least 10 characters.
  2. Check the network-access authorization, then click 设置密码并开启 (Set password and enable). With an existing password, leave the field empty and click 开启设备访问.
  3. On the same network, choose a displayed Wi-Fi / Ethernet address. When elsewhere, connect both devices to your VPN and choose the VPN address.
  4. Open that address in the other device's browser and enter the password. Do not use that device's own 127.0.0.1.

Addresses update automatically, including 100.* VPN addresses and usable IPv6 addresses; connecting a VPN later requires no gateway restart. The password and sharing state are saved. Click 关闭设备访问 (Disable device access) to stop sharing. To change the password, disable sharing, enter a new password, and authorize access again.

Remote speed depends on the host upload and VPN path. The official Codex UI stays unchanged.

If access fails, check both devices' network / VPN and the host firewall; the project does not change firewall rules. If the gateway disconnects, reopen the launcher on the host and click 重新检测 (Check again). See 连接与诊断 (Connection diagnostics) for further clues.

Do not expose the gateway or the app's debugging port directly to the public internet. The gateway uses HTTP by default; remote access should use a trusted VPN. Reverse proxies require additional authentication design; there is no one-click proxy setup.

Project comparison

The projects below are 0xcaff/codex-web and RyensX/OpenCodex. This compares their documented approaches, not performance benchmarks.

Dimension Codex2Web codex-web OpenCodex
Backend The locally running desktop app An Electron-like environment with a CLI / app-server backend A separately launched hidden official runtime
Official resources Read from the installed app; no full runtime copy Download a selected version, unpack it, and apply patches Extract local app resources into an adapted runtime cache
Upstream updates Rediscover local resources on reconnect; API changes may need maintenance Port patches and rebuild Scan and rebuild the cache; adaptation rules may need maintenance
Entry point One CMD file and web management Command-line / Nix workflows Graphical launcher and command line
Best fit Windows users accessing their existing app with fewer extra copies CLI users with centralized deployments Users looking for more web enhancements

Sources: codex-web architecture, upgrade process, and OpenCodex runtime design.

Codex2Web prioritizes fewer dependencies, fewer copies, and a direct connection to the existing app. “Lightweight” describes the gateway's own code and runtime files: the original app and Node.js are still required, and browser caches, uploads, and the running gateway still use resources. No unmeasured speed or memory advantage is claimed.

How it works and compatibility

The gateway reads official interface resources from the local app, forwards browser actions through a local connection, and relays app messages back to the browser. It neither starts a second official backend nor modifies the installation.

Following interface updates is not the same as automatic feature compatibility. Styling and wording changes usually need no gateway changes; internal APIs, messages, and desktop-only capabilities may need adapter updates.

Current validation and limits
  • Tested on Windows 11 with Codex App 26.1027.51404: interface loading, projects / existing chats, live progress, and page reload.
  • Checked opening and closing model, reasoning, permission, attachment-entry, chat-action, and top-bar menus. This does not verify every menu action's submitted result.
  • Automated tests also cover messages, App Host / Git ports, authentication, and launcher lifecycle.
  • Native file dialogs, complex previews, picture-in-picture, browser tools, and document / spreadsheet / presentation features have not received complete validation.
  • An app renderer reload without a debugging-connection disconnect may require restarting the gateway.

See compatibility notes for technical details (Chinese).

Files and cache cleanup

The launch center's 文件与缓存 (Files and cache) shows locations, sizes, and buttons to copy paths. The runtime directory defaults to .codex2web/ inside the repository; the page shows the host's actual paths.

Content Location and purpose
Official interface resources Read from the installed Codex app.asar; no full runtime copy
Access settings settings.json: sharing settings and password hash, never the plaintext password
Runtime information and logs gateway.json, gateway.log, stdout.log, etc.: gateway state and connection records
Browser uploads attachments/: files that chats may still be using
Gateway resource cache Host memory; released when the gateway stops, not written to disk
Browser download cache Managed by the current device's browser; web pages cannot read its exact directory or size

Click 清理缓存 (Clear cache) to release gateway resource cache. You can also request that the current browser clear this site's download cache, if supported. Access settings, uploads, and original Codex files are preserved. Clear other devices' browser caches in their respective browsers; resources are cached again as needed.

Keep runtime directories, logs, and attachments private. The original sign-in and chat history remain managed by the Codex app; the gateway does not save another copy.

Development and feedback

The repository does not include official app packages, your sign-in details, or chat history.

git clone https://github.com/singularity2000/Codex2Web.git
cd Codex2Web
npm test
npm run doctor

npm run test:browser validates the bridge with an installed browser. npm run test:windows requires Windows and an installed app to validate launcher lifecycle. Both use isolated directories and debugging ports. See the architecture notes for development details (Chinese).

Report issues with your OS, Node.js, and app versions, reproduction steps, and redacted errors on Issues.

License

The gateway, launcher, and adapters are licensed under AGPL-3.0-only. Modified versions provided as network services must make the corresponding source available as required by the license.

This is an independent community project, not affiliated with OpenAI. The official app and interface resources are not redistributed here and remain the property of their respective rights holders. See NOTICE.