CLI reference¶
Auto-generated from station-studio --help at docs-build
time by scripts/dump_cli_help.py. Drift between this
page and the running CLI is impossible by construction —
every push-to-main rebuilds it from
station_studio/cli.py.
station-studio --help¶
Usage: station-studio [OPTIONS] COMMAND [ARGS]...
Open-source playlist generator for hobbyist radio stations.
Run `station-studio serve` to start the app, then open http://localhost:8001
in a browser.
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
app Open Station Studio in the browser, starting it first if it...
backup Tar up the app-home (DB, stations, exports, anything else under...
export Export a generated playlist as iTunes XML.
generate Generate a playlist for one station and one week.
import Import an iTunes XML as a named pool.
seed (Re)copy any MISSING bundled example stations into the...
serve Start the FastAPI app (the web UI + API).
station-studio serve --help¶
Usage: station-studio serve [OPTIONS]
Start the FastAPI app (the web UI + API).
Options:
--host TEXT Bind address. Default 127.0.0.1 (loopback only). For other
computers, also list the names they'll use in
STATION_STUDIO_ALLOWED_HOSTS. [default: 127.0.0.1]
--port INTEGER Port to bind. Default 8001 (matches the dev `run.py`).
[default: 8001]
--help Show this message and exit.
station-studio app --help¶
Usage: station-studio app [OPTIONS]
Open Station Studio in the browser, starting it first if it isn't running.
Like `serve`, plus a Quit button on the page. What the downloaded Mac and
Windows apps run.
Options:
--port INTEGER Port to use (always on 127.0.0.1). [default: 8001]
--no-browser Don't open the browser.
--help Show this message and exit.
station-studio import --help¶
Usage: station-studio import [OPTIONS] [PATH]
Import an iTunes XML as a named pool. Reads PATH, creates a source_playlist
row in the app-home's DB, inserts/updates tracks. Mirrors the POST
/api/sources/upload endpoint.
Options:
--name TEXT Pool name (e.g. DAYTIME, JINGLES).
--role [content|reference] content = engine samples from this pool; reference
= cross-ref only. [default: content]
--help Show this message and exit.
station-studio seed --help¶
Usage: station-studio seed [OPTIONS]
(Re)copy any MISSING bundled example stations into the app-home's stations
dir. Existing files are preserved (user edits aren't clobbered); delete a
station and re-run to restore it.
Options:
--help Show this message and exit.
station-studio generate --help¶
Usage: station-studio generate [OPTIONS] SLUG
Generate a playlist for one station and one week. Persists Playlist + Trace
rows + advances cursors. Equivalent to the POST /api/stations/{slug}/generate
endpoint, runnable without a running server. Prints the new playlist id on
success.
Options:
--week INTEGER Week number to generate (1-based, integer ≥ 1). [required]
--seed INTEGER The random seed, for a station with randomness on. Default, as
in the app: regenerating a week reuses the seed it was
generated with; a new week gets a new one. The seed used is
printed. Ignored when randomness is off.
--help Show this message and exit.
station-studio export --help¶
Usage: station-studio export [OPTIONS] PLAYLIST_ID
Export a generated playlist as iTunes XML. Default: writes to stdout (pipe-
friendly). With `--output PATH`, writes to a file. With `--to-disk`, writes to
the configured export directory ({export_dir}/{station-slug}/{week:03d}.xml).
Options:
-o, --output FILE Write the XML to this file path (creates parent dirs).
--to-disk Write to the configured exports dir using the standard
layout {exports}/{slug}/{week:03d}.xml. Mutually exclusive
with --output.
--help Show this message and exit.
station-studio backup --help¶
Usage: station-studio backup [OPTIONS]
Tar up the app-home (DB, stations, exports, anything else under
$STATION_STUDIO_HOME). Writes a timestamped .tar.gz under the home's
`backups/` subdir by default; override with --output.
Options:
-o, --output FILE Output path for the backup archive. Default:
$STATION_STUDIO_HOME/backups/station-studio-YYYYMMDD-
HHMMSS.tar.gz
--help Show this message and exit.