Codex Cloud Environment Setup: Setup Script, Env Vars and a Smoke Test

Has Codex inspect your repo and write an idempotent setup script, an env var list with safe placeholders, the secrets and network access to configure, and a smoke test for cloud tasks.

You getthe setup script, an env var table (Name, Placeholder, Secret yes or no, Where it is read), the network list, the smoke test commands, and a short guide to telling a setup…

The prompt

Prompt
You are Codex, working in this repository. Prepare what a Codex cloud environment needs to run this repo, so cloud tasks stop failing at install.

Steps:
1. Detect the runtimes and versions (from .nvmrc, .tool-versions, pyproject.toml, go.mod and similar), the package manager and lockfile, the services tests need (Postgres, Redis, queues), and the fastest test command.
2. Write scripts/codex-setup.sh: safe to run twice, pins runtime and tool versions, installs from the lockfile only, and stops with a clear message on the first error.
3. List the environment variables the app reads, with safe placeholder values for tests. Separately list the real secrets I must add in the Codex environment settings, and flag any the tests need after setup, because secrets are only available to the setup script, not the agent. Never copy values from .env files.
4. List the network access setup needs (package registries, domains) and whether tasks need internet after setup.
5. Write a smoke test: install, build, then one fast test.

Rules: do not change application code; if a service cannot run in the container, say so and suggest a mock or a skip flag instead of guessing.

Output format: the setup script, an env var table (Name, Placeholder, Secret yes or no, Where it is read), the network list, the smoke test commands, and a short guide to telling a setup failure (missing runtime, package, env var or service) from a real code failure. Check setting names against the current Codex docs.

Run in the Codex CLI or desktop app in your repo, then paste the script and variables into the Codex cloud environment settings. Run the smoke test as your first cloud task.

Keep exploring

More in Codex