# GoStations ### console based radio station selector and player
**WOMM Platinum Certified** (per [WOMM-STD-001:2026](https://repos.gmgauthier.com/gmgauthier/womm-certification)) This is a port of a Python script I wrote, called "radiostations". It is a simple console tool to grab a list of radio stations retrieved from `radio-browser.info`, put them into a menu, and then use your local installation of a console stream player, to play the station for you. ## Requirements * OS: Linux or macOS (Windows via the installers or WSL) * Recommended player: `mpv` (with `--no-video`). Alternatives (`mpg123`, `mplayer`, etc.) can be configured in the ini file. * For building from source: Go 1.24.2+ ## Install (for normal users) The easiest way is the one-liner installer attached to each release: ### Linux / macOS ```bash curl -L https://repos.gmgauthier.com/gmgauthier/gostations/releases/download/v2.1.0/gostations-install.sh \ | VERSION=2.1.0 bash ``` ### Windows (PowerShell) / macOS / Linux with PowerShell ```powershell irm https://repos.gmgauthier.com/gmgauthier/gostations/releases/download/v2.1.0/gostations-install.ps1 | iex ``` The installer: - Detects your OS and architecture. - Downloads the matching `gostations-OS-ARCH-vX.Y.Z.tar.gz` (verifies checksum when possible). - Installs the binary to `~/.local/bin/gostations` (`.exe` on Windows). - Prints `PATH` advice if needed and runs `gostations -v`. After installation, just run `gostations`. On first launch it creates a default `radiostations.ini` under `$XDG_CONFIG_HOME/gostations/` (usually `~/.config/gostations/radiostations.ini`) if none exists. ## Usage ### TUI (default) `gostations` (no arguments) launches the modern Bubble Tea UI: - If you have any **favorites**, they are loaded first as the initial list (title: "Your Favorites"; entries marked ★). - Otherwise a broad default search is performed against radio-browser.info (title includes "new TUI • ★ = favorite"). - Type to filter the visible list (filter activates automatically). - While filtering, press **Enter** to perform a fresh server-side search (replaces the list; favorites still get ★). - **f** / **F** — toggle favorite (★) on the selected station. - Arrow keys / vim keys — navigate. - **Enter** on a station — switch to the dedicated playback view. - **q** or **Ctrl+C** — quit. ### Playback View A compact, Winamp-inspired screen: - Large "NOW PLAYING" viewer area (dark background + green text) showing live streamed metadata (station + song titles delivered over mpv JSON IPC). - A vertical volume bar to the right of the metadata (dark gray background, green fill from the bottom; same height as the viewer; small gap). - Keyboard-driven on-screen controls: - `←` / `→` (or `h`/`l`) — skip back/forward. - `↑` / `↓` — volume up/down. - `m` / `M` — mute / unmute. - `Space` or `p` / `P` — play / pause. - `s` / `S` / `x` / `X` — stop playback and return to the station list. - `q` quits the whole app. Playback runs in the background; the TUI stays responsive. ### CLI subcommands (scripting) ``` gostations find [-n name] [-c country] [-s state] [-t tags] [-x] [-j] gostations play [-n name] [-c country] [-s state] [-t tags] [-x] [url] gostations fav list | add | del ... gostations -v gostations --legacy # force the classic wmenu UI (temporary) ``` Global search flags (`-n`/`-c`/`-s`/`-t`/`-x`) are accepted by `find`, `play`, and `fav add|del`. - `find` — search and print results (`-j`/`--json` for machine-readable). - `play` — play the first match (or a direct URL). Uses the player + options from the ini. - `fav list` — show your favorites (1-based index, stable sort by name). - `fav add` — add by search flags or direct URL. - `fav del` — remove by 1-based index (from `fav list`), search flags, or direct URL. Examples: ```bash gostations find -c "United Kingdom" -t "news" -j gostations play -c Gambia gostations play http://stream.example.com/radio.mp3 gostations fav list gostations fav add -n "WFMT" gostations fav del 3 gostations fav del http://... ``` Run `gostations