codex README

The project's README from github.com/openai/codex. As one markdown file: README.md.

Codex CLI is a coding agent from OpenAI that runs locally on your computer.

Codex CLI splash


If you want Codex in your code editor (VS Code, Cursor, Windsurf), install in your IDE.
If you want the desktop app experience, run codex app or visit the Codex App page.
If you are looking for the cloud-based agent from OpenAI, Codex Web, go to chatgpt.com/codex.


Quickstart

Installing and running Codex CLI

Run the following on Mac or Linux to install Codex CLI:

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

Run the following on Windows to install Codex CLI:

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

The standalone installers download from https://releases.openai.com/codex by default and fall back to GitHub Releases if a metadata or asset download is unavailable. To force GitHub Releases, set CODEX_INSTALLER_USE_RELEASES_OPENAI_COM to false (0 and no are also accepted):

curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_INSTALLER_USE_RELEASES_OPENAI_COM=false sh
$env:CODEX_INSTALLER_USE_RELEASES_OPENAI_COM='false'; irm https://chatgpt.com/codex/install.ps1 | iex

Codex CLI can also be installed via the following package managers:

# Install using npm
npm install -g @openai/codex
# Install using Homebrew
brew install --cask codex

Then simply run codex to get started.

You can also go to the latest GitHub Release and download the appropriate binary for your platform.

Each GitHub Release contains many executables, but in practice, you likely want one of these:

  • macOS
    • Apple Silicon/arm64: codex-aarch64-apple-darwin.tar.gz
    • x86_64 (older Mac hardware): codex-x86_64-apple-darwin.tar.gz
  • Linux
    • x86_64: codex-x86_64-unknown-linux-musl.tar.gz
    • arm64: codex-aarch64-unknown-linux-musl.tar.gz

Each archive contains a single entry with the platform baked into the name (e.g., codex-x86_64-unknown-linux-musl), so you likely want to rename it to codex after extracting it.

Using Codex with your ChatGPT plan

Run codex and select Sign in with ChatGPT. We recommend signing into your ChatGPT account to use Codex as part of your Plus, Pro, Business, Edu, or Enterprise plan. Learn more about what's included in your ChatGPT plan.

You can also use Codex with an API key, but this requires additional setup.

Docs

This repository is licensed under the Apache-2.0 License.

codex (openai/codex)

Searching Database…

129.8K ·GitHub
这是什么?Codex 是 OpenAI 推出的轻量级编程智能体,可在本地终端中运行,让你用自然语言编写代码并处理代码。
它只是一个命令行工具,还是也提供编辑器扩展或桌面应用?核心是终端命令行工具,但 Codex 也可作为 VS Code、Cursor 和 Windsurf 的扩展使用,还可作为独立桌面应用(codex app),以及一个基于云端的独立版本 Codex Web。
我需要 ChatGPT 订阅,还是可以使用 API 密钥?Codex 可通过 'Sign in with ChatGPT' 与你的 ChatGPT Plus、Pro、Business、Edu 或 Enterprise 套餐配合使用,也可以使用 OpenAI API 密钥。
使用 API 密钥是否和用 ChatGPT 登录一样简单?不是。Codex 支持使用 API 密钥,但与直接用 ChatGPT 账号登录相比,需要额外的设置。
它能在哪些平台上运行?提供 macOS(Apple Silicon 和 Intel/x86_64)以及 Linux(x86_64 和 arm64)的预编译二进制文件;文中未提及 Windows 版本。
'codex app' 是什么?这是 Codex 的桌面应用版本,可通过运行 'codex app' 命令启动,或从官网下载,在终端命令行工具之外提供图形界面。
Codex Web 是什么?Codex Web 是 OpenAI 基于云端的编程智能体版本,与在本地运行的命令行工具相互独立,无需安装任何软件即可运行 Codex。
我能直接在代码编辑器里使用 Codex 吗?可以。Codex 可作为 VS Code、Cursor 和 Windsurf 的扩展使用,无需离开编辑器即可使用同一个智能体。
Creator
openai
Size
669.3 MB
Stars
129.8K
Age
1y
Commits · 90 Days