Using Codex CLI remotely using your mobile device

I don’t know about you but I :heart: the basic simplicity of Codex via the CLI.

During the recent 5.4 Open AI announcement, this request came up.

Now, this is not perfect, but goes a long way to meeting this requirement already:

Prerequisites

  • An OpenAI ChatGPT or platform (API) account.
  • An account on a solid cloud VPS provider (e.g. Scaleway, Digitial Ocean, AWS)
  • A good mobile device, but preferably either:
    • an iPad mini
    • a large Phablet like an Android Pixel 10 Plus or equivalent
  • stable mobile/wifi connection
  • A good terminal client app installed, e.g. Blink on iOS or Terminus on Android

Steps

  1. Spin up a small Ubuntu VPS on your provider - one with 1GB will do, but you might need at least 1GB of SWAP too - depends what you are doing.
  2. Add your VPS to your client - preferably connecting via SSH using a public/private key pair you’ve already deployed
  3. Connect
  4. Create a project directory as required, navigate there.
  5. Install codex like you would anywhere on linux (npm install -g @openai/codex)
  6. Launch codex as usual, authenticate as usual[1]
  7. Profit! :rocket:
  • it’s even possible to use device dictation features - but your mileage may vary :sweat_smile:

  1. might be easier to connect to the same VPS from desktop first of all and set this all up there first. ↩︎

That’s on my wishlist too​:raising_hands:

yess!! i use termius but i can say that the claude app for ios is superior, i like termius dont get me wrong but a good ui would go a long way. also the aesthetic of the codex app would fit nicely on an iphone

I’m running VSCode and a code-server project on a Raspberry Pi. The latter ensures that I can access VSCode from a browser, even from my phone. This allows me to control Codex in a way that is convenient for me. A VPN server (+ nip.io) is running on my home router, so I can access the system securely.

Wow, a whole IDE on your phone.

Yes I’ve run IDE’s via cloud on iPad in the past but the CLI is conversation based so imho a little more suited to the small form factor? It doesn’t need to render the shell of an IDE so things are naturally less cluttered. But seems like you’ve got it working for you, great!

Yes, working, I like it. :smiling_face::ok_hand:

damn bro a whole ide, you are in heaven.

im vibing with termius but i know the guys at openai are cooking, also good opensource proyects aim to solve this

That’s cool! Feel free to write up a post in Community with a project tag. I’m sure many would love to know more details. Good to have you here with us!

how none of you see that : htxps://libraries.io/npm/@mmmbuto%2Fcodex-cli-termux

Termux is just one of these, right?

Why do I need another package?

I understand we’re still trying to get a Codex-like experience on mobile. But what’s the comparison between the Claude iOS app and Terminus? Does that mean you can use Claude code on Claude’s iOS app? How does that relate to being able to use Codex on mobile? New Codex user here

Codex Cloud in ChatGPT mobile app (using ChatGPT iOS) is pretty much all you need to keep building on the go. Task → Changes → Push → Merge. I have Github on the phone as well. With that you can work on your website nonstop. You cannot manually edit, but when you’re moving even with a computer you can’t do much of that either.

Yes I have used this but I prefer to be more hands on with the CLI and manage things at a more granular and interactive level.

A lot less fiddly though, granted, but I find I need to be a little more involved for now.

That’s true! Hands-on editing is a must when things get serious. But you know, pure vibe coding is such a delight :rofl:. I also think OpenAI will provide the ability to manually edit Codex Cloud’s outputs in ChatGPT instead of only asking for changes. Should be soon.

That’s an interesting work around, but believe in the force. While claude is first, the winner isn’t decided and finishing line ; miles to go.

VS Code SSH and tunneling work great on any laptop with internet and a browser, but they’re still not very mobile-friendly.

Sometimes you just need to quickly steer an ongoing Codex thread, unblock an agent, or provide input while you’re away from your desk. It would also be useful to get mobile notifications when an agent is blocked and needs your attention.

That’s why I’m building CodePilot Mobile — a mobile app designed to help you get more value out of Codex.

With CodePilot Mobile, you’ll be able to:

  • Resume Codex threads from a user-friendly mobile interface

  • Create new threads on the go

  • Get thread status updates through mobile notifications

  • Know when a thread needs your input

  • Automatically resume work when credits are restored, especially useful on lower-tier subscriptions

  • Make the most of your Codex usage without staying glued to your laptop

Here are a few sneak peeks of the work in progress.

Drop your most wanted features in comments and do a thumbs up if you like the idea and would love to use it.

CodePilot Application view on an existing codex thread. This view is currently being service from a cloud hosted backend service, linked to a service running locally on my ubuntu machine.

This looks like a great solution for developers, who want to code on the go.
Automatic resume and know when a thread needs your input really hit the pain-points of codex.

Keep posting progress updates.:raising_hands:

Looks great!

A couple of key concerns though:

  • Is this a separate coding harness and if not how are you proposing to integrate it so that releases of codex are seamless?
  • If it is separate how do you deal with increased costs of API per token billing? I built my own coding agent but, correct me if I’m wrong, ChatGPT auth is not permitted on third party products? It would be a terms of use breach?

This is a big deal and has a significant effect on whether third party solutions are viable and useful.

This is built on the SDK provided and maintained by OpenAI, which means future Codex releases should work seamlessly.

The user account handles Codex credits and billing; my application simply relays the conversation to a cloud-based backend. It works much like talking to the Codex CLI through a pseudo-terminal, but operated remotely.

If you’re interested, you can email me at [email redacted]. I can send you a service to run on your PC, along with account credentials to access my cloud service. I also plan to turn this into a mobile application.

I’ll keep posting updates here as I continue building. Thank you for your interest and encouragement.

The Agents SDK?

That doesn’t solve the issue?

There’s no ChatGPT account authentication?