Instrucciones paso a paso
- 1
Paso
Check Node.js
Usa el comando copiable tal como aparece y verifica la salida antes de continuar. El objetivo es mantener velocidad con control.
node -v && npm -v - 2
Paso
Install Codex Globally
Usa el comando copiable tal como aparece y verifica la salida antes de continuar. El objetivo es mantener velocidad con control.
npm install -g @openai/codex - 3
Paso
Verify Installation
Usa el comando copiable tal como aparece y verifica la salida antes de continuar. El objetivo es mantener velocidad con control.
codex --version - 4
Paso
Avoid Old Flags
Usa el comando copiable tal como aparece y verifica la salida antes de continuar. El objetivo es mantener velocidad con control.
codex
Por qué importa
Asegura la última versión oficial de OpenAI sin flags deprecados como `-q`.
Solución de problemas
- Si aparecen archivos inesperados, detente y revisa git diff antes de continuar.
- Si las pruebas fallan, corrige la causa o revierte antes de ejecutar el agente otra vez.
- Si el workspace es importante y no puedes perderlo, no uses modos que salten permisos.
FAQ
What is the npm command for OpenAI Codex?
The official command is `npm install -g @openai/codex`. The `-g` flag is important because it makes the `codex` command available globally across all your project folders.
Does Codex CLI require Python or Node.js?
Codex CLI runs on Node.js. You do not need Python to install or run the standard Codex package, but you must have a recent version of Node.js installed.
Can I install Codex CLI with Homebrew instead of NPM?
While `brew install --cask codex` has been used historically for unofficial wrappers, the direct supported method from OpenAI is using NPM via the `@openai/codex` package.
How do I fix unexpected argument '-q' in Codex CLI?
Stop using the `-q` flag. Older versions used it to suppress prompts, but the current v0.130.0+ architecture rejects it. Just type `codex` and hit enter.
Is Codex CLI the same as Claude Code?
No. Codex is OpenAI's coding agent CLI, whereas Claude Code is Anthropic's terminal agent. They are installed differently and use different AI models on the backend.
Tutoriales relacionados
Copilot
How to Install GitHub Copilot CLI on Mac and Windows
Step-by-step guide to installing the GitHub Copilot CLI extension. Learn how to authenticate and run gh copilot suggest and explain in your terminal.
Aider
How to Install Aider AI Coding CLI on Mac and Windows
Step-by-step guide to installing the Aider AI pair programming CLI on macOS and Windows. Learn how to configure API keys for Claude 3.7 and GPT-4o.