codex-remote is a small monorepo for using Codex from a phone through a mobile-friendly web UI and a local gateway process.
It is aimed at two audiences:
- contributors who need to run and develop the repo locally
- end users who want to start a session on their machine and continue from a phone on the same network
apps/mobile-web: React 19 + TanStack Start mobile web UIapps/codex-gateway: Node HTTP gateway for auth, project discovery, session state, approvals, diffs, and terminal proxyingpackages/shared-types: shared TypeScript contracts used by both apps
Install dependencies:
npm installStart the gateway:
npm run dev --workspace @codex-remote/gatewayStart the mobile web app:
npm run dev --workspace @codex-remote/mobile-webThen open the frontend in a browser:
- local machine:
http://127.0.0.1:3000 - phone on the same LAN:
http://<your-machine-ip>:3000
The mobile app talks to the gateway after login. By default:
- mobile web runs on port
3000 - gateway runs on port
3101 - project discovery uses
~/ProjectunlessCODEX_REMOTE_PROJECT_ROOTis set
- Run both the gateway and the mobile web app on the machine where you use Codex.
- Open
http://<your-machine-ip>:3000on your phone. - Enter the shared password generated by the gateway.
- Pick a project under the configured project root.
- Create a new session or resume an existing one.
- Use the UI to send prompts, review diffs, respond to approvals, and open the terminal fallback when needed.
Notes:
- your phone must be able to reach the machine over the local network
- the gateway binds to
127.0.0.1and detected private LAN IPv4 addresses by default - the gateway creates the shared password automatically and stores it under
.omx/state/; it also logs a password hint on startup
Repo-wide commands:
npm run build
npm run test
npm run lintWorkspace commands:
npm run dev --workspace @codex-remote/gateway
npm run dev --workspace @codex-remote/mobile-web
npm run preview --workspace @codex-remote/mobile-web
npm run test --workspace @codex-remote/gateway
npm run test --workspace @codex-remote/mobile-webThe current codebase supports these main gateway settings:
CODEX_REMOTE_PROJECT_ROOT: override the default project directory rootCODEX_REMOTE_BIND_HOST: bind the gateway to a specific RFC1918 IPv4 address or127.0.0.1CODEX_REMOTE_GATEWAY_PORT: override the gateway port, default3101CODEX_REMOTE_APP_SERVER_PORT: override the internal Codex app server port, default3210VITE_GATEWAY_URL: optional frontend override for the gateway originVITE_GATEWAY_PORT: optional frontend default port override
The runtime flow is straightforward:
apps/mobile-webrenders the phone-friendly UI and sends HTTP requests to the gateway.apps/codex-gatewayauthenticates requests, lists projects, creates or resumes sessions, streams events, and handles approvals and terminal traffic.packages/shared-typeskeeps request and session contracts aligned between the frontend and gateway.
This repository currently has an app-level scaffold README under apps/mobile-web/README.md. The root README is intended to be the main entry point for understanding and running the full project.