vq — video questions
Answer questions about YouTube videos using subtitles and an LLM.
vq fetches subtitles from a YouTube video, passes them to an LLM, and returns the answer — with live Markdown rendering in the terminal.
Requirements
vq shells out to two external CLIs that must be on your PATH:
yt-dlp— subtitle extraction (always required)llm— LLM integration (required to answer questions; not needed for--text-only/--metadata)
vq checks these at startup and, if one is missing, prints the missing tool with an install hint and exits.
Install them as standalone tools (recommended, keeps your llm plugins/keys):
uv tool install yt-dlp
uv tool install llm
YouTube: keep yt-dlp current + JS runtime
Since 2026 YouTube requires yt-dlp to solve a JavaScript challenge, otherwise it
returns a misleading This video is not available for videos that are perfectly
fine. Two things are needed:
-
A recent
yt-dlp(older than ~90 days often breaks):uv tool upgrade yt-dlp # or: pipx upgrade yt-dlp
-
A JavaScript runtime (
deno) plus the EJS challenge-solver script:curl -fsSL https://deno.land/install.sh | sh # installs deno to ~/.deno/bin
Then enable it once, globally, in
~/.config/yt-dlp/config:--js-runtimes deno:/home/YOU/.deno/bin/deno --remote-components ejs:github(
--remote-components ejs:githubletsyt-dlpfetch the challenge solver on demand. This affects everyyt-dlpcall on your machine, not justvq.)
If vq prints yt-dlp failed to fetch video info, run the failing URL through
yt-dlp -j <URL> directly — vq now echoes yt-dlp's own error underneath, which
tells you the real cause.
You also need uv to install vq itself:
curl -LsSf https://astral.sh/uv/install.sh | sh
LLM Configuration
Before first use, configure an API key for your preferred provider:
OpenAI:
llm keys set openai
Anthropic (Claude):
llm install llm-anthropic
llm keys set anthropic
For other providers, see the LLM plugins directory.
Installation
From PyPI (recommended) — the package is published as video-questions; the installed command is vq:
uv tool install video-questions
Alternatives (pipx / pip)
pipx install video-questions
# or, into the current environment:
pip install video-questions
Upgrade:
uv tool upgrade video-questions
Uninstall:
uv tool uninstall video-questions
From source:
git clone https://github.com/aborruso/video_questions.git
cd video_questions
make install # uv tool install .
make dev # editable dev environment
make uninstall
Verify Installation
make test
Or manually:
vq 'https://www.youtube.com/watch?v=OM6XIICm_qo' --text-only | head -5
Usage
vq [OPTIONS] URL [QUESTION]
Arguments
| Argument | Description |
|---|---|
URL |
YouTube URL (required). Supports standard, youtu.be, and Shorts URLs. |
QUESTION |
Question to ask about the video. If omitted, switches to --text-only mode. |
Options
| Option | Description |
|---|---|
-p, --language TEXT |
Response language (e.g. Italian, French) |
-t, --template TEXT |
LLM template name |
-m, --model TEXT |
LLM model to use (e.g. gpt-4o, claude-3-5-sonnet-20241022) |
--sub PATH |
Save subtitles to file |
-o, --output PATH |
Save LLM response to file |
-i, --chat |
After the answer, stay in an interactive follow-up session (continues via llm -c) |
--no-cache |
Skip cache, re-download subtitles |
--text-only |
Print subtitles and exit (no LLM) |
--metadata |
Print video metadata as one JSONL line and exit (no transcript) |
--debug |
Show debug info (system prompt and prompt preview) |
-V, --version |
Show version and exit |
Examples
# Ask a question about a video
vq 'https://www.youtube.com/watch?v=OM6XIICm_qo' 'What are the main topics?'
# Ask, then keep asking interactively about the same video (-i / --chat)
vq 'https://www.youtube.com/watch?v=OM6XIICm_qo' 'Give me a summary' -i
# Reply in Italian
vq 'https://www.youtube.com/watch?v=OM6XIICm_qo' 'What is this about?' -p Italian
# Use a specific model
vq 'https://www.youtube.com/watch?v=OM6XIICm_qo' 'Summarize this' -m claude-3-5-sonnet-20241022
# Use an LLM template
vq 'https://www.youtube.com/watch?v=OM6XIICm_qo' 'What is this about?' -t my_template
# Save subtitles to file
vq 'https://www.youtube.com/watch?v=OM6XIICm_qo' --sub subtitles.txt
# Save LLM response to file
vq 'https://www.youtube.com/watch?v=OM6XIICm_qo' 'Summarize this' -o response.md
# Print subtitles only (no LLM)
vq 'https://www.youtube.com/watch?v=OM6XIICm_qo' --text-only
# Force re-download (skip cache)
vq 'https://www.youtube.com/watch?v=OM6XIICm_qo' 'What changed?' --no-cache
Cache
Subtitles are cached in /tmp/qv_cache/ for 60 days.
# View cache
ls -lh /tmp/qv_cache/
# Clear all cache
rm -rf /tmp/qv_cache/
# Clear cache for a specific video
rm -f /tmp/qv_cache/VIDEO_ID.txt /tmp/qv_cache/VIDEO_ID.title.txt
Use --no-cache to force a fresh download without clearing the cache.
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 video_questions-0.2.1.tar.gz.
File metadata
- Download URL: video_questions-0.2.1.tar.gz
- Upload date:
- Size: 41.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea6b28290663d54eb962c256a6792dc03a636dc3ff106b020ed5cd7786ee3199
|
|
| MD5 |
a6ec81e82dc59fe81dd1c09f2080ff20
|
|
| BLAKE2b-256 |
1dfa18b33daecc2305edea54073a5613d52b32759d5b71bd44591110310c43c9
|
File details
Details for the file video_questions-0.2.1-py3-none-any.whl.
File metadata
- Download URL: video_questions-0.2.1-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8821fc18f7c38d9b9753be6eef81f70e54f2dbfa313774fad239a90b2cb8a128
|
|
| MD5 |
01ae84fef79dbf781176687a1359fdab
|
|
| BLAKE2b-256 |
ebc6fe2b4cf1b08d9aaad4b543eaf337cf45178cba6a5d919eb7f3bb2d746bc1
|