peepshow/ sinks/ gcs

Reel #46 Object storage

peepshow sink / gcs

Google Cloud StorageUpload frames and manifest to a GCS bucket.

Native `@google-cloud/storage` SDK with ADC — workload identity, user auth, or SA keys.

What it does

Upload every frame plus a `manifest.json` to a Google Cloud Storage bucket. Uses the native SDK with Application Default Credentials, so workload identity, `gcloud auth application-default login`, or an explicit service-account key all work without code changes.

When to reach for it

  • GKE / Cloud Run workloads using workload-identity federation — no keys in env
  • Local dev with `gcloud auth application-default login` — zero-config uploads
  • Native GCS features (uniform bucket-level access) instead of S3-compat

Install

npm i -g peepshow
npm i -g @google-cloud/storage

Use it

GCS_BUCKET=peepshow-archive \
peepshow ./clip.mp4 --sink gcs

Make it automatic

Register the sink once — every run fires it afterward. Scope by --when so it only runs for matching videos.

peepshow sinks add gcs
peepshow sinks add gcs --when extension=mp4,mov
peepshow sinks add gcs --when path=/Volumes/Work/

Configuration

  • GCS_BUCKET Target bucket name. required
  • GCS_PREFIX Object key prefix. Default `peepshow/`.
  • GCS_PROJECT_ID GCP project. Default reads from ADC / `GOOGLE_CLOUD_PROJECT`.
  • GCS_KEY_FILE Path to a service-account JSON key. Default reads from ADC.

Use with an LLM agent

Every peepshow sink reads its config from env vars and receives a single JSON payload on stdin. An LLM agent (Claude Code, Cursor, Windsurf, Gemini, Codex) can drive the Google Cloud Storage sink automatically when three things are true:

  • the env vars below are exported in the agent's shell (or a project .env it can load),
  • the peepshow CLI is on PATH — install with npm i -g peepshow,
  • a peepshow auto-sink is registered for the run (optional but recommended — makes invocation zero-argument).

1. Set the environment

# Add to ~/.zshrc, ~/.bashrc, or a project .env the agent can load
export GCS_BUCKET="..."

2. Register as an auto-sink

peepshow sinks add gcs
peepshow sinks add gcs --when extension=mp4,mov

3. Example LLM session

You → drop a .mov into Claude Code.

Claude → auto-invokes /peepshow:slides ./clip.mov. peepshow extracts frames + audio, the Google Cloud Storage sink forwards the run to the configured bucket / folder. Claude replies with a summary and a link to the created record.

The full transcript JSON is saved next to the frames in the manifest.

Write your own

A sink is any executable that reads the --emit json payload on stdin. Shell, Node, Python, Go — the spec's in docs/PLUGINS.md. Register persistent ones with peepshow sinks add-cmd 'your-command'.