How to Run Codex in a Terminal from Your Phone

2 hours ago 2

I love Codex CLI. Recently, I wondered if I could run it from my phone. There is ChatGPT iOS Codex, but that comes with limitations. If I run Codex CLI in a terminal from my phone, I can do anything. For example, I built the initial version of this repo entirely from my phone in the terminal with Codex. I asked Codex to create the markdown file and add the steps, then I described the steps as you'll see below. I also recorded this Codex prompt so you can watch it. I SFTPed it from my phone to the Codex terminal and then asked Codex to speed up the recording 6×. Finally, I pushed it up so you could see the demo below!

Codex Terminal Phone workflow demo (6× speed)

  1. Launch a free GCP e2-micro Compute Engine VM and grab its external IP.

    Creating an e2-micro VM in GCP

  2. Install Termius on iOS and sign in with your Termius account.

  3. Generate an SSH key pair in Termius (Keychain → + → New Key → ED25519) to create an ssh-ed25519 key, then copy the public key.

  4. In the Google Cloud console, open your VM, click Edit, add the Termius public key under SSH Keys, and save.

  5. Add the VM as a host in Termius, reuse the username from your key, paste the external IP, and attach the saved key.

    Configuring the VM host in Termius

  6. Open the new host in Termius to SSH into the GCP instance.

  7. Inside the VM, download and install the Codex CLI.

  8. Happy coding!

Follow me on Twitter @josh_bickett. If you wish this was easier, please DM me on Twitter and tell me. This will motivate me to make it better :)

Read Entire Article