promptgarten ๐ŸŒฑ

Command reference ยท Codex CLI

/cloud-environment

Chooses the cloud environment for the chat.

/cloud-environment selects the cloud environment in which a Codex chat runs when you opt for cloud execution. According to the doc on Codex environments, you open the ChatGPT dropdown in the ChatGPT desktop app, select Codex, and choose between Local, Worktree, and Cloud when starting a new chat. A cloud environment determines what Codex installs and runs during cloud chats: dependencies, tools like linters or formatters, environment variables. At startup, Codex checks out your branch or commit in a container, runs your setup script, and then continues working in the preinstalled default image universal if you're not using your own setup. Environments are configured in the Codex settings. Important for context: the pure terminal CLI reference doesn't list this command โ€” the doc explicitly describes the environment selection as a feature of the ChatGPT desktop app.

โœ… WHEN TO USE IT?

Switch between cloud environments

You've set up two environments with different Node versions and select the right one before the next cloud chat.

Secure the toolchain before a cloud task

Before starting a cloud chat with special dependencies, you check whether the environment with the matching preinstalled packages is active.

โ›” WHEN NOT TO?

The chat runs locally

According to the doc, the command only determines which environment is used for cloud execution โ€” it has no effect during local execution.

Better: First switch to the cloud via the Local/Worktree/Cloud selection.

Expected in the pure terminal CLI

The doc explicitly describes the Local/Worktree/Cloud selection as a feature of the ChatGPT desktop app; the terminal CLI reference doesn't list the command.

Better: In the terminal, use the codex cloud subcommand instead to start cloud tasks.

SOURCES

MORE COMMANDS ยท Codex CLI

/worktree/quit/model/permissions/status/plan/review/diff/resume/new/fork/mcp

All commands ยท Codex CLI โ†’

Share:๐•in๐Ÿ’ฌ