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.