# codex

> AI coding agent from OpenAI that runs locally on your computer to assist with development tasks.

Stars: 132.9k · Categories: AI

- Repository: https://github.com/openai/codex
- Page: https://www.trmn.sh/tools/codex

## Install

- NPM: `npm install -g @openai/codex`
- Homebrew: `brew install --cask codex`

## Overview

Codex CLI is an AI-powered coding assistant from OpenAI that operates locally on your machine. It functions as a coding agent that can help with various development tasks through a command-line interface. The tool integrates with ChatGPT accounts, allowing users to leverage their existing Plus, Pro, Business, Edu, or Enterprise plans.

The CLI tool is part of a broader Codex ecosystem that includes IDE extensions for VS Code, Cursor, and Windsurf, as well as a desktop app mode accessible via `codex app`. Users can authenticate either through their ChatGPT account (recommended) or via API key setup. The tool is available across multiple platforms including macOS (both Apple Silicon and Intel), Linux (x86_64 and arm64), making it accessible to developers working in different environments.

Codex CLI serves developers who want AI assistance integrated directly into their terminal workflow, complementing the web-based Codex available at chatgpt.com/codex. The local execution model provides developers with AI coding capabilities without requiring constant web browser interaction.

### Installation

```bash
# via NPM
npm install -g @openai/codex
```

```bash
# via Homebrew
brew install --cask codex
```

![Codex CLI splash screen](https://media.trmn.sh/cached/f0a3e2b8ae1491f035c1e1f04a0ba9b77530ae58c6d1a3fb006c3b89b18140c0.png)

## Alternatives

- [Claude Code](https://www.trmn.sh/tools/claude-code.md): AI-powered coding assistant that runs in the terminal and understands your codebase to execute tasks through natural language commands. (TypeScript, 154.3k stars)
- [gemini-cli](https://www.trmn.sh/tools/gemini-cli.md): Terminal AI agent providing direct command line access to Google Gemini models with file operations, web search, and tool integration. (TypeScript, 108.7k stars)
- [rtk](https://www.trmn.sh/tools/rtk.md): Single Rust binary that filters and compresses shell command output (git, tests, linters, etc.) before AI coding agents read it, with under 10ms overhead. (Rust, 85.3k stars)
- [Ollama](https://www.trmn.sh/tools/ollama.md): CLI tool for running and managing local large language models with REST API and client library support (Go, 185.7k stars)
- [OmO](https://www.trmn.sh/tools/oh-my-openagent.md): Terminal coding agent run through the omo command. It runs on senpi, a fork of pi, and can split a job into parallel agents across multiple models. (TypeScript, 70.6k stars)

## Guides

- [Claude Code Alternatives](https://www.trmn.sh/alternatives/claude-code): Claude Code alternatives: OpenCode, Codex CLI, Gemini CLI, Aider and Goose compared by providers, agents, git handling and free tiers.
- [codex Alternatives](https://www.trmn.sh/alternatives/codex): Codex alternatives: OpenCode, Claude Code, Gemini CLI, Aider and Goose compared by model support, interface and workflow.
- [gemini-cli Alternatives](https://www.trmn.sh/alternatives/gemini-cli): Alternatives to gemini-cli: opencode, claude-code, codex, goose, and aider compared by provider support, agents, and workflow.
- [Goose Alternatives](https://www.trmn.sh/alternatives/goose): Goose alternatives compared: OpenCode, Claude Code, Aider, Codex and Gemini CLI, with how each differs on scope, providers and workflow.
- [Open Interpreter Alternatives](https://www.trmn.sh/alternatives/open-interpreter): Open Interpreter alternatives: Goose, opencode, Claude Code, Codex and Gemini CLI compared on interfaces, providers and approval controls.
- [opencode Alternatives](https://www.trmn.sh/alternatives/opencode): opencode alternatives: Claude Code, codex, Gemini CLI, Aider and Goose compared by interface, model support and git workflow.
- [Best AI Coding Agents for the Terminal](https://www.trmn.sh/best/ai-coding-agents): Compare terminal AI coding agents: opencode, Claude Code, codex, Gemini CLI, aider, Goose and Open Interpreter by workflow and model support.
- [Claude Code vs codex](https://www.trmn.sh/compare/claude-code-vs-codex): Claude Code vs codex: install options, IDE and GitHub integrations, plugins, ChatGPT sign-in and platform support for two terminal AI coding agents.

---

Canonical: https://www.trmn.sh/tools/codex
