Skip to main content

y2cli

Offline YouTube downloader CLI — works exactly like Y2Mate but runs on your machine with no browser needed. Powered by yt-dlp with ffmpeg bundled via imageio-ffmpeg (no separate ffmpeg install required).

Features

  • Download YouTube videos as MP4 (1080p, 720p, 480p, 360p, and more)
  • Download audio as MP3
  • Interactive format picker (like Y2Mate's UI, in the terminal)
  • Built-in ffmpeg — no manual setup
  • Local HTTP server mode for the VS Code and browser extensions
  • JSON output mode for programmatic use

Install

pip install y2cli

Or install from source:

git clone https://github.com/Tresorbana/y2cli
cd y2cli
pip install -e .

Usage

# Interactive — prompts for URL and format
y2cli

# Pass URL directly, pick format interactively
y2cli "https://www.youtube.com/watch?v=VIDEO_ID"

# Direct download, no prompts
y2cli "https://..." --format mp4_720
y2cli "https://..." --format mp3

# Available format IDs
# mp3, mp4_1080, mp4_720, mp4_480, mp4_360  (depends on video)

# Custom output directory
y2cli "https://..." --format mp4_720 --output "C:\Users\You\Videos"

# Get video info as JSON (used by extensions)
y2cli "https://..." --info

# Start local HTTP server (for VS Code / browser extensions)
y2cli --serve
y2cli --serve --port 8080

Downloads save to ~/Downloads/y2cli/ by default.

HTTP Server API

When running y2cli --serve (default port 7272):

Method Endpoint Body Description
GET /ping — Health check
POST /info {"url": "..."} Get video info + formats
POST /download {"url": "...", "format_id": "mp4_720"} Start download, returns job_id
GET /progress?job_id=... — Poll download progress

License

MIT

Metadata

Release files for y2cli 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for y2cli 1.0.0
File Size Uploaded
y2cli-1.0.0.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for y2cli 1.0.0
File Interpreter ABI Platform
y2cli-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / y2cli-1.0.0.tar.gz

Download URL y2cli-1.0.0.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6ff1534388a8e34df9055edd41c888b0a093bef2ac91edde8487620fa985e021
BLAKE2b-256 checksum
How to use checksums
cd57c05b4eff6ebc18c734db4de1400250e36c313b0e28b26de7c646170cea15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / y2cli-1.0.0-py3-none-any.whl

Download URL y2cli-1.0.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1f05272169f52e2b7d184c94b34a9d502c71dd71c8ae0c7293ec8561d6c11eb
BLAKE2b-256 checksum
How to use checksums
01b12f4e585a84dedc3f434dc23b3ed19ba2034d3976f2145f30f0d76eb3395a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

1.1.1

2 release files

1.1.0

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page