gcpsim reference

Reference tables for gcpsim CLI commands and flags, environment variables, GCS and Pub/Sub endpoints, and exit codes.

CLI commands and flags

Command or flag Default Description
gcpsim --version none Print gcpsim version string (for example gcpsim 0.2.1 (floci-gcp 0.11.0)) and exit 0.
gcpsim --help none Print usage instructions and exit 0.
gcpsim serve | start foreground Run the local GCP emulator in the foreground.
--host <addr> 127.0.0.1 Bind address for the HTTP/gRPC server (use 0.0.0.0 only when network access is explicitly desired).
--port <port> 4588 TCP port shared by REST and gRPC listeners in open mode.
--project <id> gcpsim-local Default Google Cloud project ID.
--data-dir <path> in-memory Directory for durable GCS and Pub/Sub state across restarts.
--auth open | enforce open Select open mode or enforced OAuth Bearer token and IAM permission checks.
--auth-config <file> unset Path to the JSON authentication and IAM policy configuration file for enforce mode.

Environment variables

Variable Default Purpose
SIM_AUTH open Set to enforce to enable OAuth Bearer and IAM policy checks (overridden by --auth).
SIM_AUTH_CONFIG unset Path to the JSON auth configuration file (overridden by --auth-config).
STORAGE_EMULATOR_HOST http://127.0.0.1:4588 Standard Google Cloud Storage client library emulator host variable.
PUBSUB_EMULATOR_HOST 127.0.0.1:4588 Standard Google Cloud Pub/Sub client library emulator host:port variable.
FLOCI_GCP_SERVICES_<SERVICE>_MOCK true Keep Docker-backed services in mock mode by default.

HTTP service endpoints

Service Path pattern on 127.0.0.1:4588 Operations
Health check GET /health Returns emulator readiness status.
Cloud Storage (GCS) /storage/v1/b and /upload/storage/v1/b/<bucket>/o Bucket create/list/get/delete, object upload (multipart/resumable/media), download, metadata, and prefix/delimiter listing.
Cloud Pub/Sub /v1/projects/<project>/topics and /v1/projects/<project>/subscriptions Topic create/get/list/delete, publish, subscription create/get/list/delete, pull, acknowledge, and modifyAckDeadline.

Exit codes

Code Meaning
0 Clean server shutdown or --version / --help output.
2 Invalid CLI input or invalid auth configuration.
3 Emulator startup failure.