mindown-cli
Terminal version of mindown — chat with
an OpenAI-compatible model to find and download songs / videos via yt-dlp,
with automatic ID3 / iTunes-atom tagging (cover art + LRCLib lyrics) on every
audio file.
Requirements
- Python 3.9+
yt-dlpon your$PATH(or supply a full path during setup)ffmpegon your$PATH(used for audio extraction and metadata write-back)- An OpenAI-compatible API key — works with OpenAI, OpenRouter, Groq, Together, Anthropic via gateway, local Ollama in OpenAI mode, etc.
On macOS:
brew install yt-dlp ffmpeg
Install
pip install -e .
This installs a mindown command. The package is pure stdlib — no extra
Python deps are required.
First run
$ mindown
Welcome to Mindown CLI.
Chat-driven YouTube → mp3/mp4 downloader with iTunes + LRCLib tagging.
OpenAI-compatible API key: ********
Base URL [https://api.openai.com/v1]:
Model [gpt-4o-mini]:
yt-dlp path [/opt/homebrew/bin/yt-dlp]:
ffmpeg path [/opt/homebrew/bin/ffmpeg]:
Download directory [~/Downloads/Mindown]:
✓ Saved config to ~/.config/mindown-cli/config.json
The config is written to ~/.config/mindown-cli/config.json (or
$XDG_CONFIG_HOME/mindown-cli/config.json) with mode 0600 because it
holds the API key. Re-run setup with mindown --config.
How it works
- Your message is sent to the chat model along with two tool definitions:
search_youtube(query, limit)— runsyt-dlp ytsearch:and returns up to 10 candidate videos.propose_downloads(items[])— surfaces a list of{url, format, quality}proposals for you to approve.
- The model picks queries, fetches candidates, then proposes a list. You tick / un-tick items at the prompt; nothing downloads automatically.
- Approved items are downloaded sequentially with
yt-dlp, with a live progress bar parsing yt-dlp's--progress-templateoutput. - For audio downloads, the file is run through a tagging pass:
- iTunes Search API → title, artist, album, year, genre, track #, cover art (1200×1200), composer, copyright (via album lookup).
- LRCLib → plain-text lyrics (USLT /
©lyr). - Optional AI lyrics fallback — when LRCLib has no match, ask
the configured chat model for the lyrics and write them into the
same USLT /
©lyrfield. Off by default; opt in during first-run setup, with/ailyrics onin the REPL, or--ai-lyricson the command line. Some models refuse on copyright grounds, in which case nothing is written. ffmpegrewrites the file in place with ID3v2.3 / iTunes atoms.
Slash commands
/help show command list
/config re-run setup
/show print current config (API key redacted)
/reset clear chat history
/dir <path> change download directory
/model <name> switch model
/tag on|off toggle iTunes tag enrichment
/ailyrics on|off toggle the AI lyrics fallback
/quit exit
Use with AI agents
Just ask your AI agent:
install this skill: https://github.com/moerdowo/mindown-cli/blob/main/SKILL.md
The agent will fetch the skill file and figure out where to put it for its own runtime.
Notes
- Audio defaults to MP3 best quality. Video defaults to MP4 1080p when asked for video; otherwise audio is chosen.
--no-playlistis enforced — paste a/watch?v=…URL inside a playlist and only that single video downloads.- yt-dlp's progress is parsed from a structured
DL|...template line, so the progress bar is robust against locale formatting differences in the classic[download]output. - Output files are named
%(title).200B [%(id)s].%(ext)sso duplicate titles do not clobber each other.
License
Personal-use utility, no warranty. yt-dlp and ffmpeg are redistributed under their respective licenses.
Metadata
Release files for mindown 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mindown-0.1.0.tar.gz | 22.4 kB | Without provenance | Details for mindown-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mindown-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mindown-0.1.0-py3-none-any.whl |
Total release size: 46.3 kB
Release files / mindown-0.1.0.tar.gz
| Download URL | mindown-0.1.0.tar.gz |
|---|---|
| Size | 22.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e72bb06e8fc5f7d8b8fc80b56055a651dca6a6f9aaf44032337763bf90f1e9b4
|
|
BLAKE2b-256 checksum How to use checksums |
dc0e889f60437a194fdb92349255d400a680c7afa7c204dcc4a5090a9bc49203
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / mindown-0.1.0-py3-none-any.whl
| Download URL | mindown-0.1.0-py3-none-any.whl |
|---|---|
| Size | 24.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
390c152c429224e9a8c52190786bafbe9cef7f1ee8fc2dde54406e8d0f8b7868
|
|
BLAKE2b-256 checksum How to use checksums |
9897f36f65e59a513a71216414becd21ec1161bf401366d52ca04209b3d2d76b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for mindown 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.