Guide 01
Codex deployment
Ship a project to a hosting platform with the Codex CLI acting as your deploy pipeline.
1Install the Codex CLI
Codex runs as a small CLI on your machine. Install it with your package manager of choice, then confirm the version.
npm install -g @openai/codex
codex --version2Point Codex at your repo
From the repository root, start a session and ask Codex to build out the deployment. Describe the target platform and let it work through the manifest.
cd ~/projects/api
codex "Plan a production deployment for this service and write it up."3Run the pipeline
Once the plan looks right, tell Codex to execute it. It will install dependencies, run the build, and push the artifact.
codex -C "Review the plan, fix anything unsafe, then deploy."4Verify the rollout
After the deploy finishes, check the health endpoint and the logs to confirm traffic is flowing to the new revision.
curl -f https://api.example.com/health
codex "Summarize the last deploy from the platform logs."Tip: keep secrets in your platform's environment store, never in the repository, so Codex's edits can reference them without exposing them.