Local GCP.
Zero cost.
Zero restrictions.
Fast, free, open-source GCP emulator built with Quarkus Native. No GCP project, no billing account, no auth token.
Fast, free, open-source GCP emulator built with Quarkus Native. No GCP project, no billing account, no auth token.
No project ID, no service account, no billing account. Every service fully unlocked.
Runs a Docker container
floci-gcp is built with Quarkus Native, the same stack as the rest of the suite. Starts in 24ms, single Docker image, all 22 services on one port.
No GCP account, no service account JSON. Just Docker and gcloud.
brew install floci-io/floci/flocifloci gcp starteval $(floci gcp env) # exports STORAGE_EMULATOR_HOST, # PUBSUB_EMULATOR_HOST, FIRESTORE_EMULATOR_HOST, # DATASTORE_EMULATOR_HOST, SECRET_MANAGER_EMULATOR_HOST
# Create a bucket gcloud storage buckets create gs://my-bucket # Write a file and upload it echo "No billing alert? Must be floci. ☁️" \ > hello-floci.txt gcloud storage cp hello-floci.txt \ gs://my-bucket/hello-floci.txt # Download it back and read it gcloud storage cp \ gs://my-bucket/hello-floci.txt \ hello-back.txt cat hello-back.txt
# Check status and server health floci gcp status # List enabled services floci gcp services # View logs floci gcp logs # Stop the emulator floci gcp stop # Export env for selected services only eval $(floci gcp env --service gcs,pubsub)
floci gcp start --persist ./data # state survives container restarts
floci gcp doctor # checks Docker, gcloud, connectivity
Point your existing GCP client libraries at localhost:4588. No code changes beyond the endpoint.
# pip install google-cloud-storage import os from google.cloud import storage os.environ["STORAGE_EMULATOR_HOST"] = "http://localhost:4588" client = storage.Client(project="floci-local") # create a bucket and upload a file bucket = client.create_bucket("my-bucket") blob = bucket.blob("data/hello.txt") blob.upload_from_string("hello from floci-gcp!") # list objects in the bucket for b in client.list_blobs("my-bucket"): print(b.name, b.size) # download and read back print(blob.download_as_text())
# set endpoint override export CLOUDSDK_API_ENDPOINT_OVERRIDES_STORAGE=\ http://localhost:4588/ export CLOUDSDK_CORE_PROJECT=floci-local # create a bucket gcloud storage buckets create gs://my-bucket # upload a file echo "hello from floci-gcp!" > hello.txt gcloud storage cp hello.txt gs://my-bucket/hello.txt # list objects gcloud storage ls gs://my-bucket # download it back gcloud storage cp gs://my-bucket/hello.txt -
# pip install google-cloud-pubsub import os from google.cloud import pubsub_v1 os.environ["PUBSUB_EMULATOR_HOST"] = "localhost:4588" project = "floci-local" publisher = pubsub_v1.PublisherClient() subscriber = pubsub_v1.SubscriberClient() # create topic and subscription topic = publisher.topic_path(project, "my-topic") publisher.create_topic(request={"name": topic}) sub = subscriber.subscription_path(project, "my-sub") subscriber.create_subscription( request={"name": sub, "topic": topic} ) # publish a message future = publisher.publish(topic, b"hello from floci-gcp!") print("Published: " + str(future.result())) # pull and acknowledge resp = subscriber.pull( request={"subscription": sub, "max_messages": 1} ) for msg in resp.received_messages: print(msg.message.data.decode()) subscriber.acknowledge( request={"subscription": sub, "ack_ids": [msg.ack_id]} )
// npm install @google-cloud/pubsub process.env.PUBSUB_EMULATOR_HOST = 'localhost:4588'; const { PubSub } = require('@google-cloud/pubsub'); const pubsub = new PubSub({ projectId: 'floci-local' }); async function run() { const [topic] = await pubsub .createTopic('my-topic'); const [sub] = await topic .createSubscription('my-sub'); // publish a message const msgId = await topic.publishMessage({ data: Buffer.from('hello from floci-gcp!'), }); console.log('Published: ' + msgId); // receive one message sub.on('message', msg => { console.log(msg.data.toString()); msg.ack(); sub.removeAllListeners(); }); } run();
# pip install google-cloud-firestore import os from google.cloud import firestore os.environ["FIRESTORE_EMULATOR_HOST"] = "localhost:4588" db = firestore.Client(project="floci-local") # write a document ref = db.collection("users").document("alice") ref.set({"name": "Alice", "score": 42}) # read it back doc = ref.get() print(doc.to_dict()) # query with a filter for doc in ( db.collection("users") .where("score", ">=", 40) .stream() ): print(doc.id, doc.to_dict())
// npm install @google-cloud/firestore process.env.FIRESTORE_EMULATOR_HOST = 'localhost:4588'; const { Firestore } = require('@google-cloud/firestore'); const db = new Firestore({ projectId: 'floci-local' }); async function run() { // write a document const ref = db.collection('users').doc('alice'); await ref.set({ name: 'Alice', score: 42, active: true }); // read it back const doc = await ref.get(); console.log(doc.data()); // query with a filter const snap = await db.collection('users') .where('score', '>=', 40).get(); snap.forEach(d => console.log(d.id, d.data())); } run();
# pip install google-cloud-secret-manager import os from google.cloud import secretmanager os.environ["SECRETMANAGER_EMULATOR_HOST"] = \ "localhost:4588" client = secretmanager.SecretManagerServiceClient() parent = "projects/floci-local" # create a secret secret = client.create_secret(request={ "parent": parent, "secret_id": "db-password", "secret": {"replication": {"automatic": {}}}, }) # store the value client.add_secret_version(request={ "parent": secret.name, "payload": {"data": b"super-secret-value"}, }) # read the latest version version = secret.name + "/versions/latest" resp = client.access_secret_version(request={"name": version}) print(resp.payload.data.decode())
# set project export CLOUDSDK_CORE_PROJECT=floci-local # create a secret gcloud secrets create db-password \ --replication-policy automatic # store the value echo -n "super-secret-value" | \ gcloud secrets versions add db-password \ --data-file=- # read the latest version gcloud secrets versions access latest \ --secret db-password
The same design philosophy as floci and floci-az: native speed, zero friction, real compatibility.
Cloud Storage, Pub/Sub, Firestore, Datastore, Secret Manager, IAM, Managed Kafka, Cloud Tasks, Cloud Run, Cloud SQL, Cloud Functions, Cloud KMS, Cloud Logging, Cloud Monitoring, Cloud Scheduler, GKE, and Operations — every one free and unlocked. Star the repo to follow along and open an issue if there's a service your team needs.