peepshow/ sinks/ firebase-storage

Reel #52 Object storage

peepshow sink / firebase-storage

Firebase StorageUpload frames and manifest to a Firebase Storage bucket.

REST-only — Firebase `v0` upload endpoint with pre-issued token or service-account JWT.

drop · process · firebase-storage

What it does

Push every frame plus a `manifest.json` to a Firebase Storage bucket via the `firebasestorage.googleapis.com/v0` REST endpoint. No SDK — authenticate with a pre-issued Firebase ID token / OAuth access token, or drop in a service-account JSON key and let the sink mint a token on the fly.

When to reach for it

  • Firebase-first apps that surface the same bucket to web / iOS / Android clients
  • Per-run uploads governed by Storage Security Rules on a user-scoped bucket
  • Short-lived CI tokens via `gcloud auth print-access-token` — zero SDK install

Install

npm i -g peepshow

Use it

FIREBASE_STORAGE_BUCKET=my-project.appspot.com \
GOOGLE_APPLICATION_CREDENTIALS=/etc/peepshow/sa.json \
peepshow ./clip.mp4 --sink firebase-storage

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 firebase-storage
peepshow sinks add firebase-storage --when extension=mp4,mov
peepshow sinks add firebase-storage --when path=/Volumes/Work/

Configuration

  • FIREBASE_STORAGE_BUCKET Target bucket, e.g. `my-project.appspot.com`. required
  • GOOGLE_APPLICATION_CREDENTIALS Path to a Google service-account JSON key. Required unless `FIREBASE_STORAGE_TOKEN` is set. required
  • FIREBASE_STORAGE_PATH_PREFIX Object key prefix. Default `peepshow/`.
  • FIREBASE_STORAGE_TOKEN Pre-issued Firebase ID token or OAuth access token. Bypasses JWT minting.
  • FIREBASE_STORAGE_API_URL Override the REST base URL. Default `https://firebasestorage.googleapis.com`.

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 Firebase 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 FIREBASE_STORAGE_BUCKET="..."
export GOOGLE_APPLICATION_CREDENTIALS="..."

2. Register as an auto-sink

peepshow sinks add firebase-storage
peepshow sinks add firebase-storage --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 Firebase 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'.