Repolode
openai

openai/codex

A lightweight coding agent from OpenAI that runs locally in your terminal to help you write and work on code.

Stars
129,942
Forks
20,467
Open issues
23,560
Last commit
6 hours ago

What is it?

Codex CLI is a coding agent from OpenAI that runs on your own computer from the terminal. You launch it with the codex command and work on code in your local project directory.

It can be installed through a shell script, npm, Homebrew, or by downloading a prebuilt binary from GitHub Releases for macOS, Linux, and Windows. Sign-in works with a ChatGPT Plus, Pro, Business, Edu, or Enterprise plan, or with an API key.

The project sits alongside OpenAI's other Codex surfaces: IDE extensions for VS Code, Cursor, and Windsurf, a desktop app, and a cloud-based agent at chatgpt.com/codex. This repository covers the local command-line version, written in Rust and released under Apache-2.0.

Key features

  • 01Runs as a local command-line agent started with the codex command.
  • 02Signs in with a ChatGPT plan or an API key.
  • 03Installs via shell script, npm, Homebrew, or prebuilt binaries.
  • 04Provides prebuilt binaries for macOS, Linux, and Windows.

Use cases

  • Working on code in a local project directory from the terminal.
  • Using an AI coding agent without leaving the command line.
  • Trying OpenAI's Codex agent on your own machine before choosing an IDE or cloud version.

Quick start

  1. 1

    Install Codex CLI on Mac or Linux

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

    Or install on Windows with PowerShell

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

    Or install via npm

    npm install -g @openai/codex
  4. 4

    Run codex and select Sign in with ChatGPT (or use an API key)

    codex

Things to know

  • Using it with an API key requires additional setup beyond the default ChatGPT sign-in.
  • Full use is tied to a ChatGPT plan (Plus, Pro, Business, Edu, or Enterprise) or an API key.

Topics

FAQ

What is codex?
A lightweight coding agent from OpenAI that runs locally in your terminal to help you write and work on code. Codex CLI is a coding agent from OpenAI that runs on your own computer from the terminal. You launch it with the codex command and work on code in your local project directory.
Is codex free to use? What license does it have?
codex is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is codex still maintained?
Actively maintained. The last commit to codex was on Oct 20, 2026.
What can I use codex for?
Working on code in a local project directory from the terminal. Using an AI coding agent without leaving the command line. Trying OpenAI's Codex agent on your own machine before choosing an IDE or cloud version.
How do I install codex?
Install Codex CLI on Mac or Linux: curl -fsSL https://chatgpt.com/codex/install.sh | sh Or install on Windows with PowerShell: powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex" Or install via npm: npm install -g @openai/codex Run codex and select Sign in with ChatGPT (or use an API key): codex
Where can I get codex?
The source code and installation instructions are on GitHub: https://github.com/openai/codex

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects