Terminal-first setup using Docker and localhost endpoints.
Claude Code local GCP sandbox
Claude Code is strongest when it can inspect a repository, run shell commands, and verify the narrowest failing path. LocalCloud gives that terminal workflow a local GCP surface: one Docker container, standard SDKs pointed at localhost, and no default GCP account or billing project.
Docker image: jaysen2apache/localcloud:latest.
Best for repo-aware SDK tests, Terraform checks, and troubleshooting loops.
Start from the repo, not from a blank prompt
Ask Claude Code to read the project, identify the Google Cloud SDKs and services in use, then fetch /ai/agents.md before it changes code. That sequence keeps LocalCloud as the runtime target instead of a generic cloud migration suggestion.
- Have Claude verify Docker and reuse an existing localcloud container when present.
- Export emulator variables into the exact shell or test runner it will use.
- Run one representative SDK operation before editing broader test suites.
Approve shell actions, but do not provide cloud secrets
Claude Code may request permission before running Docker or test commands. The safe path is to approve local Docker, curl, and localhost SDK checks while refusing requests for service-account keys, ADC setup, or production project IDs.
Commands and prompts
Use these snippets as starting points, then keep the checks scoped to localhost until you intentionally validate against real Google Cloud.
Read https://local.cloud/ai/agents.md, inspect this repository for Google Cloud SDK usage, start or reuse LocalCloud with Docker, export emulator env vars into this shell, and run the smallest local SDK smoke test. Do not ask for GCP credentials. docker pull jaysen2apache/localcloud:latest
docker volume create localcloud-data
docker run -d --name localcloud \
-p 127.0.0.1:24080-24092:24080-24092 \
-m 4g \
-v localcloud-data:/var/lib/localcloud \
jaysen2apache/localcloud:latest
eval "$(localcloud env)" Use the sandbox deliberately
- Claude Code is not a hosted isolation boundary by itself; LocalCloud isolates Google Cloud side effects, not arbitrary shell commands.
- If a test needs IAM, quota, latency, managed networking, or production-specific behavior, keep a real Google Cloud validation step.
Keep the agent on the supported path
- Compatibility matrix — Check current support boundaries before relying on a local-only test.
- Service catalog — Review every LocalCloud service, endpoint, and limitation.
- SDK examples — Use standard Google Cloud SDKs pointed at localhost.
- Seed data — Load deterministic fixtures for repeatable agent and CI runs.