BASE

OpenAI Codex CLI

OpenAI Codex CLI

Tool · Free + paid

Codex CLI is OpenAI's official terminal coding agent, working with a local repository, changing files, and running commands. Open-source code lets you study its implementation and extend the workflow through documented mechanisms.

Resource illustration: OpenAI Codex CLI

Open resource ↗

What you can use for free

The CLI and source code are available under Apache-2.0. Current OpenAI Help includes Codex in ChatGPT plans, including Free and Go, subject to the chosen plan's limits; the terminal CLI describes sign-in through a ChatGPT account. Codex Cloud is excluded from Free/Go. The CLI license does not provide unlimited cloud models.

Paid features and costs

CLI access is included in eligible ChatGPT plans, such as Plus from $20 per month, with quotas; credits are available for additional usage. When signing in with an API key, models are billed separately at API rates, rather than against a ChatGPT subscription.

Access and limitations

Costs are divided between the free client and model computation. ChatGPT subscriptions and API keys have different limits and usage billing. Reading a repository locally does not mean running a cloud model locally; external MCPs, APIs, and infrastructure may also have their own costs.

Use cases

  • Implement and verify a task in a local project
  • Automate code changes from the terminal

Example workflow

A possible workflow; this is not a report of hands-on testing.

Example workflow with OpenAI Codex CLI: Implement and verify a task in a local project.

Before you start

  • A repository, a description of one change, and a reproducible example of the expected behavior.
  • Project context: affected files, constraints, and the established validation method.

Steps

  1. For the task “Implement and verify a task in a local project”: open the relevant project and let the agent inspect the affected implementation before making changes.
  2. Set a bounded task with completion criteria; review the proposed changes and how they address the requirement.
  3. Run the appropriate project checks and compare behavior before and after the change.

Check your result

  • The change solves the stated task and does not touch unrelated files unnecessarily.
  • Investigate check failures; review generated code, configuration, and data access permissions.

Choosing OpenAI Codex CLI

Implement and verify a task in a local project

Choose this when

  • Implement and verify a task in a local project
  • Automate code changes from the terminal

Consider alternatives when

  • When choosing for this topic, compare OpenAI Codex CLI with Gemini CLI. A candidate to compare under the topic: Terminal agents, Connection management. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
  • When choosing for this topic, compare OpenAI Codex CLI with OpenCode. A candidate to compare under the topic: Terminal agents, Connection management. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

Things to consider

  • Costs and limits of free use: CLI access is included in eligible ChatGPT plans, such as Plus from $20 per month, with quotas; credits are available for additional usage. When signing in with an API key, models are billed separately at API rates, rather than against a ChatGPT subscription.
  • Terms of use: Apache-2.0 for the CLI; model access and cloud capabilities are governed by OpenAI terms.
  • This is the coding agent itself, rather than an additional skill.
  • Practical Windows operation depends on official support and sandbox mode; available source code does not mean zero model costs.
  • The local CLI and Codex Cloud have different access terms; Free/Go do not include Codex Cloud.

Frequently asked questions

What can you use for free in OpenAI Codex CLI?

The CLI and source code are available under Apache-2.0. Current OpenAI Help includes Codex in ChatGPT plans, including Free and Go, subject to the chosen plan's limits; the terminal CLI describes sign-in through a ChatGPT account. Codex Cloud is excluded from Free/Go. The CLI license does not provide unlimited cloud models.

What additional costs might arise with OpenAI Codex CLI?

CLI access is included in eligible ChatGPT plans, such as Plus from $20 per month, with quotas; credits are available for additional usage. When signing in with an API key, models are billed separately at API rates, rather than against a ChatGPT subscription.

What terms of use matter for OpenAI Codex CLI?

Apache-2.0 for the CLI; model access and cloud capabilities are governed by OpenAI terms.

How do you get started with OpenAI Codex CLI?

For the task “Implement and verify a task in a local project”: open the relevant project and let the agent inspect the affected implementation before making changes. Set a bounded task with completion criteria; review the proposed changes and how they address the requirement. Run the appropriate project checks and compare behavior before and after the change.

How does CLI access differ from Codex Cloud?

OpenAI Help includes Codex in ChatGPT plans, including Free and Go, subject to the chosen plan's limits, and describes CLI sign-in through a ChatGPT account. Codex Cloud is separately available to eligible paid/workspace accounts and is excluded from Free/Go. API-key sign-in has its own billing and settings.

Related tasks and approaches

  • Gemini CLI

    A candidate to compare under the topic: Terminal agents, Connection management. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

  • OpenCode

    A candidate to compare under the topic: Terminal agents, Connection management. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

  • aider

    A candidate to compare under the topic: Terminal agents, Command line. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

License

Apache-2.0 for the CLI; model access and cloud capabilities are governed by OpenAI terms.

Apache 2.0 — permissive license with patent terms

You can use and modify the code in commercial and closed-source projects. When distributing it, retain the license and relevant notices, identify modified files, and include NOTICE if provided. Authors grant a limited patent license for their contributions; it does not grant permission to use trademarks.

License terms

Usage details

This is the coding agent itself, rather than an additional skill. Practical Windows operation depends on official support and sandbox mode; available source code does not mean zero model costs.

Technologies and topics

  • Codex
  • CLI

Sources

Other resources