How To
How to install CODEX
Use this checklist to install and validate CODEX in a clean, repeatable way for local development.
1. Prerequisites
- Install a recent version of Git.
- Install VS Code (recommended) and a modern shell (bash/zsh/PowerShell).
- Ensure Node.js LTS is installed if your CODEX setup requires JS tooling.
- Create or sign in to your provider account with API/model access enabled.
2. Install the CODEX CLI/agent
- Follow the official CODEX installation docs for your platform.
- Install using the package manager or installer recommended in the docs.
- Confirm installation: run the CODEX version command in terminal.
- If command is not found, restart terminal and verify your PATH.
3. Configure credentials securely
- Set API keys/tokens using environment variables, not hardcoded files.
- Store secrets in your shell profile or a secure secret manager.
- Add secret files to `.gitignore` so keys are never committed.
- Run a quick auth check command to verify access.
4. Connect CODEX to your project
- Open your repository root in VS Code.
- Initialize project instructions (`AGENTS.md`) and shared coding rules.
- Run CODEX in the project directory so it has repository context.
- Verify it can read files, run checks, and propose patch-based edits.
5. Validate with a smoke test
- Ask CODEX to make one safe, small change.
- Run your test/lint commands.
- Review generated diff for correctness and style compliance.
- Commit with a clear message and sign-off once checks pass.
6. Troubleshooting
- Auth failures: re-check token scopes and environment variable names.
- Command not found: verify install path and terminal profile load order.
- Poor output quality: tighten prompt constraints and add acceptance criteria.
- Inconsistent edits: provide exact target files and desired output format.
Recommended first prompt
Review this repository and propose one low-risk improvement.
Constraints:
- no API changes
- include tests or validation steps
- return a patch and rationale.