Skip to main content

A command-line app for downloading songs, podcasts and videos from Spotify with smart environment management.

Project description

GitHub GitHub top language PyPI Downloads GitHub Downloads GitHub last commit GitHub Repo stars PyPI Version Python Version License

🎵 Dotify

A highly configurable Spotify CLI downloader for tracks, albums, playlists, podcasts, and music videos.
Build permanent offline music libraries with lossless FLAC, full metadata, cover art, and synced lyrics.
Designed for music enthusiasts, Python developers, and automated media library workflows.

InstallationQuick StartFeaturesDocumentation


📦 Installation

Requires Python 3.10+

pip install dotify-cli --upgrade

Set up your environment in one command:

dotify env setup    # creates ~/.dotify/ with all required dirs
dotify env doctor   # verifies dependencies and credentials

New to Dotify? See the full Installation Guide for FFmpeg, Aria2c, and Widevine key setup.


🚀 Quick Start

# Download a track
dotify "https://open.spotify.com/track/18gqCQzqYb0zvurQPlRkpo"

# Download an album
dotify "https://open.spotify.com/album/0r8D5N674HbTXlR3zNxeU1"

# Download a playlist
dotify "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"

# Download an artist's full discography
dotify "https://open.spotify.com/artist/..."

# Download in lossless FLAC (Premium required)
dotify --audio-quality flac-flac,aac-high "https://open.spotify.com/track/..."

For Premium quality (FLAC / AAC 256kbps), you'll need Spotify cookies and a Widevine key.
See Authentication for the full setup walkthrough.


✨ Features

🎧 Content Support

Type Formats Quality Notes
Songs Vorbis 96–320kbps No extra tools required
Songs AAC 128–256kbps Requires .wvd + Premium
Songs FLAC / 24-bit FLAC Lossless L1-certified .wvd + Premium
Podcasts Vorbis / AAC 96–320kbps Free + Premium
Music Videos MP4 (H.264), WebM Up to 1080p Requires .wvd + FFmpeg + Premium
Podcast Videos MP4, WebM Up to 1080p Requires FFmpeg / MP4Box
Lyrics LRC (synced) Downloaded automatically

🛠️ Smart Environment Management

  • dotify env setup — One-command environment scaffolding
  • dotify env doctor — Comprehensive health checks with actionable fixes
  • dotify env paths — Inspect all Dotify-related file locations
  • dotify env check [component] — Check a specific dependency (ffmpeg, cookies, wvd, ...)

🎨 Advanced Capabilities

  • Flexible templates — Customize folder and file names with {artist}, {album}, {year}, {isrc}, and more
  • Quality fallback chainsflac-flac-24,flac-flac,aac-high tries each in order automatically
  • Multiple download modesytdlp (default) or aria2c for parallel multi-connection downloads
  • Multiple remux modes — FFmpeg, MP4Box, or mp4decrypt
  • Preflight validation — Checks credentials and dependencies before every download
  • Batch downloads — Pass multiple URLs or a .txt file with -r

⚙️ Configuration

Config file is auto-created at ~/.dotify/config.ini (Linux/macOS) or %USERPROFILE%\.dotify\config.ini (Windows).

Key Description Default
cookies_path Path to Spotify cookies file ~/.dotify/cookies.txt
wvd_path Path to Widevine .wvd key ~/.dotify/keys/device.wvd
output_path Root output directory Spotify
audio_quality Quality priority list aac-medium
wait_interval Seconds between downloads 5
log_level Logging verbosity INFO

Audio Quality Options

String Format Bitrate / Depth Requires Premium
flac-flac-24 FLAC 24-bit lossless
flac-flac FLAC 16-bit lossless
aac-high AAC 256kbps
vorbis-high Vorbis 320kbps
aac-medium AAC 128kbps
vorbis-medium Vorbis 160kbps
vorbis-low Vorbis 96kbps

Template Variables

Scope Variables
Album {album}, {album_artist}, {year}, {label}
Track {title}, {track}, {disc}, {artist}
Metadata {isrc}, {composer}, {copyright}, {genre}
Playlist {playlist_title}, {playlist_artist}, {playlist_track}
# Example: organized library structure
dotify "URL" \
  --album-folder-template "{album_artist}/{album} [{year}]" \
  --single-disc-file-template "{track:02d} - {title}"

See the full Configuration Reference for all options.


🔑 Authentication Setup

To access Premium quality content:

  1. Get Spotify cookies — Export from open.spotify.com using "Get cookies.txt LOCALLY" (Chrome/Edge) or "Export Cookies" (Firefox). Save to ~/.dotify/cookies.txt.

  2. Get a Widevine key — Use KeyDive on an Android device to extract device.wvd. Place it at ~/.dotify/keys/device.wvd.

  3. Verify — Run dotify env doctor.

dotify env setup --create-placeholders  # scaffolds empty files so you know what to fill in
dotify env doctor                       # confirms everything is ready

Full walkthrough: Authentication


📖 Usage Reference

Basic

dotify "https://open.spotify.com/track/..."
dotify "https://open.spotify.com/album/..."
dotify "https://open.spotify.com/playlist/..."
dotify "https://open.spotify.com/artist/..."

Quality & Output

dotify "URL" --audio-quality flac-flac-24,flac-flac,aac-high
dotify "URL" --output "/path/to/music"
dotify "URL" --synced-lyrics-only

Video Downloads

dotify "URL" --download-music-videos
dotify "URL" --download-podcast-videos
dotify "URL" --video-format webm

Batch & Automation

dotify --read-urls-as-txt urls.txt
dotify "URL1" "URL2" "URL3"
dotify "URL" --wait-interval 10 --log-level DEBUG

Download Modes

dotify "URL" --download-mode ytdlp    # default
dotify "URL" --download-mode aria2c   # faster (requires aria2c)

🔧 Troubleshooting

Error Cause Fix
403 Forbidden / Unauthorized Cookies expired Re-export from incognito, replace ~/.dotify/cookies.txt
Getting 128kbps despite aac-high Free account or missing .wvd Check dotify env doctor
ffmpeg not found Not in PATH Install FFmpeg or set ffmpeg_path in config
dotify not found after install Scripts dir not in PATH Run python -m dotify "URL" or reinstall with --user
Video download fails mp4decrypt/MP4Box missing Install Bento4 + GPAC, verify with mp4decrypt --version
Slow downloads Aria2c not installed Install aria2c, use --download-mode aria2c
dotify env doctor --verbose   # full diagnostic
dotify env doctor --json      # machine-readable output
dotify env check ffmpeg       # check a specific component
dotify env paths              # inspect all file paths

Full FAQ: Troubleshooting


📚 Documentation

Full documentation is available in the Wiki:

Page Description
Installation pip install, FFmpeg, Aria2c, Bento4 setup
Environment Setup env setup, env doctor, v1→v2 migration
Authentication Cookies, KeyDive, Widevine .wvd
Basic Usage Tracks, albums, playlists, artists
Advanced Usage Templates, video, lyrics-only, batch
Audio Quality Reference All format strings and priority examples
Configuration Full config.ini key reference
Dependencies Explained FFmpeg, Aria2c, mp4decrypt, MP4Box, WVD
Troubleshooting Error index and fixes

🌟 Changelog Highlights

v2.0.0 — Environment Management Layer

  • dotify env setup — one-command environment scaffolding
  • dotify env doctor — comprehensive health checks with actionable errors
  • dotify env paths / dotify env check — granular diagnostics
  • Centralized config at ~/.dotify/, preflight validation before every run

v1.9.8

  • FLAC and 24-bit FLAC audio quality support
  • Improved fallback quality chain handling

Star History Chart


🤝 Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/AmazingFeature
  3. Commit your changes: git commit -m 'Add AmazingFeature'
  4. Push to the branch: git push origin feature/AmazingFeature
  5. Open a Pull Request

🙏 Acknowledgments

  • Spotify — for the platform
  • KeyDive — Widevine key extraction
  • yt-dlp — download engine
  • FFmpeg — media processing
  • All contributors and users of Dotify

📝 License

MIT License — see LICENSE for details.


📧 salahin0ashfi@gmail.com · 💬 Discord · 🐛 Issues

⭐ If Dotify saves you time, a star goes a long way! ⭐

Made with ❤️ by @AsHfIEXE

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

dotify_cli-2.0.16.tar.gz (83.0 kB view details)

Uploaded Source

Built Distribution

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

dotify_cli-2.0.16-py3-none-any.whl (96.8 kB view details)

Uploaded Python 3

File details

Details for the file dotify_cli-2.0.16.tar.gz.

File metadata

  • Download URL: dotify_cli-2.0.16.tar.gz
  • Upload date:
  • Size: 83.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dotify_cli-2.0.16.tar.gz
Algorithm Hash digest
SHA256 d712f7407f9ff1c5b7419eef1c0f1efe35718ae0daa07f583137579d4725e9fc
MD5 6c5f72a9bc3379b98d081e141c248744
BLAKE2b-256 c88bba663ea8f92e146b721bcfe9da6e8d45a0256e3a9da7d39ddf66f833803f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dotify_cli-2.0.16.tar.gz:

Publisher: python-publish.yml on AsHfIEXE/Dotify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dotify_cli-2.0.16-py3-none-any.whl.

File metadata

  • Download URL: dotify_cli-2.0.16-py3-none-any.whl
  • Upload date:
  • Size: 96.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dotify_cli-2.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 5f4b87c87c7cab0a971716c13c4d49b6b4bf732a77eed5a19cd36eefe4f6eadc
MD5 0be0ff2fd4067c97d21d330fc19f6286
BLAKE2b-256 5b3521b6e4f88a8e96bde72e370fbf22887ac5ac6e3d851f5c789d73ef647ef8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dotify_cli-2.0.16-py3-none-any.whl:

Publisher: python-publish.yml on AsHfIEXE/Dotify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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