Operations // Articles

Installing and verifying Codex CLI

How to install Codex CLI, authenticate it, and confirm that the codex command works from your terminal.

Codex CLI is an AI coding agent that runs in your terminal. It is separate from cloud or IDE versions, and is started with the codex command inside the project directory you want to work on.

What you need

  • Node.js and npm
  • Internet access
  • An account that can use Codex
  • A project directory
  • A terminal environment

Step 1: Install Codex CLI

The official documentation provides an npm-based install command.

npm i -g @openai/codex

To update an existing install, install the latest version again.

npm i -g @openai/codex@latest

Step 2: Check the command

Confirm that your shell can find the codex command.

codex --version
which codex

If command not found appears, the npm global install location may not be on PATH.

Step 3: Sign in

Run Codex CLI once and follow the authentication prompt.

codex

Step 4: Start it in a project

Move to the project directory and start Codex there.

cd your-project
codex
  • codex runs from the terminal
  • Authentication is complete
  • Codex starts inside the target project
  • The command is available before connecting from Even Terminal

References