2025-10-20 10:43:40 -07:00
< p align = "center" >< code > npm i -g @openai/codex </ code >< br /> or < code > brew install --cask codex</ code ></ p >
2025-09-11 17:46:20 -07:00
< p align = "center" > < strong > Codex CLI< / strong > is a coding agent from OpenAI that runs locally on your computer.
2025-08-07 11:20:53 -07:00
< p align = "center" >
2026-01-31 12:33:06 -08:00
< img src = "https://github.com/openai/codex/blob/main/.github/codex-cli-splash.png" alt = "Codex CLI splash" width = "80%" / >
2026-01-02 13:01:53 -07:00
< / p >
< / br >
If you want Codex in your code editor (VS Code, Cursor, Windsurf), < a href = "https://developers.openai.com/codex/ide" > install in your IDE.< / a >
2026-02-16 16:35:05 +00:00
< / br > If you want the desktop app experience, run < code > codex app< / code > or visit < a href = "https://chatgpt.com/codex?app-landing-page=true" > the Codex App page< / a > .
2026-01-02 13:01:53 -07:00
< / br > If you are looking for the < em > cloud-based agent< / em > from OpenAI, < strong > Codex Web< / strong > , go to < a href = "https://chatgpt.com/codex" > chatgpt.com/codex< / a > .< / p >
2025-04-16 12:56:08 -04:00
---
## Quickstart
2025-08-07 11:20:53 -07:00
### Installing and running Codex CLI
2026-01-02 13:01:53 -07:00
Install globally with your preferred package manager:
2025-04-16 12:56:08 -04:00
```shell
2026-01-02 13:01:53 -07:00
# Install using npm
2025-08-29 12:40:28 +08:00
npm install -g @openai/codex
```
```shell
2026-01-02 13:01:53 -07:00
# Install using Homebrew
2025-10-20 10:43:40 -07:00
brew install --cask codex
2025-04-16 12:56:08 -04:00
```
2026-01-02 13:01:53 -07:00
Then simply run `codex` to get started.
2025-10-24 11:30:34 -07:00
2025-08-07 11:20:53 -07:00
< details >
< summary > You can also go to the < a href = "https://github.com/openai/codex/releases/latest" > latest GitHub Release< / a > and download the appropriate binary for your platform.< / summary >
2025-07-01 15:00:31 -07:00
2025-08-07 11:20:53 -07:00
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.
< / details >
### Using Codex with your ChatGPT plan
README / docs refactor (#2724)
This PR cleans up the monolithic README by breaking it into a set
navigable pages under docs/ (install, getting started, configuration,
authentication, sandboxing and approvals, platform details, FAQ, ZDR,
contributing, license). The top‑level README is now more concise and
intuitive, (with corrected screenshots).
It also consolidates overlapping content from codex-rs/README.md into
the top‑level docs and updates links accordingly. The codex-rs README
remains in place for now as a pointer and for continuity.
Finally, added an extensive config reference table at the bottom of
docs/config.md.
---------
Co-authored-by: easong-openai <easong@openai.com>
2025-08-27 10:30:39 -07:00
Run `codex` and select **Sign in with ChatGPT** . We recommend signing into your ChatGPT account to use Codex as part of your Plus, Pro, Team, Edu, or Enterprise plan. [Learn more about what's included in your ChatGPT plan ](https://help.openai.com/en/articles/11369540-codex-in-chatgpt ).
2025-08-10 14:19:27 -07:00
2026-01-02 15:23:22 -07:00
You can also use Codex with an API key, but this requires [additional setup ](https://developers.openai.com/codex/auth#sign-in-with-an-api-key ).
2025-08-10 14:19:27 -07:00
2026-01-02 13:01:53 -07:00
## Docs
- [**Codex Documentation** ](https://developers.openai.com/codex )
README / docs refactor (#2724)
This PR cleans up the monolithic README by breaking it into a set
navigable pages under docs/ (install, getting started, configuration,
authentication, sandboxing and approvals, platform details, FAQ, ZDR,
contributing, license). The top‑level README is now more concise and
intuitive, (with corrected screenshots).
It also consolidates overlapping content from codex-rs/README.md into
the top‑level docs and updates links accordingly. The codex-rs README
remains in place for now as a pointer and for continuity.
Finally, added an extensive config reference table at the bottom of
docs/config.md.
---------
Co-authored-by: easong-openai <easong@openai.com>
2025-08-27 10:30:39 -07:00
- [**Contributing** ](./docs/contributing.md )
2026-01-02 13:01:53 -07:00
- [**Installing & building** ](./docs/install.md )
README / docs refactor (#2724)
This PR cleans up the monolithic README by breaking it into a set
navigable pages under docs/ (install, getting started, configuration,
authentication, sandboxing and approvals, platform details, FAQ, ZDR,
contributing, license). The top‑level README is now more concise and
intuitive, (with corrected screenshots).
It also consolidates overlapping content from codex-rs/README.md into
the top‑level docs and updates links accordingly. The codex-rs README
remains in place for now as a pointer and for continuity.
Finally, added an extensive config reference table at the bottom of
docs/config.md.
---------
Co-authored-by: easong-openai <easong@openai.com>
2025-08-27 10:30:39 -07:00
- [**Open source fund** ](./docs/open-source-fund.md )
2025-04-16 12:56:08 -04:00
Enforce ASCII in README.md (#513)
This all started because I was going to write a script to autogenerate
the Table of Contents in the root `README.md`, but I noticed that the
`href` for the "Why Codex?" heading was `#whycodex` instead of
`#why-codex`. This piqued my curiosity and it turned out that the space
in "Why Codex?" was not an ASCII space but **U+00A0**, a non-breaking
space, and so GitHub ignored it when generating the `href` for the
heading.
This also meant that when I did a text search for `why codex` in the
`README.md` in VS Code, the "Why Codex" heading did not match because of
the presence of **U+00A0**.
In short, these types of Unicode characters seem like a hazard, so I
decided to introduce this script to flag them, and if desired, to
replace them with "good enough" ASCII equivalents. For now, this only
applies to the root `README.md` file, but I think we should ultimately
apply this across our source code, as well, as we seem to have quite a
lot of non-ASCII Unicode and it's probably going to cause `rg` to miss
things.
Contributions of this PR:
* `./scripts/asciicheck.py`, which takes a list of filepaths and returns
non-zero if any of them contain non-ASCII characters. (Currently, there
is one exception for ✨ aka **U+2728**, though I would like to default to
an empty allowlist and then require all exceptions to be specified as
flags.)
* A `--fix` option that will attempt to rewrite files with violations
using a equivalents from a hardcoded substitution list.
* An update to `ci.yml` to verify `./scripts/asciicheck.py README.md`
succeeds.
* A cleanup of `README.md` using the `--fix` option as well as some
editorial decisions on my part.
* I tried to update the `href`s in the Table of Contents to reflect the
changes in the heading titles. (TIL that if a heading has a character
like `&` surrounded by spaces, it becomes `--` in the generated `href`.)
2025-04-22 07:07:40 -07:00
This repository is licensed under the [Apache-2.0 License ](LICENSE ).