v0.8.2 Spotify, subtitles, SponsorBlock →

Media downloads
your AI agent can trust.

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
Free & MIT Windows, macOS, Linux Node.js 20+
# 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"]}

Works with

YouTube Spotify playlists SoundCloud Vimeo Bandcamp and anything yt-dlp supports
Why lyt

The yt-dlp CLI built for AI agents, and still pleasant for people.

Agent-native output, safe defaults, and setup that checks itself.

Agent-native

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.

{ "schema": "lyt.result.v1", "ok": true, "results": [{ "status": "downloaded", "files": ["C:\\Downloads\\Example.mp3"] }] }
Safe defaults

Safe by default

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.

Spotify

Spotify playlists → MP3

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.

01Song OneArtistsaved
02Song TwoArtistnew
03Song ThreeArtistexists
downloads/My Playlist/01 - Artist - Song One.mp3
Clips

Clips and chapters

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.

0:001:10 to 2:45end
Cleaner videos

SponsorBlock

--sponsorblock cuts sponsor, self-promo, and interaction segments. Subtitles are a flag away with --subs.

KeptCut
Zero-fuss setup

Setup that checks itself

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.

$ lyt doctor core ready yt-dlp checksum verified ffmpeg needed for MP3 and video $ lyt doctor --fix
Use cases

What people hand to lyt.

One job, one command, one file path back. These are the jobs lyt does most.

Give your AI agent a download tool

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"

Back up your own uploads

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"

Feed transcripts to your agent

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"

Clip the part you need

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"

Turn playlists into a library

Spotify playlists become tagged MP3s matched on YouTube, in order. Re-run to fetch only the new songs.

lyt "https://open.spotify.com/playlist/..."

Script it

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
How it works

Three steps to your first permitted file.

  1. Install

    Install the CLI. Requires Node.js 20 or newer.

    npm install --global @tanattv/lyt
  2. Check

    See what is ready and what still needs a fix.

    lyt doctor
  3. Ask your agent or run it

    Install the skill for Claude Code or Codex, then ask your agent for the file. Or run lyt yourself.

    lyt agent install claude
For agents

Your agent gets a file path, not a wall of logs.

lyt writes one lyt.result.v1 document to stdout. Progress and setup diagnostics go to stderr, so agents never have to scrape terminal text.

  • Exact final file paths in results[].files
  • Clear skip reasons such as history or max-filesize
  • Playlists and overwrites need explicit flags
  • lyt capabilities --json lists commands, flags, and exit codes
Claude Code Codex Gemini CLI Cursor Any agent with a shell
Read the agent guide →
{
  "schema": "lyt.result.v1",
  "ok": true,
  "results": [
    {
      "status": "downloaded",
      "files": ["C:\\Downloads\\Example.mp3"]
    }
  ]
}
Guides

Step-by-step guides for agents and people.

Compared with yt-dlp

Simpler where you want guardrails. yt-dlp where you need every option.

Taskyt-dlp alonelyt
SetupInstall yt-dlp and ffmpeg yourself and keep them updatednpm install, then lyt doctor; yt-dlp is provisioned and checksum-verified
Playlists by defaultPlaylist links download every item unless you pass --no-playlistOne item unless you pass --playlist
Repeat downloadsOpt in to --download-archive to skip items you already haveLocal history skips repeats by default; --redownload bypasses it
Machine-readable resultAssemble your own with --print or -JOne lyt.result.v1 JSON document with exact files
Advanced extractor optionsyt-dlp wins: its full option, format, and post-processing surfaceCovers common options. Use yt-dlp directly for the rest.
Read the full comparison →
FAQ

Frequently asked questions

Can Claude Code download YouTube audio?

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.

Is lyt a replacement for yt-dlp?

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.

Is lyt free?

Yes. lyt is free and MIT licensed. It has no lyt account and no hosted service, and the npm package has zero runtime dependencies.

Does lyt work on Windows?

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.

Can lyt turn a Spotify playlist into MP3s?

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.

Is it legal to download YouTube videos with lyt?

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.

How do I let an AI agent download YouTube videos?

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.

Does lyt work with Cursor, Gemini CLI, or other AI agents?

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.

Does lyt give AI agents JSON output?

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 once. Ask for the file.

Install the CLI, run the doctor, then let your agent save one permitted file and return its exact path.