deemon is a Python-based CLI tool designed to monitor music artists for new releases and automatically trigger downloads via deemix. It serves as a bridge between Deezer's metadata and local music libraries.
The project is structured as a standalone Python package with supporting integration for macOS launchers.
- Package Root (
deemon/): Contains the core Python implementation.cli.py: Click-based command definitions and interactive menu.core/: Low-level API wrappers (api.py), database logic (db.py), and config management (config.py).cmd/: Business logic for individual commands (monitor, refresh, download).utils/: Common utilities for UI, validation, and date parsing.
- Data Persistence:
- Config:
~/.config/deemon/config.json - Database:
~/.local/share/deemon/deemon.db(SQLite)
- Config:
- Scripts (
scripts/): Portable shell and Python utilities for installation, diagnostics, automation wrappers, and one-off collection operations. - Integrations (
integrations/): Optional Keyboard Maestro assets and Raycast shell integrations. - Package integrations (
deemon/integrations/): MCP and Raycast bridge implementations.
- Python 3.10+
deemix(python package)deezer-python(python package)PlexAPI(optional, for library refresh)
Execute these commands within the deemon directory:
./install.sh- Initialize the configuration and database:
deemon --init
- Edit
~/.config/deemon/config.jsonand add your ARL token for Deezer authentication.
deemon/core/: The "Engine". Start here to understand API or DB changes.deemon/cmd/: The "Brain". Start here to add or modify command logic.scripts/: Portable utility entry points.install.shanduninstall.shat the repository root delegate here for convenience.integrations/: Optional external integration assets.examples/: Sanitized configuration examples; runtime settings do not belong in the repository.
- Adding a new CLI command? ->
deemon/cli.pyand a new file indeemon/cmd/. - Modifying the SQLite schema? ->
deemon/core/db.py. - Updating a Raycast integration? ->
integrations/raycast-shell/or the separately installed Raycast extension.
- Click: All commands are defined using the
clicklibrary incli.py. - Interactive Menus: Use the
ui.pyutilities for consistent terminal formatting.
- Transactions: The database tracks transactions to support the
rollbackcommand. - Profiles: Supports multiple configuration profiles (e.g., "Main", "Test").
- Raycast Bridge:
deemon/integrations/raycast.pyserves as a JSON-only interface for the Raycast extension.scripts/raycast-bridge.pyis its executable launcher.
- Add an API wrapper in
deemon/core/api.py. - Update
deemon/cmd/monitor.pyto handle the new platform's artist/playlist lookup. - Add any necessary credentials to
core/config.py.
- Increment the version in
core/db.py. - Add a migration step in the
Database.migrate()method.
- Linting:
python3 -m py_compile deemon/*.py - Functional Test:
deemon refresh --dry-runto check for new releases without triggering downloads. - Email Test:
deemon test -eto verify SMTP settings.
- ARL Expiration: Downloads will fail silently or with "Not Logged In" if the ARL expires.
- Fast API Threads: High thread counts in
config.jsoncan lead to rate-limiting by Deezer.