Fork of the original Remodex project by Emanuele Di Pietro. Thanks for open sourcing your work!
Control Codex from your iPhone while keeping the actual runtime on your Mac.
iCodex is local-first:
- the iPhone is a remote client
- the bridge runs on your Mac
- Codex runs on your Mac
- git and workspace actions run on your Mac
- the relay is only transport
This fork does not ship with:
- a built-in hosted relay
- an App Store paywall flow
- npm-published bridge install assumptions
The supported paths are:
- use the managed local relay on your Mac with
icodex upon macOS - self-host a relay yourself
- expose that relay over Tailscale or another private network
iCodex iPhone app <-> relay <-> iCodex bridge on Mac <-> codex app-server
The bridge is the important integration layer. It:
- owns secure QR pairing and trusted reconnect
- forwards JSON-RPC to
codex app-server - handles local git/workspace actions
- keeps thread/session state on your Mac
phodex-bridge/ Node bridge and CLI
CodexMobile/ iOS app source
relay/ Self-hostable relay and optional push service
- Node.js 18+
- Codex CLI installed and working on your Mac
- Xcode 16+ if you are building the iPhone app from source
- a relay path, either the managed local relay on macOS or your own self-hosted relay
Build the app from source in Xcode and install your own signed build on device.
The app is now branded as iCodex and the in-app purchase gate has been removed for this fork.
Install the bridge CLI from source:
cd phodex-bridge
npm install
npm linkThat gives you the icodex command locally on your Mac, so you can use icodex up the same way the old project used remodex up.
If you do not want to link the CLI globally, you can still run the source entrypoint directly:
cd phodex-bridge
npm install
node ./bin/icodex.js upIf you do not set ICODEX_RELAY, icodex up on macOS now starts a managed local relay and the bridge service together. The service keeps running after you close the terminal.
icodex upUseful follow-up commands:
icodex status
icodex stopBy default the managed local relay listens on 0.0.0.0:9000 and advertises a LAN relay URL like ws://<your-mac>.local:9000/relay in the QR code. If a Tailscale address is available, the QR also includes a Tailscale relay candidate so the phone can fall back to that path away from your LAN.
Optional overrides:
ICODEX_LOCAL_RELAY_HOSTNAME="192.168.1.10" icodex up
ICODEX_LOCAL_RELAY_BIND_HOST="127.0.0.1" ICODEX_LOCAL_RELAY_PORT="9100" icodex up
ICODEX_LOCAL_RELAY_TAILSCALE_HOST="100.x.y.z" icodex upIf you do not want the managed local relay to advertise a Tailscale candidate, set ICODEX_LOCAL_RELAY_INCLUDE_TAILSCALE=false.
To point the bridge at an explicit relay URL instead, set ICODEX_RELAY:
ICODEX_RELAY="ws://127.0.0.1:9000/relay" icodex upREMODEX_RELAY is still accepted as a compatibility fallback, but new docs and scripts should use ICODEX_RELAY.
If you did not run npm link, use:
cd phodex-bridge
node ./bin/icodex.js upOn macOS, icodex up installs or refreshes the background bridge service and prints the QR pairing code. On other platforms, icodex up still runs in the foreground and expects an explicit relay URL.
Run the relay yourself. For a local relay:
cd relay
npm install
npm startBy default the relay listens on port 9000.
Health check:
curl http://127.0.0.1:9000/healthExpected response:
{"ok":true}For regular iPhone use, prefer a Tailscale-reachable relay instead of plain LAN-only routing.
A typical setup is:
- run the relay on a Mac, mini server, or VPS you control
- put that machine on Tailscale
- set
ICODEX_RELAYto the relay'sws://orwss://URL - pair once by scanning the QR
- let trusted reconnect reuse that same relay later
- Run
cd phodex-bridge && npm install && npm link. - On macOS, run
icodex up. - Open the iPhone app.
- Scan the QR.
- Close the terminal if you want; the managed macOS service keeps running in the background.
For a Tailscale or other self-hosted relay, set ICODEX_RELAY="..." before icodex up.
- There is no bundled production relay in this fork.
- There is no supported global published-package install flow anymore.
- Source installs support
npm linkso you can useicodex updirectly. - On macOS,
icodex updefaults to a managed local relay whenICODEX_RELAYis unset. - The canonical local bridge state now lives under
~/.icodex. - Desktop refresh remains opt-in.