# codex

> A coding agent from OpenAI that runs in your terminal on your own machine

- Repository: https://github.com/openai/codex
- Category: Coding agents & dev tools
- Stars: 130,502 · Forks: 20,574 · Language: Rust · License: Apache-2.0
- Experience: Beginner friendly
- Page: https://ir.adyog.com/repos/openai/codex/

Codex CLI is a coding agent you run from the command line. You start it with the codex command inside your project, and it works on your computer rather than in a hosted service.

The README is short on technical detail. It covers installing, signing in and where to find the docs. For how the agent works, the full docs on developers.openai.com are the place to look.

OpenAI offers Codex in other forms too: an IDE extension for VS Code, Cursor and Windsurf, a desktop app launched with codex app, and a cloud agent called Codex Web. The CLI is the terminal option in that set. It is written in Rust and licensed under Apache-2.0.

## What it does

- **Local terminal agent**: The agent runs on your own computer from the terminal. Start it by typing codex.
- **Two ways to sign in**: Sign in with ChatGPT to use it under a Plus, Pro, Business, Edu or Enterprise plan. An API key also works but needs extra setup.
- **Several install routes**: Use a shell install script on Mac, Linux or Windows, or npm or Homebrew. You can also download a binary from GitHub Releases.
- **Sits alongside other Codex products**: The same Codex is available in editors, as a desktop app and as a cloud agent, so you can pick the surface you like.

## What you could build

- Ask an agent to read and change code in a project from your terminal.
- Use your existing ChatGPT subscription to power a coding agent instead of setting up API billing.
- Try a terminal-based coding agent on Mac, Linux or Windows.
- Read the Rust source to see how a production coding agent is built.
- Contribute fixes or features through the repo's contributing guide.

## Who it's for

Developers comfortable in a terminal who want an AI coding agent, ideally with a ChatGPT plan or OpenAI API key.

## Get started

Install with npm or Homebrew (or the shell installer in the README), then run codex in your project. Choose Sign in with ChatGPT when prompted, or set up an API key.

```
npm install -g @openai/codex
```
```
brew install --cask codex
```
```
codex
```

Tags: coding-agent, cli, openai, terminal, rust
