OpenAI Codex CLI Freemium

Codex CLI is OpenAI's open-source terminal coding agent, now powered by GPT-5

OpenAI Codex CLI is a free, open-source coding agent that runs in your terminal. Install it with npm i -g @openai/codex, authenticate with ChatGPT or an API key, and it reads your repository, writes patches and executes shell commands on request.

What is OpenAI Codex CLI?

Codex CLI is a Rust-based command-line agent published by OpenAI under the Apache-2.0 licence. It’s the terminal counterpart to the Codex IDE extensions and the cloud Codex agent. You point it at a working directory, describe a change, and it proposes diffs that you approve or reject before anything touches disk.

The original 2025 release defaulted to o4-mini; current versions let you select GPT-5 and GPT-5-Codex tiers, which are tuned for longer agentic runs.

Codex CLI Features

  • Three approval modes — Suggest (read-only), Auto Edit (write files, ask before commands) and Full Auto (run everything in a sandbox).
  • Repo-aware context — indexes the project so it understands imports and conventions.
  • Multimodal input — attach screenshots or design mockups to a prompt.
  • Sandboxing — macOS Seatbelt and Linux Landlock/seccomp restrict network and filesystem access in Full Auto.
  • Local config via ~/.codex/config.toml — set default model, approval mode and per-project overrides.
  • Open source — Apache-2.0, so you can read exactly what it does before trusting it with a repo.
  • How Much Does Codex CLI Cost?

    The tool is free. What you pay for is model access. Signing in with a ChatGPT Plus ($20/month) or Pro ($200/month) account includes Codex usage with periodic rate limits. Alternatively, paste an OpenAI API key and pay per token — GPT-5 at $1.25 per million input and $10 per million output. Codex also accepts compatible third-party providers, so you can point it at a cheaper endpoint if you want.

    What Is Codex CLI Good At?

  • Scripted refactors — renaming an API across a repo, then running the test suite to confirm.
  • Legacy code archaeology — “explain what this module does and list its external calls”.
  • Test generation — writing pytest or Jest coverage for untested functions.
  • CI-friendly automation — headless runs in a container for routine maintenance.
  • Terminal-native developers — you never leave tmux for a new IDE.
  • Who Should Use Codex CLI and Who Should Not

    If you’re comfortable in a shell and want an agent without switching editors, this is one of the cleaner options available. The approval flow is sensible, and the sandbox on Full Auto is a real safeguard rather than a marketing line.

    If you want inline completions, tab-to-accept ghost text and a graphical diff view, a VS Code extension or Cursor will feel more natural. Codex CLI is deliberately terse. And Full Auto still deserves caution on repos containing credentials — the sandbox helps, but the agent will happily rewrite files it misjudges.

    Quick Summary

  • OpenAI Codex CLI is a free, Apache-2.0 licensed terminal coding agent.
  • Install with npm i -g @openai/codex; sign in with ChatGPT or an API key.
  • Supports GPT-5 and GPT-5-Codex models, plus third-party OpenAI-compatible endpoints.
  • Three approval modes range from read-only suggestions to sandboxed full autonomy.
  • Usage is included with ChatGPT Plus at $20/month, or billed per token via API.