vibehowto

Home / Your AI coding helper / Codex (OpenAI's version) / Install Codex CLI

Install Codex CLI

Updated Sep 18, 2026

Native installer first. Confirm codex --version, then sign in with ChatGPT Plus or an API key.

Use the native installer. Skip npm install -g unless the native path fails. Global npm is how people collect EACCES errors for a binary that is not a Node app.

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

If you already have Homebrew:

Terminal
brew install --cask codex

Close Terminal, open it again:

Terminal
codex --version

Log in

From any folder:

Terminal
codex

Choose Sign in with ChatGPT if you have Plus or higher. A browser window opens. Approve it.

An API key works too. That key is OPENAI_API_KEY in .env, not in chat. Get it from OpenAI API key. Subscription login is simpler for a first harness.

Next: first project inside the repo you already cloned.

Checklist

Saved in this browser. No account. Clearing site data wipes it.

Next: First project with Codex

Get new guides and videos by email

One email when something new is up. No spam. Unsubscribe anytime.