Skip to main content

Short answer

Codex CLI is OpenAI’s local command-line coding agent. It runs in your terminal, reads the selected workspace, edits files, runs commands, and follows your sandbox and approval settings while working on development tasks. It is useful when you want an agent to help with code changes, code review, test fixes, scripts, and multi-step engineering work inside a local repository. Codex CLI is different from a normal ChatGPT conversation. It does not only suggest code. It works with the current directory, project instructions, tool results, and local execution permissions.

When this matters

  • You are installing @openai/codex for the first time
  • You are comparing Codex CLI, Codex App, and Codex Web
  • You want an agent to edit files in a local project
  • You need to configure a custom API provider, Base URL, or model
  • You want to understand sandbox, approval, and AGENTS.md

Core concepts

ConceptMeaning
Codex CLIThe Codex coding agent running in your local terminal
WorkspaceThe directory Codex can read, search, and modify
config.tomlThe local Codex config file for models, providers, sandbox, approvals, and other behavior
AGENTS.mdA project instruction file that tells Codex repository rules and collaboration preferences
SandboxThe local security boundary for filesystem, network, and command access
ApprovalThe policy that decides which actions need confirmation
  1. Start Codex CLI inside the project directory you want to change.
  2. Ask it to inspect relevant files or instructions before making broad edits.
  3. For complex work, ask for a plan before letting it change files.
  4. Pick sandbox and approval settings based on the risk of the task.
  5. Put durable project rules in AGENTS.md and one-time requirements in the current conversation.
If you use a third-party API provider, focus on model_provider, base_url, wire_api, and model fields in config.toml. Codex and other OpenAI-compatible tools usually use an OpenAI-compatible endpoint, which is https://www.llmeasy.ru/v1 in this documentation.

Common mistakes

  • Treating Codex CLI as a chat-only assistant.
  • Assuming Codex CLI, Codex App, and Codex Web run in the same environment.
  • Changing only model without configuring the matching provider and Base URL.
  • Relaxing sandbox and approval settings without tests, review, or command boundaries.
  • Mixing OpenAI-compatible and Anthropic-compatible Base URLs.

About LLMEasy

When you use a custom OpenAI-compatible provider, LLMEasy can act as the model API layer for Codex CLI. It handles the API Key, Base URL, model routing, balance, and usage records. LLMEasy does not replace Codex CLI’s local sandbox, approvals, AGENTS.md, or command execution policy.

References