| name | environment-setup |
| description | Use when setting up the development environment, installing prerequisites, configuring API keys, or troubleshooting missing dependencies like uvx, geckodriver, or Firefox cookies. |
Environment Setup
Overview
rs-summarizer requires several external tools beyond the Rust toolchain. This skill documents the full prerequisites checklist and how to verify each one.
Prerequisites Checklist
| Tool | Purpose | Verify Command |
|---|
| Rust (stable) | Build the project | rustc --version |
uv / uvx | Run yt-dlp without global install | uvx --version |
| Firefox | Cookie source for YouTube auth | firefox --version |
GEMINI_API_KEY | Google Gemini API access | echo $GEMINI_API_KEY |
| geckodriver | Browser integration tests only | geckodriver --version |
Installing Prerequisites
Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
uv (Python package runner)
pip install uv
brew install uv
Once installed, uvx yt-dlp will download and run yt-dlp automatically — no separate yt-dlp install needed.
Gemini API Key
echo "your-key-here" > ~/api_key.txt
export GEMINI_API_KEY=$(cat ~/api_key.txt)
Get a key from: https://aistudio.google.com/apikey
geckodriver (for browser tests only)
chmod +x geckodriver
Firefox Cookie Authentication
yt-dlp uses --cookies-from-browser firefox to authenticate with YouTube. This requires:
- Firefox installed and has been used to visit YouTube
- The user is logged into YouTube in Firefox
- Firefox is not running when yt-dlp reads cookies (it locks the cookie DB)
If you get 429 errors or "Sign in to confirm" messages, ensure Firefox has fresh YouTube cookies.
Database Setup
The SQLite database is created automatically on first run at data/summaries.db. The data/ directory must exist:
mkdir -p data
Migrations run automatically via sqlx::migrate!().
Running the Server
export GEMINI_API_KEY=$(cat ~/api_key.txt)
cargo run --release
Verifying the Setup
cargo check
uvx yt-dlp --version
cargo test
curl -s "https://generativelanguage.googleapis.com/v1beta/models?key=$GEMINI_API_KEY" | head -c 200
Common Issues
| Symptom | Cause | Fix |
|---|
uvx: command not found | uv not installed | Install uv (see above) |
429 Too Many Requests from yt-dlp | YouTube rate limiting | Wait, or refresh Firefox cookies |
Sign in to confirm | Bot detection | Log into YouTube in Firefox, close Firefox, retry |
Requested format is not available | Missing --format mhtml flag | Already handled in code — check yt-dlp version |
| sqlx compile errors | Missing database | Run mkdir -p data then cargo run once |
| Template compile errors | Askama syntax issue | Check templates/ directory exists at project root |
Relevant Files
src/main.rs — Server startup, port 5001, env var loading
src/services/transcript.rs — yt-dlp invocation (uses uvx)
migrations/001_initial.sql — Database schema
Cargo.toml — Rust dependencies