What it does
[Snowflake](https://www.snowflake.com/) is the cloud data warehouse most enterprises run their analytics on. This sink writes one row per peepshow run to a Snowflake table via the [SQL API](https://docs.snowflake.com/en/developer-guide/sql-api/intro) (`POST /api/v2/statements`). Auth is a [programmatic access token (PAT)](https://docs.snowflake.com/en/user-guide/programmatic-access-tokens) sent as a Bearer header — no driver to install, no key-pair JWT, no clock skew to debug. The first write auto-creates the table with the standard peepshow schema (`run_id · title · frames · duration · transcript · thumbnail_url · strategy · tags VARIANT · created_at`); subsequent runs append. Tags are stored as `VARIANT` so they're queryable with Snowflake's native JSON functions.
When to reach for it
- Pipe peepshow runs into the same Snowflake schema your product analytics already lives in
- Build dashboards over run history with Snowsight, Tableau, Looker, or any other Snowflake-aware BI
- Hand a write-only PAT to a CI job that records every QA video into a shared analytics warehouse
Install
npm i -g peepshowUse it
SNOWFLAKE_ACCOUNT="xy12345.us-east-1" \
SNOWFLAKE_TOKEN="$(< ~/.snowflake-pat)" \
SNOWFLAKE_DATABASE="ANALYTICS" \
peepshow ./demo.mp4 --sink snowflakeMake it automatic
Register the sink once — every run fires it afterward. Scope by --when so it only runs for matching videos.
peepshow sinks add snowflake
peepshow sinks add snowflake --when extension=mp4,mov
peepshow sinks add snowflake --when path=/Volumes/Work/Configuration
SNOWFLAKE_ACCOUNTAccount identifier including region, e.g. `xy12345.us-east-1` or `xy12345.privatelink`. requiredSNOWFLAKE_TOKENProgrammatic access token (PAT). Generated under User → Security → Programmatic access tokens in the Snowflake console. requiredSNOWFLAKE_DATABASETarget database. Required. requiredSNOWFLAKE_SCHEMASchema name. Default `PUBLIC`.SNOWFLAKE_TABLETable name. Default `PEEPSHOW_RUNS`. Auto-created on first write.SNOWFLAKE_WAREHOUSEOptional compute warehouse to bill the query to.PEEPSHOW_FRAME_BASE_URLWhen set, the first frame URL is written to the `thumbnail_url` column.
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 Snowflake sink automatically when three things are true:
- the env vars below are exported in the agent's shell (or a project
.envit can load), - the
peepshowCLI is onPATH— install withnpm 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 SNOWFLAKE_ACCOUNT="..."
export SNOWFLAKE_TOKEN="..."
export SNOWFLAKE_DATABASE="..."2. Register as an auto-sink
peepshow sinks add snowflake
peepshow sinks add snowflake --when extension=mp4,mov3. Example LLM session
You → drop a
.movinto Claude Code.Claude → auto-invokes
/peepshow:slides ./clip.mov. peepshow extracts frames + audio, theSnowflakesink forwards the run to the configured database. Claude replies with a summary and a link to the created record.
The transcript rides along in the payload whenever the audio pass transcribes successfully.
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'.