Codex
One-command install
Paste your API key, copy the command, run — Codex ready on macOS, Linux, Windows
Paste your API key below, pick your operating system, then copy the command and run it in a terminal:
The key is inserted into the command right in your browser — it is never sent anywhere.
curl -fsSL https://docs.vnaipro.app/install/codex.sh | bash -s -- --key YOUR_API_KEYPaste your key above and the command fills it in automatically.
What does the script do?
- Checks for Node.js (guides you through installing it if missing, then stops)
- Installs the Codex CLI:
npm install -g @openai/codex - Backs up any existing config (as
config.toml.bak.<timestamp>) - Writes
~/.codex/config.toml— model + VNAI Pro endpoint configuration - Writes
~/.codex/auth.jsonwith your key (equivalent tocodex login) - Verifies with
codex --version
Safe to re-run
Run the command again any time (for example after rotating your key) — the old config is always backed up before the new one is written.
After installing
Open a new terminal and run:
codexThe VS Code extension and the Codex app pick up the same configuration — no extra sign-in needed.
If something goes wrong, see Troubleshooting.