LocalCloud Codex CLI GCP Sandbox with LocalCloud
Get started
local.cloud / agents
Read this page as Markdown ↗
local.cloud — Codex CLI GCP Sandbox with LocalCloud .md Open tab
Codex-style CLI sandbox

Codex CLI local GCP sandbox

For Codex-style coding CLIs, treat LocalCloud as the deterministic local cloud runtime and the CLI as the code-editing operator. The important contract is explicit: local Docker is allowed, real Google Cloud credentials are not required for default verification.

Fact

Works with terminal agents that can run Docker and project tests.

Fact

Keep setup instructions in prompt text because Codex-style CLIs differ by distribution.

Fact

Use /ai/agents.md as the stable remote operating contract.

Platform caveat

Do not assume persistent tool state

Some Codex-style workflows run in fresh shells or constrained environments. Make the agent print which env vars are active before it runs tests, and prefer checked-in scripts only after the local path is proven.

Safe default

Localhost endpoints before code changes

Ask the CLI to prove SDK routing with one local operation before it edits application code. That prevents a successful unit test from hiding an accidental call to googleapis.com.

Copy-ready setup

Commands and prompts

Copy a prompt for your coding agent

Start LocalCloud

Give an agent one URL and have it start the local GCP sandbox.

Fetch https://local.cloud/ai/agents.md and follow the instructions to start LocalCloud on my machine. Install the LocalCloud CLI if it is missing, verify Docker, start or reuse LocalCloud, export emulator environment variables, and run one local GCP SDK/API smoke check. Do not ask for or use real GCP credentials.

Configure this repo

Have an agent wire an existing project to LocalCloud safely.

Set up this repository to use LocalCloud for local GCP development. First read https://local.cloud/ai/agents.md, then inspect this repo, identify the GCP services and SDK language, configure emulator environment variables, and run the narrowest integration test against localhost. Do not use real GCP credentials or production endpoints.

Configure internal CI

Have an agent add a permitted non-production LocalCloud CI workflow.

Read https://local.cloud/docs/licensing/ before changing this automation. Keep the workflow within the Public Preview License's non-production boundary. Propose the smallest change that starts LocalCloud, waits for readiness, exports emulator env vars, runs integration tests locally, and avoids real GCP secrets.
Codex CLI prompt
Use LocalCloud as the GCP runtime for this task. Fetch https://local.cloud/ai/agents.md, start or reuse the local Docker container, confirm emulator env vars in the shell you will use, then run one localhost SDK or API check before editing code. Never request real GCP credentials for this local validation.
Production boundary

Before production

Use LocalCloud for non-production development, testing, and CI under the Public Preview License, check each service's local boundaries, and validate against real Google Cloud before you deploy.

  • CLI installation, sandboxing, and approval behavior varies by Codex-compatible client.
  • LocalCloud validates local API and SDK behavior; release candidates still need real Google Cloud validation.
Related

Next steps

  • SDK examples — Use standard Google Cloud SDKs pointed at localhost.
  • Seed data — Load deterministic fixtures for repeatable agent and CI runs.
Desktop view