cd /news/ai-agents/install-codex-cli-and-run-it-with-yo… · home › topics › ai-agents › article
[ARTICLE · art-161134] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Install Codex CLI and run it with your ChatGPT plan

OpenAI's Codex CLI, a locally running terminal coding agent, can be installed and authenticated using an existing ChatGPT Plus, Pro, Business, Edu or Enterprise plan rather than paid API tokens, per the project's README. Installation is a single script or package-manager command (npm, Homebrew, or PowerShell on Windows), after which users sign in with ChatGPT and run tasks in their project folder. The README recommends starting with small, verifiable tasks and reviewing every proposed change before accepting it.

by read2 min views1 publishedOct 30, 2026

You already pay for ChatGPT, and paying again for API tokens just to try a terminal coding agent is a hurdle that does not need to exist. Codex CLI is OpenAI's coding agent that runs locally on your computer, and the README says you can sign in with the ChatGPT plan you have. This is the short path from zero to a first task, using the commands from the README. The condensed version lives on the Deduped use-case page.

On macOS or Linux the README quickstart is:

curl -fsSL https://chatgpt.com/codex/install.sh | sh

That pipes a remote script into your shell. If you would rather not, use a package manager instead:

npm install -g @openai/codex

brew install --cask codex

On Windows the README gives a PowerShell installer:

powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

The standalone installers download from releases.openai.com by default and fall back to GitHub Releases. To force GitHub Releases, set CODEX_INSTALLER_USE_RELEASES_OPENAI_COM to false:

curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_INSTALLER_USE_RELEASES_OPENAI_COM=false sh

You can also download a binary from the latest GitHub Release. Pick codex-aarch64-apple-darwin.tar.gz for Apple Silicon, codex-x86_64-apple-darwin.tar.gz for older Macs, or the unknown-linux-musl archive for Linux. Each archive holds one file with the platform in its name, so rename it to codex after extracting.

Go to your project folder and run:

cd ~/projects/myapp
codex

Choose Sign in with ChatGPT. The README recommends this route so usage counts against your Plus, Pro, Business, Edu or Enterprise plan. An API key also works, but it needs the extra setup in the Codex auth docs, so skip it unless you have a reason.

Do not start with a big refactor. Ask for something you can verify in a minute:

Then read every change it proposes before accepting it. Treat the first session as calibration: how much does it get right on your codebase, and how much does it need steering.

If you live in an editor, the README points to an IDE install for VS Code, Cursor and Windsurf, and there is a codex app command for the desktop app. There is also the cloud agent, Codex Web, at chatgpt.com/codex. The Deduped page on using Codex in VS Code, Cursor or the desktop app covers that route.

Many people run Codex next to Claude Code. If you want to move a half-finished task from one to the other, see handing off a task between Claude Code and Codex. It is a useful pattern once you hit a usage limit on one of them.

That is the whole setup: one install command, one sign-in, one folder. The rest is learning what to delegate.

Want the setup commands for 50 AI repos people actually ship with? Get the free AI Repos That Actually Ship pack: https://dedupedai.com/ship-pack/?utm_source=devto&utm_medium=article&utm_campaign=shippack

Get one email every Monday with the week's hottest AI repos and exactly how to use them: subscribe free at dedupedai.com

── more in #ai-agents 4 stories · sorted by recency
── more on @openai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/install-codex-cli-an…] indexed:0 read:2min 2026-10-30 · —