I am trying to use codex cli in replit’s shell. I ran `npm install -g @openai/codex` but no luck in login. i get a local host error.
has anyone had anyone luck?
I am trying to use codex cli in replit’s shell. I ran `npm install -g @openai/codex` but no luck in login. i get a local host error.
has anyone had anyone luck?
interesting… lets see if someone else has been doing that
I’ve been using codex to get a fresh approach if I’m stuck with a problem. I haven’t used codex with subscription plan but api key option works.
First add env var OPENAI_API_KEY and start new shell and run codex
Choose option 2 to use your own api key, it will confirm to use the api key.
After that choose if you want codex to do changes automatically or require approving.
Then the interactive shell starts:
Thanks for this. Will try it out.
In the meantime, I got qwen got working.
USE CLAUDE Code directly in shell ? basically same orchestrator is available like replit with plan and execute mode from claude code itself
Using coding agents is bit different. It has support for MCP and I can do some tasks using these coding agents without spending from the replit’s credit.
Yeah, I figured it out. If you are wanting to use your ChatGPT subscription then do this. When you get to the local host error page copy the URL then go back into the Replit Shell and do Control Z, then type bg (enter), then curl “paste URL here”. That will get you up and running.
If you are using Replit github tool, you can also connect with Codex through Github, if you don’t want to use the CLI interface.
Piggybacking off of what spookyhorse said, here are the steps if you are looking to use it with your chatgpt subscription - they are as follows:
go to shell → npm install codex (npm install -g @openai/codex) in shell, type codex. Enter on sign in with chatgpt, go through all of the sign in steps until you get the failed local host. Keep that shell open, open another shell - type URL=’thelocalhosturlfromtheerrorpage’, enter, then curl -i “$URL”, enter. then type codex and you should be logged in