Skip to main content

Gcs Datastore

@swamp/gcs-datastorev2026.04.28.4· 2d agoDATASTORES
01README

Store data in a Google Cloud Storage bucket with local cache synchronization. Provides distributed locking via GCS generation-based preconditions and bidirectional sync between a local cache directory and GCS.

Authentication

Uses Google Cloud Application Default Credentials (ADC) — no credentials in config. Provide credentials via one of:

  • Environment variable: GOOGLE_APPLICATION_CREDENTIALS pointing to a service account key JSON file
  • User credentials: gcloud auth application-default login
  • Attached service account on GCE, Cloud Run, or GKE

Required IAM Permissions

  • storage.buckets.get
  • storage.objects.create
  • storage.objects.get
  • storage.objects.delete
  • storage.objects.list

The predefined role roles/storage.objectAdmin covers all of these.

Usage

swamp datastore setup @swamp/gcs-datastore \
  --config '{"bucket": "my-bucket", "prefix": "swamp"}' --json
02Datastores1
Google Cloud Storageconfigurable
@swamp/gcs-datastoregcs.ts

Store data in a Google Cloud Storage bucket with local cache synchronization.

Config Fields

FieldTypeDescription
bucketstringGCS bucket name
prefix?stringObject name prefix within the bucket
projectId?stringGCP project ID (defaults to ADC project)
apiEndpoint?stringCustom API endpoint URL (for emulators like fake-gcs-server)
03Previous Versions13
2026.04.28.3Apr 28, 2026
2026.04.28.2Apr 28, 2026
2026.04.28.1Apr 28, 2026
2026.04.25.2Apr 25, 2026
2026.04.24.2Apr 24, 2026
2026.04.24.1Apr 24, 2026
2026.04.23.2Apr 23, 2026
2026.04.23.1Apr 22, 2026
2026.04.22.3Apr 22, 2026
2026.04.22.2Apr 22, 2026
2026.04.21.1Apr 21, 2026
2026.04.08.1Apr 8, 2026
2026.03.31.1Mar 31, 2026
04Stats
A
91 / 100
Downloads
2,247
Archive size
48.8 KB
Verified by Swamp
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types0/1missing
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels