What it does
[Apache Cassandra](https://cassandra.apache.org/) is the distributed wide-column database; [DataStax Astra](https://www.datastax.com/products/datastax-astra) is the managed serverless flavour. Both speak [Stargate](https://stargate.io), the data-plane REST gateway. This sink writes one row per peepshow run via `POST <baseUrl>/v2/keyspaces/<keyspace>/<table>` with a flat JSON body — no native driver, no CQL parser, no client-side schema. Auth is the standard `X-Cassandra-Token` header (a Stargate session token for Astra, optional for local Stargate with auth disabled). The destination table must already exist with the documented CQL schema — the REST data-plane doesn't expose DDL — but the doc page captures the exact `CREATE TABLE` to paste once at setup time.
When to reach for it
- Stream peepshow runs into the same Cassandra cluster your application already writes to
- Use DataStax Astra's free tier as a hosted archive for every video an agent processes
- Pair with a Cassandra-backed search layer (DSE Search, Stargate GraphQL) without a separate ingestion service
Install
npm i -g peepshowUse it
CASSANDRA_URL="https://abc-region.apps.astra.datastax.com/api/rest" \
CASSANDRA_KEYSPACE="peepshow" \
CASSANDRA_TOKEN="$(< ~/.astra-token)" \
peepshow ./demo.mp4 --sink cassandraMake it automatic
Register the sink once — every run fires it afterward. Scope by --when so it only runs for matching videos.
peepshow sinks add cassandra
peepshow sinks add cassandra --when extension=mp4,mov
peepshow sinks add cassandra --when path=/Volumes/Work/Configuration
CASSANDRA_URLStargate base URL. Astra: `https://<id>-<region>.apps.astra.datastax.com/api/rest`. Local: `http://localhost:8082`. requiredCASSANDRA_KEYSPACETarget keyspace. Must already exist. requiredCASSANDRA_TABLETable name within the keyspace. Default `peepshow_runs`. Must already exist (see schema in docs).CASSANDRA_TOKENStargate session token sent as `X-Cassandra-Token`. Required for Astra; optional for self-hosted Stargate with auth disabled.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 Cassandra / Astra 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 CASSANDRA_URL="..."
export CASSANDRA_KEYSPACE="..."2. Register as an auto-sink
peepshow sinks add cassandra
peepshow sinks add cassandra --when extension=mp4,mov3. Example LLM session
You → drop a
.movinto Claude Code.Claude → auto-invokes
/peepshow:slides ./clip.mov. peepshow extracts frames + audio, theCassandra / Astrasink 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'.