Ask a YouTube channel anything it has covered. Answers are built from what the creator actually said. Every claim is footnoted with the moment it was said, and clicking one plays that second without leaving the page.
Transcripts are fetched per channel, chunked, and embedded into Postgres (pgvector, HNSW). Questions retrieve the nearest chunks for that channel; a similarity floor decides whether the content can answer at all, and answers must cite retrieved moments or they're discarded. Ungrounded prose is never served. Follow-up questions carry the conversation.
Stack: Next.js, TypeScript, Drizzle, Postgres + pgvector, any OpenAI-compatible LLM endpoint.
Requirements:
- Docker
- a YouTube Data API key
- an OpenRouter key (or any OpenAI-compatible endpoint).
git clone https://github.com/natnaelab/askthecreator && cd askthecreator
cp .env.example .env # fill in the keys
docker compose up -d --build # Postgres (pgvector) + app; migrations run on bootIndex a channel (newest 100 videos by default), then chat:
docker compose exec app npx tsx src/workers/ingest.ts @hubermanlab
# → http://localhost:3000/@hubermanlabRe-running ingest is safe. It resumes, refreshes metadata, and never re-fetches what it has.
Node 22 or newer.
npm install
docker compose up -d db
npm run db:migrate && npm test
npx tsx src/workers/ingest.ts @hubermanlab
npm run devYouTube serves captions readily to residential IPs and blocks datacenter IPs quickly. In practice: running on your own machine works; running on a VPS will hit walls. If you must run hosted, set PROXY_URL to a residential proxy. It's optional and off by default. Metadata (channel/video listings) uses the official Data API and is unaffected.
| Variable | Required | Purpose |
|---|---|---|
DATABASE_URL |
yes | Postgres with pgvector (docker compose up -d db provides one) |
YOUTUBE_API_KEY |
yes | Channel + video metadata (official Data API) |
EMBEDDING_API_KEY |
yes | Embeddings |
EMBEDDING_BASE_URL / _MODEL |
no | Embedding endpoint and model — defaults to OpenRouter's openai/text-embedding-3-small |
GENERATION_BASE_URL / _API_KEY / _MODEL |
yes | Answer generation, any OpenAI-compatible endpoint |
PROXY_URL |
no | Residential proxy for transcript fetching on hosted IPs |
SITE_URL |
no | Public origin of this instance |
RATE_LIMIT_PER_DAY |
no | Questions per visitor per day. Unset = unlimited; set it if the instance is public and runs on your keys |
