TubeStoevsky
Downloads a YouTube video transcript and turns it into literary prose through a LangChain LLM chain — outputs TXT + MD.
Works with any OpenAI-compatible chat completions API: a local gateway, Ollama, vLLM, OpenAI, or anything else speaking that protocol.
Available on PyPI as tubestoevsky.
How it works
URL
├─ yt-dlp subtitles (manual > auto) -> {title}.srt
├─ SRT parser timecodes and rolling dupes -> raw text
├─ LangChain prose -> title -> Markdown
└─ output {title}.txt, {title}.md
Install
# as a CLI tool
uv tool install tubestoevsky # or: pip install tubestoevsky
tubestoevsky --help
# from a checkout, for development
uv sync
Configuration
Store global settings with:
$ tubestoevsky config set LLM_API_KEY sk-xxxxx
$ tubestoevsky config set LLM_MODEL gpt-6-luna
$ tubestoevsky config get LLM_MODEL
gpt-6-luna
Settings are saved to ~/.tubestoevsky/config.yaml.
Precedence: environment > config.yaml > .env > default, with direct CLI
flags (--lang, --out, and --model) overriding all of those.
.env remains supported for existing installations. Copy
.env.example to .env; it is read from the current
directory, the project root, or ~/.config/tubestoevsky/.env.
| Variable | Purpose | Default |
|---|---|---|
LLM_BASE_URL |
OpenAI-compatible endpoint (/v1 appended when absent) |
http://127.0.0.1:4000 |
LLM_API_KEY |
API key for that endpoint | required |
LLM_MODEL |
model name served by it | gpt-6-luna |
TRANSCRIPT_LANG |
subtitle language | en |
OUTPUT_DIR |
output directory | . |
LLM_TEMPERATURE |
sampling temperature | 0.3 |
LLM_TIMEOUT |
request timeout, sec | 1800 |
YTDLP_COOKIES / YTDLP_COOKIES_FROM_BROWSER |
access to restricted videos | — |
Usage
Example run:
$ tubestoevsky --lang en --model deepseek-flash https://youtu.be/q0aFOxT6TNw
[1/4] Downloading subtitles (en) via yt-dlp ...
-> iPhone-17-Pro-Review-Paradox-in-a-Box.srt
[2/4] Parsing SRT, deduplicating lines ...
-> 2349 words (raw text: 12816 chars)
[3/4] LangChain chain (deepseek-flash via http://127.0.0.1:4000/v1) ...
[LLM 1/3] rewriting as prose (2349 words) ...
[LLM 1/3] done: 2300 words
[LLM 2/3] document title ...
[LLM 2/3] done: "iPhone 17 Pro Review: The Most Pro iPhone for the Masses"
[LLM 3/3] Markdown layout ...
[LLM 3/3] done: 2318 words
-> prose: 2300 words, title: "iPhone 17 Pro Review: The Most Pro iPhone for the Masses"
[4/4] Writing .txt and .md ...
Done:
./iPhone-17-Pro-Review-Paradox-in-a-Box.srt
./iPhone-17-Pro-Review-Paradox-in-a-Box.txt
./iPhone-17-Pro-Review-Paradox-in-a-Box.md
Full generated output is available in examples/:
transcript,
prose,
and Markdown.
Install globally and run with an inline API key:
uv tool install tubestoevsky
LLM_API_KEY='sk-xxxxx' tubestoevsky --lang en --model qwen3.8-27b https://youtu.be/q0aFOxT6TNw
Other examples:
tubestoevsky run <URL>
tubestoevsky <URL>
tubestoevsky <URL> --lang en --out ./out
tubestoevsky <URL> --model gpt-6-luna
# or without installing:
uvx tubestoevsky <URL>
# from a checkout:
uv run python -m transcript_app <URL>
Layout
transcript_app/
__main__.py CLI
config.py YAML + .env + environment + CLI flags
downloader.py yt-dlp
srt.py subtitle parser
chain.py LangChain chain over the API
prompts.py step prompts
outputs.py .txt/.md writers
Notes
- LLM steps stream: some gateways fail to return monolithic responses.
Accept-Encoding: identityanduse_responses_api=Falsework around proxy hangs.- Run long requests in the foreground.
Metadata
Release files for tubestoevsky 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tubestoevsky-1.0.2.tar.gz | 327.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tubestoevsky-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 342.8 kB
Release files / tubestoevsky-1.0.2.tar.gz
| Download URL | tubestoevsky-1.0.2.tar.gz |
|---|---|
| Size | 327.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79fd7f368f70a91cb6c27fdfe2d1e211d479002127a48221f105a126ba9b25b4
|
|
BLAKE2b-256 checksum How to use checksums |
2d3a455bea4782b6dc038cf52cc7ba13e378bdf2a3daf458dc4ac2850e4df5c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / tubestoevsky-1.0.2-py3-none-any.whl
| Download URL | tubestoevsky-1.0.2-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a4b7e72d4f60a3e293b5e37627ce91442405f4a15311f970fcb757421715ae5
|
|
BLAKE2b-256 checksum How to use checksums |
31fa1e5de9e8ac2f3acecf0a02716acf7401f16e49a519ea81438c2e61de32c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|