Convert YouTube videos, playlists, and web pages into Obsidian markdown notes using LLMs
Project description
notegen
Convert YouTube videos, playlists, and web pages into structured, domain-expert-level Obsidian notes using LLMs.
Features
Notes quality
- Deep coverage — Full lecture-style notes with mechanisms, intuitions, worked examples, and gotchas. Not summaries.
- Rich formatting — Tables, MathJax, Mermaid diagrams, code blocks, callouts, and wikilinks generated automatically.
- Obsidian-native — YAML frontmatter,
[[wikilinks]], and> [!TIP]callouts out of the box.
Input sources
- YouTube videos — Transcript-based, chapter-aware note structure.
- YouTube playlists — Per-video notes with an
index.mdand optional topic subfolders. - Web pages — Same-domain recursive crawl up to configurable depth and page limits.
- Text files / stdin — Any plain text or markdown file piped in or passed by path.
Tooling
- Interactive mode — Guided wizard for one-off note generation without memorizing flags.
- Watch mode — Monitors a directory and generates notes for every new text file dropped in.
- Prompt templates — Named styles (
--template code,--template theory) defined in config. - Export — Generate PDF, HTML, or DOCX alongside the markdown note.
- Multi-language — Notes in any language via
--lang(ISO 639-1 code).
Reliability
- Multi-provider — Any LiteLLM-supported model: Groq, Gemini, Anthropic, OpenAI, Ollama, and more.
- Key rotation — Multiple API keys per provider; notegen picks one at random per request.
- Rate-limit handling — Exponential backoff with
Retry-Afterheader awareness viatenacity. - Caching — Notes are cached by URL and model; re-runs skip the LLM call unless forced.
- Rich dashboard — Real-time progress, token count, and cost estimate per run.
Quick start
Installation
# Recommended
uv tool install notegen
# Or via pip
pip install notegen
Setup
Run the interactive setup wizard to configure your provider and API key:
notegen setup
Basic usage
# Auto-detect source type (video, playlist, web, or file)
notegen https://www.youtube.com/watch?v=dQw4w9WgXcQ
# Interactive guided mode
notegen interactive
# Crawl a documentation site and export to PDF
notegen web https://docs.python.org/3/ --export pdf
# Process a playlist, skip videos already converted
notegen playlist <playlist_url> --incremental
Commands
| Command | Description |
|---|---|
notegen <url> |
Auto-detect type and generate notes |
notegen video <url> |
Single YouTube video |
notegen playlist <url> |
Full YouTube playlist |
notegen web <url> |
Web page or site crawl |
notegen text <file> |
Text file or stdin (-) |
notegen interactive |
Guided note-generation wizard |
notegen watch <dir> |
Watch directory for new files |
notegen setup |
Interactive first-run configuration |
notegen doctor |
Check environment and LLM connectivity |
notegen config init |
Create default config file |
notegen config open |
Open config in system editor |
notegen config show |
Print current settings (keys masked) |
notegen config validate |
Validate config and report errors |
notegen cache clear |
Delete all local cache entries |
Common flags
These flags apply to video, playlist, web, text, and auto:
| Flag | Description |
|---|---|
-o, --output-dir <path> |
Override output directory |
-m, --model <str> |
Override LLM model string |
-n, --dry-run |
Estimate cost, skip LLM calls |
-v, --verbose |
Show detailed logs |
--lang <code> |
Target language (e.g. en, es, hi) |
-t, --template <name> |
Apply named prompt style from config |
--export <fmt> |
Export to pdf, html, or docx |
--toc |
Insert a table of contents after the title |
--no-cache |
Skip cache read and write |
--no-mermaid |
Omit Mermaid diagram instructions |
--incremental |
Skip files that already exist (playlist) |
Configuration
Config file location:
- Linux / macOS —
~/.config/notes-gen/config.yaml - Windows —
%USERPROFILE%\.config\notes-gen\config.yaml
Run notegen config init to create a default file, or notegen setup for guided configuration.
Key options
# LiteLLM model string — provider/model-name
model: groq/llama-3.3-70b-versatile
# Where notes are written
output_dir: ~/notes
# Multiple keys per provider for rate-limit rotation
api_keys:
groq:
- gsk_XXXX
- gsk_YYYY
anthropic:
- sk-ant-api03-XXXX
# Web crawl limits
web_max_pages: 50
web_max_depth: 3
# Retry behaviour for rate-limited providers
max_retries: 5
retry_base_delay: 60.0
# Named prompt styles
prompt_templates:
code: "Focus on implementation details and syntax. Minimize theoretical fluff."
theory: "Focus on high-level architecture and design patterns. Keep code brief."
Use a template:
notegen video <url> --template code
Environment variable fallback
If no key is set in config for a provider, notegen checks:
NOTEGEN_<PROVIDER>_KEY (e.g. NOTEGEN_GROQ_KEY, NOTEGEN_ANTHROPIC_KEY)
Supported providers (free tier available)
| Provider | Free tier | Notes |
|---|---|---|
groq |
Yes | Fast inference; recommended default |
nvidia_nim |
Yes | build.nvidia.com |
gemini |
Yes | Google AI Studio |
anthropic |
No | Paid |
openai |
No | Paid |
ollama |
Local | No key needed |
Any LiteLLM-supported provider works with the right model string.
Note format
Notes are Obsidian-flavored markdown with:
- YAML frontmatter — title, source, tags, date
- Wikilinks —
[[Concept]]on first mention of notable terms - Callouts —
> [!TIP],> [!WARNING],> [!EXAMPLE], etc. - Mermaid diagrams — for flows, architectures, and state machines
- Tables — for comparisons; pipes on every row, explicit alignment
- Math —
$inline$and$$block$$for formulas
Development
# Install dependencies
uv sync --dev
# Run tests
uv run pytest
# Lint and format
uv run ruff check .
uv run ruff format .
# Type check
uv run pyrefly check
Tests are unit-only — no network calls, no LLM. All external calls are mocked.
License
MIT
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 notegen-2.4.1.tar.gz.
File metadata
- Download URL: notegen-2.4.1.tar.gz
- Upload date:
- Size: 48.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9197b6f947bb247ca0ee72cd23e1585a5c6eb4ad755750f5fe08156a638f28f
|
|
| MD5 |
82cbe6a9dbc68589c0fbe6c86e98a525
|
|
| BLAKE2b-256 |
13f89ec895e23dd378a1be1009bdbb3f6e90898591a461c380ae7fa84125a3b0
|
File details
Details for the file notegen-2.4.1-py3-none-any.whl.
File metadata
- Download URL: notegen-2.4.1-py3-none-any.whl
- Upload date:
- Size: 42.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc9718ef94108281dd7350f6ef22f943f9137b4b5527c3325be4172acf0cb90c
|
|
| MD5 |
a5d351cf82fa602959ebb82647becb00
|
|
| BLAKE2b-256 |
c23fc5e0ac76bb12785340de1a962a84ccc0f31f00e9a335e1b9f979b92b8dc0
|