Skip to main content

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.

PyPI CI License: AGPL-3.0

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.

  1. Install a "cookies.txt" exporter browser extension (search your browser's add-on store for one that exports the Netscape format).

  2. Log into YouTube, then use the extension to export cookies for youtube.com to a file, for example ~/.yttools/cookies.txt.

  3. 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

yttools-0.2.0.tar.gz (116.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yttools-0.2.0-py3-none-any.whl (115.2 kB view details)

Uploaded Python 3

File details

Details for the file yttools-0.2.0.tar.gz.

File metadata

  • Download URL: yttools-0.2.0.tar.gz
  • Upload date:
  • Size: 116.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for yttools-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f0276f007c3ab1562f37c0de4e9c5d7a47437847d502df888f00610692dec778
MD5 199a52b17b3866035dca7c3ce9635879
BLAKE2b-256 818cd8c313778e90065d2ce6b53bb06a263f894941cf9b0bb68ee3ceb2eaa3e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for yttools-0.2.0.tar.gz:

Publisher: release.yml on nicholsbill/YTtools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file yttools-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: yttools-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 115.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for yttools-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f397bd88e9ee1ae110aedea591a49ccf5a029917824a95764bb379cb17b3f8c6
MD5 a2a31a69c5f7368ce8185eff67e2f77a
BLAKE2b-256 37cd9e5903634328ca008dbd54ee5fb29e7a9cf1693a48845edb40c138384d8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for yttools-0.2.0-py3-none-any.whl:

Publisher: release.yml on nicholsbill/YTtools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page