Local-first toolkit for turning public YouTube channels into a searchable knowledge base.
Project description
YTtools
Local-first, open-source toolkit for turning any public YouTube channel, playlist, or video into a searchable, queryable knowledge base.
YTtools runs as a single Python process and opens a browser UI at http://localhost:8765. No cloud services, no API keys required out of the box, no telemetry. Everything stays on your machine.
What it does
Eight tools share one local storage layer (SQLite):
- Fetch — download transcripts and metadata from public YouTube URLs.
- Search — full-text search across every transcript, with jump-links to the original timestamps.
- Summarize — structured digests of a channel: topics, recurring themes, guests, posting cadence.
- Compare — side-by-side analysis of channels covering the same beat.
- Quotes — extract quotable lines, classified by type.
- Timeline — topic-over-time view across a channel.
- Blog — convert a single video into a structured Markdown article with timestamp citations.
- Ask — local retrieval-augmented question answering over a channel, with cited answers.
All eight tools work today. Ask runs as local RAG (transcripts are embedded with Ollama).
Why local-first
- Privacy — transcripts, queries, and generated content never leave your machine.
- No subscriptions — the default AI backend is a local Ollama install. No metered API.
- No lock-in — your data is a single SQLite file you own.
Install
pipx install yttools
yttools serve
The web UI opens automatically at http://localhost:8765. Plain pip install yttools works too if you prefer to manage the environment yourself.
yt-dlp is installed as a dependency. For the AI tools, install Ollama and pull a model (for example ollama pull llama3.1:8b), or supply an API key for a hosted provider in Settings.
Quick start
# Pull a channel's transcripts and metadata into the local database
yttools fetch https://www.youtube.com/@TED
# Search across everything fetched
yttools search "machine learning" --limit 20
# Launch the browser UI
yttools serve
YouTube cookies (when fetch is blocked)
YouTube sometimes answers an unauthenticated request with Sign in to confirm you're not a bot. Fetch already retries the gated request with a short backoff
and pauses briefly between requests, which clears most intermittent cases. If it
keeps happening, give YTtools cookies so its requests are authenticated. You can
set this on the Settings page under "YouTube fetching", or from the CLI.
There are two ways to supply cookies. If you set both, the browser source wins.
Option A — read cookies from your browser
Point YTtools at a browser you are already logged into YouTube with. Nothing to export; yt-dlp reads the cookies directly.
yttools config set youtube.cookies_from_browser firefox
Supported values: chrome, chromium, firefox, safari, brave, edge,
opera, vivaldi. Notes:
- Firefox tends to be the most reliable. Recent Chrome versions encrypt cookies in a way that can block extraction, and on macOS Chrome may need to be fully quit (it locks its cookie database while running).
- The browser must have an active, logged-in YouTube session.
Option B — use an exported cookies.txt file
Export your YouTube cookies once to a Netscape-format cookies.txt, then point
YTtools at the file.
-
Install a "cookies.txt" exporter browser extension (search your browser's add-on store for one that exports the Netscape format).
-
Log into YouTube, then use the extension to export cookies for
youtube.comto a file, for example~/.yttools/cookies.txt. -
Tell YTtools where it is:
yttools config set youtube.cookies_file ~/.yttools/cookies.txt
A cookies.txt holds your logged-in YouTube session. Treat it like a password:
keep it outside any repository and do not share it. Cookies expire, so re-export
the file if the bot check returns.
Tuning
# Seconds yt-dlp waits between requests (default 1.0; set 0 to disable)
yttools config set youtube.sleep_requests 1.5
# Parallel downloads (default 2; lower values are less likely to be flagged)
yttools config set fetch.concurrent_videos 1
AI features
The AI-backed tools default to a local Ollama model, so they work offline with no account. If you prefer a hosted model, three are supported (Anthropic, OpenAI, Gemini): add an API key on the Settings page or via the matching environment variable, then use "Test connection" to confirm it and load the model picker. Keys resolve in this order: config file value, then environment variable. Without a key, that provider stays disabled. See docs/llm-providers.md for the supported providers and their models.
Roadmap
Releases are tracked on GitHub milestones. v0.1.0 covers the storage layer, Fetch, and Search. v0.2.0 adds Summarize, Quotes, and Blog. v0.3.0 adds Compare, Timeline, and Ask.
Contributing
Bug reports, feature requests, and Pull Requests are welcome. See CONTRIBUTING.md for setup, coding standards, and the Contributor License Agreement process.
License
Dual-licensed:
- AGPL-3.0 for open-source use. If you modify YTtools or use it to provide a network service, you must publish your changes under AGPL-3.0.
- Commercial license for organizations whose use is incompatible with AGPL-3.0.
Contributors sign a Contributor License Agreement on their first PR.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yttools-0.3.0.tar.gz.
File metadata
- Download URL: yttools-0.3.0.tar.gz
- Upload date:
- Size: 119.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
082a0c999f6062453db16a530cceeb3948f0846b977757edd9e6ca767012a9c5
|
|
| MD5 |
af8cbab738d7b69e837031cf34fc1507
|
|
| BLAKE2b-256 |
fa4665f9f2f665c6273e69be5d836d7ee0e2a6cb1f194ddd8aa97ecfd0854bc5
|
Provenance
The following attestation bundles were made for yttools-0.3.0.tar.gz:
Publisher:
release.yml on nicholsbill/YTtools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yttools-0.3.0.tar.gz -
Subject digest:
082a0c999f6062453db16a530cceeb3948f0846b977757edd9e6ca767012a9c5 - Sigstore transparency entry: 1625520469
- Sigstore integration time:
-
Permalink:
nicholsbill/YTtools@ae2cadc3c036d08b5712e50e48dc2d29bc3156dd -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/nicholsbill
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ae2cadc3c036d08b5712e50e48dc2d29bc3156dd -
Trigger Event:
push
-
Statement type:
File details
Details for the file yttools-0.3.0-py3-none-any.whl.
File metadata
- Download URL: yttools-0.3.0-py3-none-any.whl
- Upload date:
- Size: 117.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32deb87068acd37fb6aa6ca2f0aa16afa4dabe7e44175405955cd855ce1c324e
|
|
| MD5 |
29899e9e38ab0ec5817d7ab6c6548741
|
|
| BLAKE2b-256 |
52b80f9b83281c62066945c4a6938227102f9397bb03213b1424dad82b75875f
|
Provenance
The following attestation bundles were made for yttools-0.3.0-py3-none-any.whl:
Publisher:
release.yml on nicholsbill/YTtools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yttools-0.3.0-py3-none-any.whl -
Subject digest:
32deb87068acd37fb6aa6ca2f0aa16afa4dabe7e44175405955cd855ce1c324e - Sigstore transparency entry: 1625520494
- Sigstore integration time:
-
Permalink:
nicholsbill/YTtools@ae2cadc3c036d08b5712e50e48dc2d29bc3156dd -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/nicholsbill
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ae2cadc3c036d08b5712e50e48dc2d29bc3156dd -
Trigger Event:
push
-
Statement type: