Your first station in 10 minutes¶
A working playlist from a fresh install, no music library required. The bundled Starter Station auto-seeds on first boot with a synthetic pool of 50 tracks across 10 artists, so you can play with the engine before pointing it at your own music.
What you'll need
- Python 3.11+ (or Docker)
- A terminal
- ~10 minutes
By the end you'll have generated a 168-slot weekly playlist, viewed the per-pick trace explaining every choice, and exported it as iTunes XML.
1. Install (~2 min)¶
Pick the channel that matches what you've already got. All four ship the same UI + API + bundled example stations; the difference is the wrapper.
Two commands, no clone. Needs Python 3.11+
(python --version to check).
macOS: command not found after install?
If station-studio serve prints command not found, pip
installed the CLI to a directory that isn't on your PATH.
This is common on macOS when Python was installed via the
python.org installer — the
pip install prints a warning line like "The script
station-studio is installed in '/Library/Frameworks/…/bin'
which is not on PATH."
Two ways to unblock:
Use the module invocation (no PATH tinkering, works immediately):
Or add the bin directory to your PATH — copy the
/Library/Frameworks/…/bin path from the pip warning,
then append this to ~/.zshrc (or ~/.bash_profile on
older macOS):
Open a new terminal and station-studio serve will work.
The same trick works for pipx or Homebrew Python if their
bin dir isn't already on PATH.
Zero Python or Node needed; the image is multi-stage (~312MB) and includes the SvelteKit static SPA + FastAPI backend.
First run takes ~2 min to build; later runs reuse the image.
It's published on this computer only, since Studio has no login.
To open it from other computers on a network you trust (on a NAS,
say), docker-compose.yml says what to change: publish it on every
address and list the names or addresses they'll use in
STATION_STUDIO_ALLOWED_HOSTS.
Single-process app on localhost, built from a local clone.
Use this over the PyPI channel if you want to try an
unreleased commit. Builds the SvelteKit static bundle into
the wheel; you don't need Node at runtime.
For hacking on Station Studio itself. Two processes (FastAPI
:8001 + SvelteKit :5173) with hot-reload on both. Needs
uv (for the Python packages, at
the versions in uv.lock), Node 22+ and make.
Open http://localhost:5173 instead of :8001 — Vite's dev server proxies the API.
Once the server is running, open http://localhost:8001 (or :5173 for dev clone). You'll see the landing page with four auto-seeded example stations.
2. Look at the Starter Station (~1 min)¶
Click Starter Station in the stations list. The detail page shows:
- Template summary — 168 slots / week, 2 strategies (
weightedfor content,jingleevery 8 slots) - Source pools — three auto-imported on first boot:
STARTER_CONTENT(50 tracks, role: content),STARTER_JINGLES(5 jingle tracks, role: content), andREFERENCE_ARCHIVE(role: reference — declared on the template but not placed by any layout block in the Starter; it's there as the third pool you can reach for if you fork).
Starter is intentionally small + stateless
Smallest, most approachable shape — one slot per hour for a
week. Stateless cursors (persist: false), so each week
generates from pool position 0. Perfect for "how does the
slot+strategy model work?" before you fork anything bigger
or move on to the Stateful Starter for cross-week cursor
state.
3. Generate week 1 (~10 sec)¶
Click the big Generate week 1 → button. The engine runs in the background (you'll see a progress indicator); on completion the page reloads with the new playlist as the first row of a table:
| Week | Slots | Generated | Trace | (actions) |
|---|---|---|---|---|
| 001 | 168 | just now | b3c8… |
view → / ↻ regen / ✕ delete |
(The three rightmost columns are unlabelled in the UI — the
buttons carry their own meaning. The headers exist for screen
readers via visually-hidden labels.)
Click view →.
4. Read the trace (~3 min)¶
The trace viewer (/playlists/{id}) is where Station Studio earns
its keep. Every one of the 168 slots is rendered as a row showing:
- # — slot number (0 to 167)
- Source — coloured chip showing which pool the engine picked
from (
STARTER_CONTENTblue,STARTER_JINGLESorange) - Strategy — the rule that placed this slot (
weightedorjingle) - Pool / Track / Artist — the actual track, plus its position in the source pool
Try this:
- Search for an artist name in the filter bar. The slot count badge shows "Showing N of 168".
- Filter by source — pick
STARTER_JINGLESfrom the dropdown. You should see exactly 21 jingle slots (every 8th: 0, 8, 16…). - Click "🗺 Visualise template" in the station header (or
navigate to
/stations/starter/visualise) — the chips on THAT page open a DetailPanel with full block / macro information. Trace-viewer chips here are display-only spans; the visualise canvas is where chip-click editing lives.
The "Why not these? (N)" toggle on each row (when there are rejections) shows the engine's reasoning for the picks it considered and skipped — useful when a strategy uses artist-dedup / recent-use constraints.
5. Export to disk (~30 sec)¶
Click Export to disk in the trace viewer's actions strip. The engine writes the iTunes XML to the configured output directory and reports back the path + byte count in a status banner that looks roughly like:
Wrote:
/abs/path/out/starter/001.xml(12 KB)
The actual path is the literal string in that banner — read
from there, don't infer. Settings › Exports shows the folder
too, and in the downloaded app Show in Finder (or File
Explorer) opens it. The default output dir is out/
(relative to the process working directory: where you ran
station-studio serve from). To set an absolute path that
survives restarts, write a Config row with key
playlist_output_dir:
-- one-time, against ~/.station-studio/station_studio.db
INSERT INTO config(key, value) VALUES
('playlist_output_dir', '/Users/you/Dropbox/itunes-sync');
If you sync that directory to a Dropbox / OneDrive folder shared with your iTunes box, every generation lands in your library automatically. The same flow drives the Rebirth Radio production loop (2,196 slots/week, Mon-Sun, mixed strategies).
Every week, by itself
Rather than generating and exporting each week by hand, turn on Every week, by itself on the station's page: pick a day and time (Sunday at 19:00, say) and Studio makes the next week then, exports it, and (for a station linked to Station Server) can send it there. Studio has to be running at that time; a time it misses runs when it next starts.
6. Regenerate + version-pick (~30 sec)¶
Back on the station detail page, click the ↻ regen button
on the week-001 row. The engine re-runs against the same
template; on completion the page reloads. Visit the trace
viewer again — at the top you'll now see a version picker
dropdown showing v2 (current) and v1.
This is §16.4 trace versioning in action: the prior trace
isn't deleted, it's preserved as a version you can switch
back to. Pick v1 to see the previous picks; pick v2 to
return to the current. Each version has its own slot table,
seed, generated-at timestamp, and trace-id.
Why isn't this 'Generate week 2'?
The Starter Station is stateless (cursors set
persist: false), so week 2 looks identical to week 1
aside from RNG variance — there's nothing to demonstrate
by stepping forward. The Stateful Starter is built for
that demo: 336 slots/week with a persistent cursor that
advances 24 positions per week, cycling every 14 weeks.
Open it from the sidebar after this tutorial finishes.
What you just did¶
| Step | Took | What landed |
|---|---|---|
| Install + boot | ~2 min | UI + API + 4 auto-seeded stations (Starter / Stateful Starter / Rebirth Classics / Rebirth Radio) + 4 auto-imported pools |
| Look at template | ~1 min | Read 168-slot shape, 2 strategies, 3 declared sources |
| Generate w1 | ~10 sec | 168 picks via weighted + jingle strategies |
| Trace viewer | ~3 min | Per-pick attribution + filter + rejection reasoning |
| Disk export | ~30 sec | iTunes XML on disk, ready for Dropbox sync |
| Regenerate + version pick | ~30 sec | §16.4 trace versioning: prior trace preserved, switchable via dropdown |
Total: well under 10 minutes if you skip the trace deep-dive.
Where next¶
- Stateful Starter — your second station,
with persistent cursors. Click Stateful Starter in the
sidebar to see what the engine does with
sequential+prev_refstrategies across multiple weeks. Template lives on disk atstations/stateful-starter.jsonif you want to read it side-by-side with the trace. - Reference — template grammar, all 8 strategies, the REST API surface, CLI commands.
- Architecture — the design notes future contributors need: how cursor advance works, how the trace records picks, how the visual editor's sidecar grammar maps to the template.
- Fork a starter — back on the
Starter Station detail page, click Fork station in the
header to copy its template under a new slug; tweak via the
wizard at
/stations/<new-slug>/editor by editingstations/<new-slug>.jsondirectly.
When you're ready to use your own music
Open the Sources page in the sidebar and drag in an
iTunes XML export of one of your playlists. Name the pool,
set the role to content, hit Import. Then fork a starter
and edit its sources: block to use your new pool name. See
Reference → Template grammar for the
full schema.