Built for AI agents
lyt writes one stable lyt.result.v1 JSON document to stdout, with progress and diagnostics on stderr. Agents get exact file paths instead of scraping terminal text.
lyt is a free yt-dlp CLI and agent skill. Ask Claude Code, Codex, or any terminal agent to save permitted audio or video. lyt handles the setup, keeps risky options off, and hands back the exact file path as JSON.
$npm install --global @tanattv/lyt
Use lyt only for media you own, have permission or a license for, that is in the public domain, or where an applicable copyright exception allows it. No DRM, paywall, or access-control bypass.
# Claude Code: "Save the audio from this link as an MP3 and give me the path."$ lyt --mp3 -q 192K --json "URL"{"ok":true,"status":"downloaded","files":["C:\\Downloads\\Example.mp3"]}$ lyt --video -q 1080p "URL"Downloading 1080pSaved: C:\Users\you\Downloads\Example.mp4$ lyt --video --clip 1:10-2:45 "URL"Clip 1:10 to 2:45 (1:35)Downloading Saved: C:\Users\you\Downloads\Example.mp4Works with
Agent-native output, safe defaults, and setup that checks itself.
lyt writes one stable lyt.result.v1 JSON document to stdout, with progress and diagnostics on stderr. Agents get exact file paths instead of scraping terminal text.
One item at a time. Playlists need --playlist, existing files are kept unless you add --force-overwrite, and --max-filesize and --dry-run add guards.
Each public track is matched on YouTube and saved as a tagged MP3 in playlist order. lyt never downloads Spotify audio. Songs already on disk are skipped.
Save one section with --clip 1:10-2:45, repeat --clip for several, or split a download into one file per chapter with --split-chapters.
--sponsorblock cuts sponsor, self-promo, and interaction segments. Subtitles are a flag away with --subs.
lyt provisions a checksum-verified yt-dlp, provisions a verified ffmpeg on Windows, and on macOS and Linux tells you the exact command to run. lyt doctor reports what is ready.
One job, one command, one file path back. These are the jobs lyt does most.
Claude Code or Codex runs lyt, reads the JSON, and tells you where the file landed. No log scraping, no guessing.
lyt --mp3 --json "URL"
Keep local copies of your videos and podcasts at the quality you want, a whole channel at a time with --playlist.
lyt --video -q 4k --playlist "URL"
Save subtitles as .srt next to the media, so your agent can read, summarize, or quote your talk or lecture.
lyt --subs --sub-langs en "URL"
Pull a single segment for an edit, a lesson, or a reply, without downloading the whole video first.
lyt --video --clip 1:10-2:45 "URL"
Spotify playlists become tagged MP3s matched on YouTube, in order. Re-run to fetch only the new songs.
lyt "https://open.spotify.com/playlist/..."
Read URLs from a file, run jobs in parallel, and parse one result document in CI or a cron job.
lyt -a urls.txt -j 3 --json
Install the CLI. Requires Node.js 20 or newer.
npm install --global @tanattv/lytSee what is ready and what still needs a fix.
lyt doctorInstall the skill for Claude Code or Codex, then ask your agent for the file. Or run lyt yourself.
lyt agent install claudelyt writes one lyt.result.v1 document to stdout. Progress and setup diagnostics go to stderr, so agents never have to scrape terminal text.
results[].fileshistory or max-filesizelyt capabilities --json lists commands, flags, and exit codes{
"schema": "lyt.result.v1",
"ok": true,
"results": [
{
"status": "downloaded",
"files": ["C:\\Downloads\\Example.mp3"]
}
]
}
| Task | yt-dlp alone | lyt |
|---|---|---|
| Setup | Install yt-dlp and ffmpeg yourself and keep them updated | npm install, then lyt doctor; yt-dlp is provisioned and checksum-verified |
| Playlists by default | Playlist links download every item unless you pass --no-playlist | One item unless you pass --playlist |
| Repeat downloads | Opt in to --download-archive to skip items you already have | Local history skips repeats by default; --redownload bypasses it |
| Machine-readable result | Assemble your own with --print or -J | One lyt.result.v1 JSON document with exact files |
| Advanced extractor options | yt-dlp wins: its full option, format, and post-processing surface | Covers common options. Use yt-dlp directly for the rest. |
Yes, when you are allowed to download the media. Install lyt, then run lyt agent install claude so Claude Code loads the lyt skill. The agent can then run lyt --mp3 -q 192K --json and read the saved file path from the JSON result.
No. lyt uses yt-dlp and ffmpeg underneath and gives them a smaller interface with safe defaults, guided setup, and JSON results. For advanced extractor options, run yt-dlp directly.
Yes. lyt is free and MIT licensed. It has no lyt account and no hosted service, and the npm package has zero runtime dependencies.
Yes. lyt runs on Windows, macOS, and Linux with Node.js 20 or newer. On Windows, lyt can provision a verified ffmpeg build. On macOS and Linux, lyt doctor shows the package-manager command to install ffmpeg.
Yes, for public Spotify playlists. lyt reads the public track list, finds each song on YouTube, and saves tagged MP3s in playlist order. lyt never downloads Spotify audio itself. Playlists over 100 songs need optional Spotify API keys to read the full list.
It depends on the media and your location. Download only when you own it, have permission or a license, the work is in the public domain, or an applicable copyright exception allows it. Public availability alone does not grant download rights. lyt does not bypass DRM, paywalls, or access controls. This is not legal advice.
Install lyt with npm install --global @tanattv/lyt, then run lyt agent install claude or lyt agent install codex. Ask your agent for the file in plain language. It runs lyt with --json and reports the exact saved path. Download only media you have the rights to.
Yes, if the agent can run terminal commands. Codex and Claude Code can install the lyt skill. Other agents, such as Gemini CLI or Cursor's agent, run the installed lyt command and read the --json result.
Yes. With --json, lyt writes one lyt.result.v1 document to stdout with the exact final file paths, and progress and setup diagnostics go to stderr. lyt capabilities --json lists the commands, flags, and result schemas.
Install the CLI, run the doctor, then let your agent save one permitted file and return its exact path.