# AI use cases for Codex (openai/codex)

Repo: [openai/codex](https://github.com/openai/codex) | Use cases: 3 | Page: https://dedupedai.com/use-cases/openai-codex/

Codex CLI is OpenAI's coding agent that runs locally on your computer. You install it with a script, npm or Homebrew, run `codex` in a project, and sign in with your ChatGPT plan or an API key. It also ships as an IDE extension and a desktop app started with `codex app`.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Install Codex CLI and run it on your repo with your ChatGPT plan: https://dedupedai.com/use-cases/openai-codex/install-codex-cli-and-sign-in-with-chatgpt/
- Install Codex CLI on Windows with one PowerShell line: https://dedupedai.com/use-cases/openai-codex/install-codex-on-windows-with-powershell/
- Use Codex inside VS Code, Cursor or the desktop app: https://dedupedai.com/use-cases/openai-codex/use-codex-in-vs-code-cursor-or-the-desktop-app/

## How to install Codex CLI and run it on your repo with your ChatGPT plan with Codex

Repo: [openai/codex](https://github.com/openai/codex) | Difficulty: Beginner | Time: 10 minutes | Basis: From the README

Install the Codex CLI, sign in with the ChatGPT plan you already pay for, and start it inside a project.

**Who it is for:** A developer with a ChatGPT subscription who wants a terminal coding agent without setting up API billing.

**The problem:** Paying separately for API tokens to try a coding agent is a hurdle when you already have a ChatGPT plan.

**The outcome:** Codex running in your project folder, signed in with ChatGPT, ready to take a task.

### Steps

1. On macOS or Linux run `curl -fsSL https://chatgpt.com/codex/install.sh | sh`
2. Or install with npm: `npm install -g @openai/codex`, or with Homebrew: `brew install --cask codex`
3. cd into your project and run `codex`
4. Choose Sign in with ChatGPT so usage counts against your Plus, Pro, Business, Edu or Enterprise plan
5. Give it a first task, such as explaining the repo layout or fixing one failing test, and review every change it proposes

### Prompt to paste into your agent

```text
Install openai/codex with `npm install -g @openai/codex`, run `codex` in <project folder>, sign in with ChatGPT, then ask it to <task>. Show me the diff before anything is committed.
```

### Caveat

Using an API key instead of a ChatGPT plan needs the additional setup in the Codex auth docs.

Risk, remote script: The quickstart pipes install.sh into your shell; use the npm or Homebrew install if you would rather not run a remote script.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/openai-codex/install-codex-cli-and-sign-in-with-chatgpt/

## How to install Codex CLI on Windows with one PowerShell line with Codex

Repo: [openai/codex](https://github.com/openai/codex) | Difficulty: Beginner | Time: 10 minutes | Basis: From the README

Use the official PowerShell installer to get Codex on a Windows machine and start it in a project.

**Who it is for:** A Windows developer who wants the same terminal coding agent their Mac teammates use.

**The problem:** Most agent quickstarts assume macOS or Linux, which leaves Windows users guessing.

**The outcome:** Codex installed on Windows from the official installer and running in your repo.

### Steps

1. Open PowerShell and run `powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"`
2. If your network blocks releases.openai.com, set `$env:CODEX_INSTALLER_USE_RELEASES_OPENAI_COM='false'` first so the installer uses GitHub Releases
3. Open your project folder and run `codex`
4. Sign in with ChatGPT, or follow the API key setup in the docs

### Prompt to paste into your agent

```text
Install openai/codex on this Windows machine with the official PowerShell installer from the README, confirm `codex` starts in <project folder>, and tell me which sign-in option it offers.
```

### Caveat



Risk, remote script: The installer is fetched with irm and run with iex, which executes a remote script; read it first if that matters to you.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/openai-codex/install-codex-on-windows-with-powershell/

## How to use Codex inside VS Code, Cursor or the desktop app with Codex

Repo: [openai/codex](https://github.com/openai/codex) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Move from the terminal to Codex in your editor or the desktop app, with the same account.

**Who it is for:** A developer who likes Codex but would rather review edits inside the editor they already use.

**The problem:** Switching between a terminal agent and an editor makes it harder to follow what changed.

**The outcome:** Codex available in VS Code, Cursor or Windsurf, or as a desktop app, alongside the CLI.

### Steps

1. Install the CLI with `npm install -g @openai/codex` and sign in once with ChatGPT
2. For your editor, install the Codex IDE extension in VS Code, Cursor or Windsurf as the README links
3. For a desktop experience, run `codex app`
4. Keep using `codex` in the terminal for scripted or remote work

### Prompt to paste into your agent

```text
Set up openai/codex for me in <VS Code or Cursor> and as the desktop app with `codex app`, using my ChatGPT sign-in, then open <project> and ask it to <task> so I can compare the views.
```

### Caveat



Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/openai-codex/use-codex-in-vs-code-cursor-or-the-desktop-app/
