{"_id":"@angusgee/tldw","name":"@angusgee/tldw","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@angusgee/tldw","version":"0.1.0","description":"TLDW - Too Long; Didn't Watch. Summarise YouTube videos in your terminal. Local-first, zero dependencies, bring your own OpenAI-compatible API key.","type":"module","license":"MIT","author":{"name":"Angus Girvan","url":"https://angusgee.dev"},"repository":{"type":"git","url":"git+https://github.com/angusgee/tldw.git"},"bin":{"tldw":"dist/cli.js"},"engines":{"node":">=18.17"},"scripts":{"build":"tsc","dev":"tsx src/cli.ts","test":"vitest run","typecheck":"tsc --noEmit"},"keywords":["youtube","summary","transcript","tldw","tldr","cli","llm","ai"],"devDependencies":{"@types/node":"^26.4.1","tsx":"^4.23.13","typescript":"^7.0.2","vitest":"^5.0.0"},"gitHead":"25287fb9f2e9ae2292c2ab6a1b2fc9427493cd14","_id":"@angusgee/tldw@0.1.0","bugs":{"url":"https://github.com/angusgee/tldw/issues"},"homepage":"https://github.com/angusgee/tldw#readme","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-dPymBgJ8vSaYRIRHIpaTr7DR+WYA57Bawzp1ZJozt1YG3njx1IptHGwiuKxsXxjGE3L8UhI7oDddgK3OHBdGow==","shasum":"5010b0ced1ed41a5fd5fd11096274df1829f1795","tarball":"https://registry.npmjs.org/@angusgee/tldw/-/tldw-0.1.0.tgz","fileCount":20,"unpackedSize":38763,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAmmnh5sYj16PsEsdz+/DeIHjzze/UWjIqHRTuZ+NH4bAiBKT9YozJVpVmbXI+Faq97/LCipDimST5VwA1+RugYjGw=="}]},"_npmUser":{"name":"angusgee","email":"maltawebdev@gmail.com"},"directories":{},"maintainers":[{"name":"angusgee","email":"maltawebdev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tldw_0.1.0_1788688137220_0.4370484223712885"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-06T09:48:57.013Z","0.1.0":"2026-09-06T09:48:57.358Z","modified":"2026-09-06T09:48:57.565Z"},"maintainers":[{"name":"angusgee","email":"maltawebdev@gmail.com"}],"description":"TLDW - Too Long; Didn't Watch. Summarise YouTube videos in your terminal. Local-first, zero dependencies, bring your own OpenAI-compatible API key.","homepage":"https://github.com/angusgee/tldw#readme","keywords":["youtube","summary","transcript","tldw","tldr","cli","llm","ai"],"repository":{"type":"git","url":"git+https://github.com/angusgee/tldw.git"},"author":{"name":"Angus Girvan","url":"https://angusgee.dev"},"bugs":{"url":"https://github.com/angusgee/tldw/issues"},"license":"MIT","readme":"# TLDW: Too Long; Didn't Watch\n\n[![CI](https://github.com/angusgee/tldw/actions/workflows/ci.yml/badge.svg)](https://github.com/angusgee/tldw/actions/workflows/ci.yml)\n\nSummarise YouTube videos in your terminal. Local-first, **zero runtime dependencies**, bring your own OpenAI-compatible API key.\n\n![tldw summarising a YouTube video in the terminal](https://raw.githubusercontent.com/angusgee/tldw/main/assets/demo.gif)\n\n## Why\n\nMost videos are a two-minute read stretched over twenty minutes of footage. TLDW fetches the transcript and gives you the TL;DR, or the whole thing rewritten as clean, readable prose.\n\n- **Local-first**: runs entirely on your machine, on your own IP and your own LLM API key. No accounts, no telemetry, no middleman server.\n- **Zero dependencies**: the published package ships with no runtime dependencies at all.\n- **Provider-agnostic**: works with any OpenAI-compatible API. Use [NeuralWatt](https://portal.neuralwatt.com/) (cheap open models, energy-based pricing), [OpenRouter](https://openrouter.ai/), or anything else that speaks `/chat/completions`.\n\n## Install\n\n```bash\nnpm install -g @angusgee/tldw\n```\n\nRequires Node 18.17+. Installs the `tldw` command.\n\n## Configure\n\nTLDW reads three settings. Only the API key is required:\n\n```bash\nTLDW_API_KEY=sk-...                            # required for summaries\nTLDW_BASE_URL=https://api.neuralwatt.com/v1    # default; any OpenAI-compatible URL works\nTLDW_MODEL=deepseek-v4-flash                   # default, recommended - fast, cheap, smart\n```\n\nThere are three ways to supply them. If the same setting appears in more than one place, real environment variables win, then a local `.env`, then the global file.\n\n**Option 1: global config file (recommended).** Create `~/.tldw.env` once and `tldw` works from any directory:\n\n```bash\n# macOS / Linux\necho \"TLDW_API_KEY=sk-...\" > ~/.tldw.env\n```\n\n```powershell\n# Windows PowerShell\nSet-Content \"$HOME\\.tldw.env\" \"TLDW_API_KEY=sk-...\"\n```\n\n**Option 2: local `.env` file.** Put a `.env` in the directory you run `tldw` from. Handy for trying a different provider or model in one project without touching your global config:\n\n```bash\nTLDW_API_KEY=sk-or-...\nTLDW_BASE_URL=https://openrouter.ai/api/v1\nTLDW_MODEL=anthropic/claude-haiku-4-5\n```\n\n**Option 3: environment variables.** Standard shell configuration, and it overrides both files:\n\n```bash\n# macOS / Linux (add to your shell profile to persist)\nexport TLDW_API_KEY=sk-...\n```\n\n```powershell\n# Windows PowerShell (persists for your user account)\n[Environment]::SetEnvironmentVariable(\"TLDW_API_KEY\", \"sk-...\", \"User\")\n```\n\n## Use\n\n```bash\ntldw <url-or-video-id>              # stream a TL;DR summary\ntldw <url> --full                   # also rewrite the full transcript as clean prose\ntldw <url> --transcript             # raw transcript only - no LLM call, no key needed\ntldw <url> --save                   # write .json/.txt/.md files to ./outputs\ntldw <url> --json                   # machine-readable output for piping\ntldw <url> --lang de                # prefer a caption language\ntldw <url> --model x --base-url y   # per-run provider overrides\n```\n\nQuote the URL. YouTube links often carry extra parameters (`&t=3s`, `&list=...`), and an unquoted `&` is a shell operator in every shell — PowerShell and bash will split the command and background half of it before tldw ever runs. Quoted, tldw handles any URL shape and extracts the video id itself.\n\n## How it gets the transcript\n\nTwo layers, tried in order:\n\n1. YouTube's InnerTube player API (Android client), the same data the apps use\n2. Caption tracks from the watch page's embedded player response\n\nBoth are plain `fetch` calls from your machine, on your IP, for the single video you asked about. TLDW runs no external programs, scrapes nothing in bulk, and writes nowhere but your own disk, and then only with `--save`.\n\n## Disclaimer\n\nTLDW is an independent open-source tool for personal use. It is not affiliated with or endorsed by YouTube or Google. It accesses only publicly available caption data, for individual videos, at your explicit request. Whether that use is permitted under YouTube's Terms of Service in your situation is your responsibility, as with tools like yt-dlp. Summaries are generated by whichever LLM you configure and may contain mistakes.\n\n## Development\n\n```bash\nnpm install\nnpm test          # vitest unit tests\nnpm run dev -- <url> --transcript\nnpm run build\n```\n\nMIT © [Angus Girvan](https://angusgee.dev)\n","readmeFilename":"README.md","_rev":"1-4c80a094c001b477998ced4ff395de37"}