#!/usr/bin/env bash # Run muse on this machine, against live Deezer, with no OAuth app and no slskd. # # ./dev.sh serve the built UI from web/out on :5041 # ./dev.sh --build rebuild web/out first (needed after any UI edit) # # For UI work with hot reload, leave this running and start `next dev` beside # it -- see "Developing" in the README. set -euo pipefail cd "$(dirname "$0")" [[ "${1:-}" == "--build" ]] && (cd web && npm install && npm run build) if [[ ! -d .venv ]]; then python3 -m venv .venv .venv/bin/pip install -q -r requirements.txt fi mkdir -p dev/library dev/downloads # Auth off, because the alternative is registering an OAuth app whose callback # points at localhost. Every role check then reports admin, which is what makes # the admin panel reachable here. The startup banner says this loudly; heed it. export MUSE_AUTH="${MUSE_AUTH:-off}" export MUSE_DB="${MUSE_DB:-dev/muse.db}" export MUSE_LIBRARY_DIR="${MUSE_LIBRARY_DIR:-dev/library}" export MUSE_DOWNLOAD_DIR="${MUSE_DOWNLOAD_DIR:-dev/downloads}" export MUSE_COOKIE_SECURE=false # Unset by default: with no slskd, requests queue and then fail at the search # step, which is the correct behaviour and still exercises the whole UI path. # Point these at a real instance to test acquisition end to end. export SLSKD_URL="${SLSKD_URL:-http://127.0.0.1:5030}" export SLSKD_API_KEY="${SLSKD_API_KEY:-}" exec .venv/bin/uvicorn app:app --host 127.0.0.1 --port 5041 --reload