Skip to main content

Open Codex UI

Open Codex UI

A remote-friendly web workspace for continuing Codex sessions from desktop and mobile browsers.

[!IMPORTANT] Non-commercial use only. This project is provided solely for learning, research, personal use, and other non-commercial purposes. Commercial use requires prior written permission from the copyright holder.

Preview

Open Codex UI desktop workspace

Open Codex UI mobile chat    Open Codex UI mobile project drawer

Quick Start

Run the packaged application through Node.js:

npx open-codex-ui

The npm launcher reuses an existing uvx, or installs uv from Astral's official installer into its own cache. You can also run the Python package directly with uv:

uvx open-codex-ui

Open http://127.0.0.1:13140. The wheel already contains the compiled frontend. To accept connections from other devices, bind explicitly to the network:

uvx open-codex-ui serve --host 0.0.0.0 --port 13140

Codex WebSocket subscriptions use turn, item, and streaming-text deltas, latest-state coalescing, and negotiated gzip binary frames for larger messages. Clients that do not request gzip continue to receive regular JSON frames.

Background Service

Install the command persistently and register login startup:

npx open-codex-ui daemon install
# or
uvx open-codex-ui daemon install

This installs open-codex-ui into uv's user bin directory and uses the native service manager for the current platform:

Platform Service
macOS LaunchAgent in ~/Library/LaunchAgents
Linux systemd --user service
Windows Current-user Task Scheduler task

After opening a new shell, manage the service directly:

open-codex-ui daemon status
open-codex-ui daemon stop
open-codex-ui daemon start
open-codex-ui daemon uninstall

The service starts when the user logs in. Runtime state, retained environment, and logs live under ~/.yier/web/. Run daemon install again to update its host, port, or captured environment; use update for application versions.

Cloudflare Tunnel

Start Open Codex UI first, then expose the default local address with an ephemeral Quick Tunnel:

open-codex-ui tunnel start
open-codex-ui tunnel status
open-codex-ui tunnel stop

For a tunnel already configured in the Cloudflare dashboard, provide an API token that can read the account's tunnel configuration and connector token:

export CF_TOKEN='your-cloudflare-api-token'
open-codex-ui tunnel start --mode managed-remote --name my-tunnel

The named-tunnel flow discovers its public hostname and local origin from Cloudflare. Set CF_ACCOUNT_ID or pass --account-id when account discovery is unavailable. You can bypass the API with an existing connector token file:

open-codex-ui tunnel start --mode managed-remote \
  --token-file ~/.cloudflared/my-tunnel.token \
  --hostname codex.example.com

Locally managed cloudflared configurations are also supported:

open-codex-ui tunnel start --mode managed-local
open-codex-ui tunnel start --mode managed-local --config ~/.cloudflared/config.yml

Tunnel state and logs are stored under ~/.yier/web/. API and connector tokens are never persisted there or included in the cloudflared command line. Tunnel processes are independent from the login service, and tunnel stop only stops the cloudflared process started by Open Codex UI.

[!WARNING] A tunnel exposes Open Codex UI to the public Internet. Configure application authentication or Cloudflare Access before sharing the public URL.

Updating

Update a persistent installation to the latest stable release:

open-codex-ui update
# or
npx open-codex-ui update

If the login service is running, it is restarted after the update. Plain uvx and npx runs resolve their release when launched, so the command makes no persistent changes when no uv tool installation exists.

Authentication

Authentication is disabled unless a password variable is configured:

export YIER_AUTH_PASSWORD='change-this-password'
uvx open-codex-ui daemon install --host 0.0.0.0

For a hashed password:

uv run --with open-codex-ui python -c "from yier_web.auth import hash_password; print(hash_password('change-this-password'))"
export YIER_AUTH_PASSWORD_HASH='paste-generated-hash-here'
Variable Purpose
YIER_AUTH_PASSWORD Plain login password
YIER_AUTH_PASSWORD_HASH Hashed login password
YIER_AUTH_SECRET Additional session-cookie signing secret
YIER_AUTH_SESSION_TTL_HOURS Session lifetime; defaults to 168 hours
YIER_CODEX_EMBED_TOKEN Token for unauthenticated iframe access

daemon install retains HOME, PATH, CODEX_HOME, and current YIER_* variables in a user-only environment file so they remain available after login.

Voice Input

The Codex composer can stream microphone audio to a local sherpa-onnx transducer model. The default model directory is ~/.yier/models/sherpa-onnx. A bilingual Chinese-English streaming Zipformer can be installed with:

open-codex-ui speech install

The installer supports interrupted-download resumption, verifies the archive, extracts it safely, and atomically activates the model. Standard HTTPS_PROXY and ALL_PROXY environment variables are honored:

HTTPS_PROXY=http://127.0.0.1:7890 open-codex-ui speech install
open-codex-ui speech status
open-codex-ui speech install --force
open-codex-ui speech remove

The model is stored outside the Python environment, so it remains available after uv tool upgrades or reinstalls. The directory must contain tokens.txt, encoder*.onnx, decoder*.onnx, and joiner*.onnx.

Override the runtime configuration when needed:

Variable Purpose
YIER_SHERPA_ONNX_MODEL_DIR Streaming transducer model directory
YIER_SHERPA_ONNX_PROVIDER sherpa-onnx execution provider; default cpu
YIER_SHERPA_ONNX_NUM_THREADS Decoder threads; default 2

Remote mobile browsers require HTTPS for microphone permission. Localhost is also treated as a secure context by modern browsers.

Development

Source development requires Python 3.12+, Node.js 20+, uv, and pnpm:

uv sync
pnpm --dir web install

Start the frontend and backend in separate terminals:

pnpm --dir web dev
uv run python main.py --debug --reload --host 127.0.0.1 --port 13140

The application remains at http://127.0.0.1:13140; the backend proxies frontend traffic to the Vite server on port 5173.

Command Purpose
pnpm --dir web dev Start Vite
uv run python main.py --debug --reload Start the development backend
pnpm --dir web build Type-check and build frontend assets into yier_web/static
uv run open-codex-ui Run the source checkout in production mode
uv run pytest Run backend tests
uv run python -m compileall yier_web Check Python compilation
pnpm --dir web test:unit Run frontend unit tests
pnpm --dir web type-check Run frontend type checking

To test the production build from source:

pnpm --dir web build
uv run open-codex-ui

Codex integration is provided by the published open-codex-bridge package.

Iframe Embedding

See IFRAME.md for iframe authentication, setup, and the postMessage API.

License

Copyright 2026 Sube (zhangluguang). Licensed under the PolyForm Noncommercial License 1.0.0. Commercial use is not permitted without separate written authorization from the copyright holder.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_codex_ui-0.1.14.tar.gz (908.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_codex_ui-0.1.14-py3-none-any.whl (892.3 kB view details)

Uploaded Python 3

File details

Details for the file open_codex_ui-0.1.14.tar.gz.

File metadata

  • Download URL: open_codex_ui-0.1.14.tar.gz
  • Upload date:
  • Size: 908.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for open_codex_ui-0.1.14.tar.gz
Algorithm Hash digest
SHA256 35314690efe5f7dfb39e4ec9ac44f91f1bf32ac4156e7ddea2531d7effe69012
MD5 374aaace42ef25df9f0aeb46900c5df5
BLAKE2b-256 86603f2fa2018a83724385f5cab86272bf08e53bbb4547f2af0eca357031133f

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_codex_ui-0.1.14.tar.gz:

Publisher: publish.yml on Sube-py/open-codex-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file open_codex_ui-0.1.14-py3-none-any.whl.

File metadata

  • Download URL: open_codex_ui-0.1.14-py3-none-any.whl
  • Upload date:
  • Size: 892.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for open_codex_ui-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 101a78c1ce5c19ae86da4cae08e57c2d5cdd2dbcb809fd812ed1898ea2aa0b53
MD5 77c2a93986a9648a0ca51369e7402395
BLAKE2b-256 1c83550c924f3c59f6a0b701f58f2686ce3a788dacd3f6f98b28530b7ec7ab42

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_codex_ui-0.1.14-py3-none-any.whl:

Publisher: publish.yml on Sube-py/open-codex-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.20

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

This release

0.1.14 This release

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.4

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page