Source: https://arara.code.app.br/en/articles/how-to-use-openai-codex-cli
Language: en-US
Published: 2026-11-16T07:55:00-03:00

Guides and comparisons

# OpenAI Codex CLI: install, limits, and usage

OpenAI Codex CLI is an open-source command-line coding agent that inspects repositories, edits files, and runs tests inside a sandbox. You can install it via npm or Homebrew and sign in with a ChatGPT plan or OpenAI API key.

Arara Code

Published and sources checked on November 16, 2026.

Published by the Arara Code project based on the official documentation cited.

## Installing and authenticating Codex CLI

According to the official openai/codex repository, you can install the CLI globally with npm install -g @openai/codex, via Homebrew on macOS, or using the standalone install script.

Running codex inside a project folder lets you authenticate with ChatGPT Plus, Pro, or Team limits or provide an OpenAI API key with zero extra server setup.

[GitHub: official openai/codex repository](https://github.com/openai/codex)

## Approval modes and sandbox execution

Codex CLI supports three autonomy modes: Suggest (proposes edits for manual confirmation), Auto-Edit (writes files automatically and prompts for shell commands), and Full Auto (runs inside a sandbox with workspace access).

For CI pipelines and scripts, codex exec provides predictable non-interactive execution.

[OpenAI Platform: official Codex CLI documentation](https://platform.openai.com/docs/codex)

Related

[Claude Code or Codex usage limit reached? What to doClaude Code or Codex usage limit reached? Learn how the 5-hour and weekly windows work, how to track usage, and what to do until access returns.](https://arara.code.app.br/en/articles/claude-code-and-codex-usage-limits)

## Usage limits and AGENTS.md rules

ChatGPT-authenticated Codex runs share 5-hour and weekly usage windows that scale with context size and task complexity. Running /init generates an AGENTS.md file so Codex follows your test and style rules without wasting tokens.

When your weekly Codex quota runs out mid-sprint, having a second agent ready prevents downtime.

[GitHub: official openai/codex repository](https://github.com/openai/codex)

## Codex CLI inside Arara Code

Arara Code integrates Codex directly inside the IDE alongside Claude Code, Kiro, and Antigravity. You inspect diffs visually, accept or reject edits, and switch agents seamlessly if Codex hits a limit.

With Arara Zap, you can also monitor long Codex runs from WhatsApp without staying glued to your terminal.

[Arara Code: public IDE repository](https://github.com/arara-ide/arara-code)

## Sources and further reading

- [GitHub: official openai/codex repository](https://github.com/openai/codex)
- [OpenAI Platform: official Codex CLI documentation](https://platform.openai.com/docs/codex)
- [Arara Code: public IDE repository](https://github.com/arara-ide/arara-code)

[Read as Markdown](https://arara.code.app.br/en/articles/how-to-use-openai-codex-cli.md)

## Keep exploring

### [AGENTS.md: how to guide AI coding agents](https://arara.code.app.br/en/articles/agents-md-rules-for-ai-agents)

Learn how the open AGENTS.md standard replaces fragmented rule files and improves accuracy across Claude Code, Codex, and other agents.

[Read the guide](https://arara.code.app.br/en/articles/agents-md-rules-for-ai-agents)

### [Context engineering for AI coding: how to structure](https://arara.code.app.br/en/articles/context-engineering-for-ai)

Learn what context engineering is in AI development, why huge context windows still fail, and how to organize files for accurate outputs.

[Read the guide](https://arara.code.app.br/en/articles/context-engineering-for-ai)

## Make room for your next idea.

Get to know Arara Code in your own project. Start with the installer and review the changes your assistant makes.

Download Arara Code
