Tools/openai/codex

codex

Lightweight coding agent that runs in your terminal

122.9kestablishedRustApache License 2.0trending

The Lens

By Erik Loyd, SaaS CEO and former COO/CFO of an AWS Premier Partner.

Updated Sep 2026

Codex CLI is OpenAI's coding agent for the terminal. Point it at a repo and it reads files, writes code, and runs commands while you approve each step or let it run. The client is Rust, Apache 2.0, and free to install with a single command.

There is nothing to host. The sandboxing is real rather than decorative: Seatbelt on macOS, bubblewrap on Linux and WSL2, with an approval mode that asks before the agent reaches the internet. The escape hatch is the part worth knowing about. Run `codex --oss` and it drives Ollama or LM Studio on your own machine, and the provider config accepts any OpenAI-compatible base URL.

Anyone already paying for ChatGPT gets this at no extra cost. Teams weighing it against Copilot or Cursor should know it does no inline completion. It is a terminal agent plus an IDE extension, not an autocomplete engine.

The catch is what Apache 2.0 actually covers. The license is on the wrapper, not the model. Out of the box Codex wants a paid ChatGPT plan, $20 a month for Plus at the low end, or an API key billed per token. The local model route is the only free one, and it does not perform the same.

Free vs Self-Hosted vs Paid

fully free

Free tier The CLI is Apache 2.0 and free to install. Running it against local models costs nothing: codex --oss targets Ollama or LM Studio on your own hardware, and the model_providers config accepts any OpenAI-compatible base URL. Output quality is whatever the local model gives you.

Self-hosted There is no server to run, so self-hosting here means supplying your own inference. A local runtime or any third-party OpenAI-compatible endpoint works.

Paid The default path is a paid ChatGPT plan. OpenAI lists Plus, Pro, Business, Edu, and Enterprise as the plans that include Codex; ChatGPT Free is not on that list. Plus is $20/mo. The alternative is an OpenAI API key billed at standard per-token API rates through your OpenAI Platform account, which covers local workflows but leaves some workspace and cloud features unavailable.

Free, open source client. The bill is a paid ChatGPT plan starting at $20/mo for Plus, or per-token API rates. Local models via `--oss` are the only zero-cost path.

What to do by team size

Solo
free with a local model, otherwise the $20/mo ChatGPT Plus you likely already pay for
Small team
Paid ChatGPT seats, or run it against an existing API key budget
Medium team
Paid seats plus managed hook policy so agent config stays consistent
Large team
Business or Enterprise ChatGPT seats for admin controls and workspace policy
Self-hosting ops:trivial

Get tools like this every Wednesday

One featured tool, three on the radar. No fluff.

Similar Tools

Score
95/100 · A+
Adoption30/30
Maintenance25/25
Community15/20
License15/15
Analysis10/10

A low score is not a verdict on quality. Young and niche tools start low by design. How we calculate scores

Trust Signals

High adoption: 122,649 starsActive community: 18,846 forksCommunity discussions enabledOrganization account (271 public repos)Notable author: 132,587 followersBacked by: MicrosoftAuthor also built: openai/NavierStokesAndEuler (1,162 stars)

License: Apache License 2.0

Use freely. Patent grant included.

Commercial use: ✓ Yes

About

Owner
OpenAI (Organization)
Backed by
Microsoft
Stars
122,947
Forks
18,916

Also by OpenAI

Explore Further

More tools in the directory