Recipes¶
Task-oriented examples. They assume the getting started steps are done (user created, Spotify
connected, history imported) and use user@example.com as the account.
Rediscover forgotten favourites¶
Tracks that were loved but have not been played for a long time. Rate some of the history first (see the next recipe), then filter on score and on the last play date.
By default, tracks already used in a previous history playlist are excluded, so running the command again
gives a fresh selection. Add --sort score to order by rating instead of play count, or --group-by-artists
to keep an artist's tracks together. Without any rating, drop --score-min and rely on the play count alone.
Rate your history while listening¶
Each track plays on the active Spotify device and a score between 0 and 10 is asked for. Enter s to skip a
track for now, u to never be asked about it again. Tracks are proposed from the most played, and a low score
offers to blacklist the track or the artist. Restrict the session to one artist with --artist. See
rate.
A playlist for a mood or a language¶
From the library, with enriched tracks (enrich tracks first):
--genre, --mood and --locale can be repeated and match any of the given values (OR logic) within the
same filter, while different filters are combined (AND). Remove --dry-run once the preview looks right.
For new music instead, tell the advisor what you want in your own words:
Preview before creating¶
Both playlist commands accept --dry-run: the tracks are listed in a table and nothing is saved or created on
Spotify.
museflow playlist history --score-min 8 --dry-run
museflow playlist discover --focus roots_revival --dry-run
discover --dry-run still calls the LLM; history --dry-run does not.
Keep an artist out of your playlists¶
Blacklisted artists and tracks are excluded from discovery. To undo, pass the ID shown by blacklist list:
See blacklist.
Back up and restore your data¶
Ratings, the blacklist, LLM results and their cost history are the only data that cannot be recomputed from the Spotify export for free. Ratings and the blacklist are your own work, and the taste profile is the most expensive export: recreating it means a full paid build. Export them to YAML:
museflow rate export --output backup/ratings.yaml
museflow blacklist export --output backup/blacklist.yaml
museflow enrich export --output backup/enrichment.yaml
museflow taste export --output backup/taste.yaml
museflow llm export --output backup/llm-usage.yaml
After a database reset, re-import the history first, then restore (no LLM call, no cost):
museflow tracks history --directory ~/Downloads/MySpotifyData
museflow rate import --input backup/ratings.yaml
museflow blacklist import --input backup/blacklist.yaml
museflow enrich import --input backup/enrichment.yaml
museflow taste import --input backup/taste.yaml
museflow llm import --input backup/llm-usage.yaml
Ratings and enrichment are matched by track fingerprint, so tracks missing from the library are reported as "not found" and skipped. The blacklist needs no track in the library: it is stored by name.
Export before upgrading
A new MuseFlow version may require a database reset. Run the exports with the version you have installed,
before upgrading, then import them with the new one. As a safety net, make db-dump also writes a full SQL
dump and prints its path.
From a clone of the repository, the Make targets chain this:
make backup-export, with the code you have installed: a full SQL dump (db.sql) and the five exports above, in a new dated directory underexternal_data/backups/(orBACKUP_DIR=path).- Switch to the new code, then
make resetandmake up, which recreate an empty database and start the API. museflow users create --email <email>.make backup-import: runs the migrations, re-imports the history fromexternal_data/spotify_history(orHISTORY_DIR=path), then the latest backup directory (orBACKUP_DIR=path).museflow provider connect, needed byplaylist discoverandrate --playonly.
If an import fails, go back to the previous code and run make db-restore: it restores the latest db.sql (or
FILE=path), user and provider token included. A dump only fits the schema it was taken from, so it is the way
back, never the way forward.
Saved playlists are not backed up: they stay on Spotify.
Find artists worth exploring¶
museflow stats candidates --max-tracks 3 --min-avg 8
museflow stats artists --sort quality --limit 10
See stats.
Check the taste profile against the library¶
museflow stats tags --by genre --tier macro
museflow stats tags --by mood --sort quality
museflow taste view
The tags ranked from the tracks alone, next to what the LLM made of them. See stats.
Track what the LLM costs¶
museflow llm usage --email user@example.com --by month
museflow llm usage --email user@example.com --by step --since 2026-11-01
museflow llm usage --by model --by effort --operation enrich
museflow llm usage --by user
--by step shows which phase of a build is worth moving to a cheaper model, --by model --by effort compares the
settings tried, --by run lists the runs one by one.
Without --email, the command sums all the users; --by user shows who spends what. See llm.
Clean up after experiments¶
museflow playlist delete --purge --type discovery --include-remote
museflow tracks delete --source discovery --purge
The first command removes discovery playlists locally and on Spotify; the second removes the discovery tracks
from the library. Both ask for confirmation unless --yes is given. See
playlist delete and tracks delete.