Install OpenAI Codex CLI
Run OpenAI's Codex CLI from your terminal to automate coding tasks, write scripts, and modify files with AI.
0 of 4 steps complete
What is Codex CLI?
Codex CLI is OpenAI's open-source terminal agent that takes natural language instructions and executes real coding tasks — reading files, writing code, running commands, and fixing bugs.
Requirements
- Node.js 22+
- An OpenAI API key (or a compatible free API key from OpenRouter)
Install Node.js 22+
Codex CLI requires Node.js version 22 or higher.
go to google and search node js download and install it
Check your current version in your terminal :
node --version
If it's below 22, download Node.js 22 LTS from nodejs.org or use a version manager:
# Using nvm (Mac/Linux)
nvm install 22
nvm use 22
Install Codex CLI
Get a Free API Key via OpenRouter
Run Your First Task
Related AI setup guides
Install Claude Code Using OpenRouter (Free)
Get Claude Code running for free in minutes using OpenRouter's generous free-tier models. No Anthropic account needed.
Local ModelsRun DeepSeek Coder Locally with Ollama
DeepSeek is one of the world's best free coding AIs. Run it 100% offline on your PC in under 10 minutes.
Development Tools9 Git Commands Every Developer Should Know
Learn nine practical Git commands for saving work, undoing commits, inspecting changes, tracing bugs, and recovering lost history.
AI Coding Assistants6 AI Agent Trends Shaping 2026
Explore multi-agent orchestration, coding agents, governance, agentic commerce, and the practical trends shaping AI products in 2026.