@codexed/codex

中文文档
0.167.0-codexed.1发布于 2026/11/08Apache-2.0ES Module近 30 天下载 2185

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

Codex CLI splash

原始使用文档
文档目录4 节
  1. Quickstart
  2. Installing and running Codex CLI
  3. Using Codex with your ChatGPT plan
  4. Docs

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.

版本与发布记录

@codexed/codex 共发布 78 个版本,首次发布于 2026/04/17;过去 12 个月发布了 78 个版本。

版本发布日期距今
0.167.0-codexed.1latest2026/11/081 天前
0.166.0-codexed.22026/11/054 天前
0.166.0-codexed.12026/11/036 天前
0.160.1-codexed.12026/10/061 个月前
0.160.0-codexed.42026/10/041 个月前
0.160.0-codexed.32026/10/031 个月前

其他发布通道:candidate-0-149 → 0.149.0-codexed.2。

关于 @codexed/codex 的常见问题

@codexed/codex 是什么?

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

如何安装 @codexed/codex?

在项目目录运行 npm install @codexed/codex,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 codex,可以用 npx codex 直接运行。

@codexed/codex 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/codexed__codex 是否存在。

@codexed/codex 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@codexed/codex 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=16。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@codexed/codex 可以商用吗?

@codexed/codex 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@codexed/codex 的下载量有多少?

根据 npm 官方下载统计,@codexed/codex 在 2026/10/10 – 2026/11/08 这 30 天内被下载 2,185 次,日均约 73 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@codexed/codex 还在维护吗?

最新版本 0.167.0-codexed.1 发布于 2026/11/08(1 天前);至今共发布 78 个版本,其中过去 12 个月发布了 78 个;首次发布于 2026/04/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。