Skip to main content

DAB CLI — A command-line interface for browsing and downloading music from DAB Music Player.

Project description

🎧 DAB CLI

DAB CLI is an advanced, extensible, and user-friendly command-line tool for accessing DABMusic — a free, open-source digital music library and streaming service.
It supports searching, downloading, metadata tagging, artist discography downloads, local streaming, and more — all from your terminal.


🚀 What's New in v2.0

  • Smarter Downloader: Skips existing files; supports pause/resume/stop
  • Artist Discography Download: Fetch all albums by artist name or ID
  • Enhanced MPV IPC Player: Stream tracks, albums, libraries, or queues with live metadata, timers, and playback controls (space=play/pause, arrows=next/prev, q=quit)
  • Lyrics & Cover Embedding: Auto-download covers and lyrics
  • Metadata Overrides: Customize title, artist, album, genre, date, and path during downloads
  • Version Checking & Improved CLI Help: Always know if your CLI is up-to-date

v2.0 makes downloads smarter, streaming interactive, and metadata fully customizable.


📦 Installation

1. Install directly from PyPI

pip install --upgrade dabcli
cd dabcli

2. Hurray! It's that simple.

dabcl

🔐 Authentication

Login to DAB

dabcli login "<email>" "<password>" 

Logout

dabcli logout

Check Login Status

dabcli status

🔍 Search

By default, searching checks tracks, albums, and artists. Use --type to restrict:

dabcli search "<query>"
dabcli search "<query>" --type track
dabcli search "<query>" --type album
dabcli search "<query>" --type artist

⬇️ Downloads

All downloads support metadata overrides:

--format mp3|flac --title "<title>" --artist "<artist>" --album "<album>" --genre "<genre>" --date "<YYYY-MM-DD>" --path "<custom/path>"

1. Download a Single Track

Search by track name or ID (search first, then select):

dabcli track "<track-id>" [metadata overrides]

2. Download an Album

dabcli album "<album-id or title>" [metadata overrides]

3. Download a Library

List all user libraries

dabcli library

Download A Library

dabcli library <library-id> [--view-only] [metadata overrides]

4. Download an Artist Discography

dabcli discography "<artist name or ID>" [--view-only] [metadata overrides]

▶️ Streaming

Stream tracks, albums, libraries, or queues:

dabcli play --track-id <id>
dabcli play --album-id <id>
dabcli play --library-id <id>
dabcli play --queue <id1> <id2> <id3>

Interactive controls while streaming:

  • Space: Play/Pause
  • < / >: Previous/Next
  • q: Quit

♥️ Favorites

List all user favorites:

dabcli favorites

🔄 Updates & Version Check

Check Current Version

dabcli --version

Run an Update

dabcli update 

Note: If update fails, run

pip install --upgrade dabcli
python3 dabcli.py --version

⚙️ Configuration

After first launch, a config.json file will be created automatically (usually in your platform’s app data directory).

Example:

{
    "output_format": "flac",
    "output_directory": "/your/music/directory",
    "use_metadata_tagging": true,
    "stream_quality": "25",
    "stream_player": "mpv",
    "test_mode": false,
    "delete_raw_files": true,
    "keep_cover_file": false,
    "get_lyrics": true,
    "base_url": "https://dabmusic.xyz/api",
    "debug": false,
    "show_progress": true,
    "config_version": 1
}

NOTE: You can set-up configs interactively using dabcli config or find the config.json file location using dabcli config --path.

Config Options

  • output_format: "flac" or "mp3" — format for downloaded tracks
  • output_directory: Directory where all downloads will be saved
  • stream_quality: "27" = FLAC, "5" = MP3 — controls quality of streaming/downloads
  • stream_player: Player used for streaming (currently only mpv supported)
  • delete_raw_files: Whether to delete the raw files.
  • get_lyrics: Download and embed lyrics into tracks if available
  • keep_cover_file: Keep a separate cover image file per track/album, or only embed it in metadata
  • show_progress: Whether to show progress using tqdm or not.
  • test_mode, debug, `version: Developer side configurations, not intended for users.

🧩 Dependencies

  • Python 3.7+
  • Python packages: requests, mutagen, tqdm, tabulate
  • External tools: mpv (optional, for streaming)
pip install -r requirements.txt

🌐 About DABMusic

DABMusic is a community-driven open-source platform providing high-quality, unrestricted music streaming and downloads.


👥 Credits


📝License

MIT License

Copyright (c) 2025 sherlockholmesat221b

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


⚠️ Disclaimer

This software is provided for educational and archival purposes only. It does not host or distribute music files, nor circumvent DRM. Users are responsible for complying with all applicable laws. The software is distributed AS IS and the author claims no legal liability of any kind.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dabcli-2.1.7.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dabcli-2.1.7-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file dabcli-2.1.7.tar.gz.

File metadata

  • Download URL: dabcli-2.1.7.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for dabcli-2.1.7.tar.gz
Algorithm Hash digest
SHA256 88911e8d2ea445e0a5de1119fa32edb44a09abeded661e0db09141f25e8aca85
MD5 836320f3a4fb968af6220199090dd52f
BLAKE2b-256 d6e3522467c6cb1b984a7dc66fcafe7a8a61e48d13da24a402c172907dea3487

See more details on using hashes here.

File details

Details for the file dabcli-2.1.7-py3-none-any.whl.

File metadata

  • Download URL: dabcli-2.1.7-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for dabcli-2.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 66b906aa5b0b1354b6958a82bd97d47b29952ed4500f6222998a35d5662a33cb
MD5 614fe7a6f8680c486a31ea5b5973fc1b
BLAKE2b-256 ae48c972f21372213b4c320d4470738611640c2514fff98a873077837dc11bc0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page