๐ Detify
July 6, 2025 ยท View on GitHub
Detify is a CLI tool that automatically downloads your currently playing Spotify track using spotdl, with both manual and auto-download modes.
Examples
download
https://github.com/user-attachments/assets/60b53984-329e-44c2-a30e-1eedcdac0bc4
auto
https://github.com/user-attachments/assets/84c8de22-fc09-4b45-bf24-a643a19bde16
It supports:
- detify download โ download the current track
- detify auto โ auto-detect and download new tracks when they change
- detify โ run a custom Python script (init.py)
- Tracks saved in your Music folder by default (~/Music)
๐ฆ Installation
Run the installer script:
./install.sh
What it does:
- Creates a virtual environment in: ~/.local/share/detify/venv
- Installs dependencies: spotdl, dbus-python
- Copies the init.py script to the app folder
- Installs the detify CLI to /usr/local/bin
- Ensures ~/Music exists
You can now run detify from anywhere.
๐ Usage
โ Download current track
detify download
Calls your init.py script to check if the song is already downloaded. If not, downloads it using spotdl.
๐ Auto-download when track changes
detify auto
Listens to playerctl via dbus-monitor, detects track changes, waits to confirm (debounced), and then downloads.
๐ Run custom Python logic
detify
Runs the init.py script inside the virtual environment with no arguments.
๐งช Dev Workflow
If you're developing locally:
# Update main script
nano detify
# Update logic
nano init.py
# Re-run installer
./install.sh
๐ Config
Music folder is stored in:
~/.local/share/detify/config
To change the download directory:
echo "/custom/path/to/music" > ~/.local/share/detify/config
๐ Dependencies
Installed via pip inside virtualenv:
- spotdl โ Spotify downloader
- dbus-python โ used for dbus-monitor interaction
System tools needed:
- playerctl
- dbus-monitor
- python3, venv, pip
๐งน Uninstall
sudo rm /usr/local/bin/detify
rm -rf ~/.local/share/detify