# Install Codex CLI and run it with your ChatGPT plan

> Source: <https://dev.to/dedupedai/install-codex-cli-and-run-it-with-your-chatgpt-plan-4h7h>
> Published: 2026-10-30 19:11:01+00:00

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](https://github.com/openai/codex) 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](https://dedupedai.com/use-cases/openai-codex/install-codex-cli-and-sign-in-with-chatgpt/?utm_source=devto&utm_medium=article&utm_campaign=howto_codexcli).

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
npm install -g @openai/codex

# Homebrew
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](https://dedupedai.com/use-cases/openai-codex/use-codex-in-vs-code-cursor-or-the-desktop-app/?utm_source=devto&utm_medium=article&utm_campaign=howto_codexcli) 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](https://dedupedai.com/use-cases/akitaonrails-ai-memory/hand-off-task-between-claude-code-and-codex/?utm_source=devto&utm_medium=article&utm_campaign=howto_codexcli). 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](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](https://dedupedai.com/join/?utm_source=devto&utm_medium=article&utm_campaign=howto_codexcli)**
