Codex
Contents
Links
- GitHub :: openai / codex
- Codex
- Quickstart
- Concepts
- Prompting
Interacting with the Codex agent - Customization
How to customize Codex with project guidance, skills, MCP, and multi-agents - Multi-agents
How multi-agent workflows keep Codex focused and how to choose models for different agents - Workflows
Development usage patterns with Codex - Codex Models
Meet the AI models that power Codex
- Prompting
- If you are looking for the cloud-based agent from OpenAI, Codex Web, go to chatgpt.com/codex.
CLI
node -v
v24.13.1
# Install using npm
npm install -g @openai/codex
codex login
codex
Use Git checkpoints
Codex can modify your codebase, so consider creating Git checkpoints before and after each task so you can easily revert changes if needed.
Managing and Reverting Changes
# To go back to a previous state temporarily without rewriting history (best for unshared changes)
# Use 'soft' to keep the changes in your working directory,
# or 'hard' to discard them completely
git reset --hard HEAD~1
# This command moves your branch pointer back one commit.
# You can use the specific commit hash instead of HEAD~1 for more precise control.
# To undo a single commit cleanly after it has potentially been shared with others, use Git revert:
# Replace <commit_hash> with the actual hash of the "Post-task" commit
git revert <commit_hash>
# This creates a new commit that applies the inverse of the changes from the specified commit, preserving project history.