Guides
The CLI
tldw runs the same 100% local pipeline as the app, from your terminal. It's distributed on npm and works offline with Ollama (or any cloud key you bring).
Install
ffmpeg is required for audio extraction (yt-dlp and Whisper ship with the package):
Usage
tldw "<url-or-file>" [options]
The positional argument is a URL (YouTube, X, Vimeo, TikTok, … via yt-dlp) or a path to a local video/audio file. With no --skill, you get a Markdown note by default. A real example:
tldw "https://www.youtube.com/watch?v=IlqJqcl8ONE" --notes
? and &, which your shell (zsh) treats as special characters. Without quotes it fails before TLDW even runs — zsh: no matches found. Quoting the URL fixes it.ollama pull qwen2.5:14b-instruct), or use a cloud provider with --provider + a key (see API keys). Transcription is always local.Options
| Flag | Description |
|---|---|
--notes | Produce a Markdown note (default when no --skill is given). |
--skill <fmt> | Produce an agent skill: claude, codex, agents, cursor, or prompt. Combine with --notes for both. |
--provider <p> | ollama (default), openai, anthropic, gemini, or openrouter. |
--model <id> | Model id. Defaults per provider (e.g. qwen2.5:14b-instruct for Ollama). |
--key <key> | API key for a cloud provider (or use an env var — see below). Ollama needs none. |
--style <id> | Summary style: detailed (default), executive, or bullets. |
--whisper <model> | Transcription quality: tiny, base, small (default), medium, large-v3-turbo. |
--out <dir> | Output folder. Defaults to the current directory. |
--no-tags | Disable AI tagging (on by default). |
--transcript | Append the full transcript to the note. |
--json | Print the result(s) as JSON to stdout instead of plain paths. |
--quiet | Suppress progress (errors still go to stderr). |
-h, --help | Show help. |
--version | Show the version. |
API keys
Cloud providers read their key from --key or, if omitted, from an environment variable:
| Provider | Env var |
|---|---|
| OpenAI | OPENAI_API_KEY |
| Anthropic | ANTHROPIC_API_KEY |
| OpenRouter | OPENROUTER_API_KEY |
| Google Gemini | GEMINI_API_KEY |
Examples
# A Markdown note from a link (Ollama, offline) → printed path on stdout tldw "https://www.youtube.com/watch?v=IlqJqcl8ONE" # A Claude skill from a local file tldw lecture.mp4 --skill claude # Both a note AND a skill in one run, via Anthropic ANTHROPIC_API_KEY=sk-ant-… tldw "https://www.youtube.com/watch?v=IlqJqcl8ONE" --notes --skill claude --provider anthropic # Higher-accuracy transcription into a specific folder tldw talk.mp3 --provider ollama --whisper medium --out ~/Notes # Open the resulting note (paths print to stdout, so it composes) note=$(tldw "$URL") && open "$note" # Batch a list of links with a shell loop while read url; do tldw "$url" --out ~/Notes; done < links.txt
Output
Progress is written to stderr; the resulting file path(s) to stdout — so tldw pipes and scripts cleanly. With --json, stdout is a structured object instead:
{
"title": "Build a REST API in Python",
"results": [
{ "format": "notes", "path": "/…/2026-06-03 — Build a REST API.md", "tags": ["Tutorial", "Reference"] },
{ "format": "claudeSkill", "path": "/…/build-a-rest-api/SKILL.md", "tags": ["Backend", "API"] }
]
}Exit code is 0 when at least one output succeeds, 1 on failure, 2 on a usage error.
Troubleshooting
zsh: command not found: tldw(after installing) — npm installed it, but its global bin folder isn't on your PATH (common with nvm or a custom npm prefix). Check where it went and add it:
npm ls -g --depth=0 tldw-cli # confirms it's installed echo "$(npm prefix -g)/bin" # where the 'tldw' command lives # add that folder to your shell, then reload: echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.zshrc source ~/.zshrc which tldw
zsh: no matches found— wrap the URL in quotes (see Usage).- "tldw needs ffmpeg" — run
brew install ffmpeg. - Cloud provider error about a key — set the env var or pass
--key, or use--provider ollama. - Ollama errors — make sure Ollama is running and the model is pulled (
ollama pull qwen2.5:14b-instruct).