Skip to main content

Gcs Datastore

@swamp/gcs-datastorev2026.07.09.2· 7d 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. Features shard-first indexing with per-model partition shards under _index/ as the source of truth (v2 repos skip the monolithic index upload entirely), commitSeq-based zero-diff fast path, two-phase sync to narrow the global-lock critical section, SHA-256 content hashing, per-path dirty tracking, namespace-scoped sync for multi-repo shared datastores, configurable transfer concurrency, and configurable per-request timeout.

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)
pullConcurrency?numberMaximum concurrent GCS downloads during pull. Default: 50
pushConcurrency?numberMaximum concurrent GCS uploads during push. Default: 25
requestTimeoutMs?numberPer-request timeout in milliseconds. Default: 30000.
03Previous Versions19
2026.07.09.1Jul 9, 2026
2026.07.08.3Jul 8, 2026

Modified 1 datastores

2026.07.08.2Jul 8, 2026
2026.07.08.1Jul 8, 2026
2026.07.02.1Jul 2, 2026
2026.07.01.1Jul 1, 2026
2026.06.30.2Jun 30, 2026
2026.06.30.1Jun 29, 2026
2026.06.26.1Jun 26, 2026
2026.06.24.1Jun 24, 2026
2026.06.05.1Jun 5, 2026
2026.06.03.2Jun 3, 2026
2026.06.03.1Jun 3, 2026
2026.05.26.1May 26, 2026
2026.05.25.1May 25, 2026
2026.05.24.1May 24, 2026

Modified 1 datastores

2026.05.15.3May 15, 2026
2026.05.15.2May 15, 2026
2026.05.15.1May 15, 2026
04Stats
A
100 / 100
Downloads
20,094
Archive size
88.5 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 types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels