Turn any YouTube tutorial into a runnable setup plan.
yt2setup downloads a video's audio, transcribes it locally with
faster-whisper (no cloud speech
API needed), then extracts a structured setup plan — a summary plus
numbered steps with copy-pasteable shell commands. If ANTHROPIC_API_KEY
is set it uses Claude to do the extraction; otherwise it falls back to a
regex-based heuristic that pulls out lines that look like shell commands.
Output per video:
yt2setup_output/<video_id>/
transcript.txt # full transcript
setup_plan.md # human-readable plan
setup.sh # extracted commands, ready to run
git clone https://github.com/epipra/yt2setup.git
cd yt2setup
pip install -r requirements.txt
# ffmpeg is required by yt-dlp's audio extraction
sudo apt-get install -y ffmpeg # or: brew install ffmpeg# Transcribe + generate a plan (no execution)
python3 yt2setup.py https://youtu.be/VIDEO_ID
# Use Claude to extract a cleaner, structured plan
export ANTHROPIC_API_KEY=sk-ant-...
python3 yt2setup.py https://youtu.be/VIDEO_ID
# Review setup.sh, then run it with confirmation
python3 yt2setup.py https://youtu.be/VIDEO_ID --apply
# Non-interactive
python3 yt2setup.py https://youtu.be/VIDEO_ID --apply --yes
# Bigger/more accurate model
python3 yt2setup.py https://youtu.be/VIDEO_ID --model smallCloud/datacenter IPs are frequently rate-limited or bot-checked by YouTube. This is a YouTube-side restriction, not a bug in this tool. Fixes:
# Export cookies.txt from a logged-in browser session (e.g. via the
# "Get cookies.txt" browser extension), then:
python3 yt2setup.py https://youtu.be/VIDEO_ID --cookies-file cookies.txt
# Or, if running yt2setup on your own machine with a browser installed:
python3 yt2setup.py https://youtu.be/VIDEO_ID --cookies-from-browser chromecookies.txt is git-ignored — never commit it, it is a live session credential.
- Nothing is ever executed without
--apply, and--applystill prompts for confirmation unless you also pass--yes. - Before running,
setup.shis scanned for a short list of obviously destructive patterns (rm -rf /, fork bombs,ddto a block device,curl | sudo bash, etc.) and execution is refused if any match — review the script yourself in that case. - The heuristic (non-Claude) extractor never generates commands on its own; it only quotes command-like lines it found verbatim in the transcript.
| Flag | Meaning |
|---|---|
--out DIR |
output directory root (default ./yt2setup_output) |
--model SIZE |
faster-whisper model: tiny, base (default), small, medium, large-v3 |
--cookies-file PATH |
cookies.txt for yt-dlp |
--cookies-from-browser BROWSER |
pull cookies from a local browser (chrome, firefox, ...) |
--apply |
execute the generated setup.sh after review |
--yes |
skip the confirmation prompt (use with --apply) |
--force |
redo download/transcription even if a cached transcript exists |
Using faster-whisper on CPU means no per-minute API billing, no audio
leaving your machine, and it works fully offline once the model weights are
cached. A base model transcribes reasonably fast on a 4-core machine; use
small/medium for higher accuracy at the cost of speed.
MIT, see LICENSE.