Go to file
Greg Gauthier 67c7a93155
All checks were successful
CI / Test (push) Successful in 56s
Release / Create Release (push) Successful in 2m25s
CI / Build (push) Successful in 43s
chore(release): prepare v2.1.0 UI polish release
2026-06-06 11:20:50 +01:00
.gitea/workflows fix(ci): add 'go mod tidy' before ./ci-build.sh in the Linux Build step of build.yml (mirrors the test job and release workflow; ensures complete go.sum for 'make build' / go build in the push-triggered Build flow) 2026-06-06 08:17:32 +01:00
assets docs(readme): add WOMM Platinum certification badge 2026-06-06 09:17:02 +01:00
internal chore(release): prepare v2.1.0 UI polish release 2026-06-06 11:20:50 +01:00
scripts chore(release): prepare v2.0 infrastructure (Makefile, release.sh, Gitea release workflow, installers, modern versioning) 2026-06-05 23:39:40 +01:00
.gitignore ignore the go.sum. every time a build occurs this changes. No need to capture, if the build is always going to generate this anyway 2021-03-19 08:02:02 +00:00
browser_test.go basic testing and a few tweaks 2021-03-17 19:11:18 +00:00
browser.go refactor: reorganize into internal packages, fix critical panics and error handling 2026-06-05 21:10:54 +01:00
build.ps1 chore(release): prepare v2.0 infrastructure (Makefile, release.sh, Gitea release workflow, installers, modern versioning) 2026-06-05 23:39:40 +01:00
build.sh chore(release): prepare v2.0 infrastructure (Makefile, release.sh, Gitea release workflow, installers, modern versioning) 2026-06-05 23:39:40 +01:00
CHANGELOG.md chore(release): prepare v2.1.0 UI polish release 2026-06-06 11:20:50 +01:00
ci-build.sh fix(ci): modernize on-push build.yml to use actions/setup-go@1.24 + cache + go mod download (fixes Go 1.22.5 vs go.mod 1.24.2 mismatch); keep 'Linux Build' step name for compatibility; update ci-build.sh 2026-06-06 08:03:26 +01:00
commander_test.go feat(cli): default to bubbles TUI, add find/play subcmds + JSON favorites 2026-06-05 21:23:11 +01:00
commander.go fix(commander): capture output via CombinedOutput instead of piping streams 2026-06-05 23:34:09 +01:00
config_test.go basic testing and a few tweaks 2021-03-17 19:11:18 +00:00
config.go refactor: reorganize into internal packages, fix critical panics and error handling 2026-06-05 21:10:54 +01:00
filer_test.go feat(cli): default to bubbles TUI, add find/play subcmds + JSON favorites 2026-06-05 21:23:11 +01:00
filer.go forgot to remove fileClose 2021-03-17 13:49:29 +00:00
go.mod chore: remove duplicate SHELL declaration and organize go.mod dependencies 2026-06-06 08:06:00 +01:00
ISSUES.md feat(cli): default to bubbles TUI, add find/play subcmds + JSON favorites 2026-06-05 21:23:11 +01:00
Makefile fix(ci): make test targets depend on 'deps' in Makefile; add 'go mod tidy' before 'make test-short' in build.yml test job (consistent with release workflow fix for missing go.sum entries during go test builds) 2026-06-06 08:09:52 +01:00
radiomenu_test.go test: disable parallel execution to fix data races 2026-06-06 09:57:43 +01:00
radiomenu.go feat(cli): default to bubbles TUI, add find/play subcmds + JSON favorites 2026-06-05 21:23:11 +01:00
radiostations.ini completed the config port 2021-03-16 12:32:59 +00:00
README-CONFIGS.md test commit 2024-07-11 19:16:41 +01:00
README.md chore(release): prepare v2.1.0 UI polish release 2026-06-06 11:20:50 +01:00
release.sh chore(release): update post-tag messages for automated workflow 2026-06-06 08:28:28 +01:00
stations_test.go test: disable parallel execution to fix data races 2026-06-06 09:57:43 +01:00
stations.go chore(release): prepare v2.0 infrastructure (Makefile, release.sh, Gitea release workflow, installers, modern versioning) 2026-06-05 23:39:40 +01:00
VERSION chore(release): prepare v2.0.1 (CI/test/build/release fixes, changelog, VERSION bump) 2026-06-06 08:21:43 +01:00

GoStations

console based radio station selector and player

WOMM Platinum Certified

WOMM Platinum Certified (per WOMM-STD-001:2026)

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

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

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:

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 <subcommand> -h or gostations -h for full flag details.

Legacy UI

Pass --legacy to use the old wmenu-based menu. The flag exists "until the new TUI is perfect." Playback now uses the modern player backend even under --legacy.

Configuration

The ini file is at $XDG_CONFIG_HOME/gostations/radiostations.ini (falls back to ~/.config/gostations/radiostations.ini). A default is generated on first run if missing.

Notable keys:

  • player.command=mpv
  • player.options=--no-video
  • radio_browser.api=... (point at a mirror if desired)
  • menu_items.max=9999

Favorites are stored as JSON (favorites.json) in the same directory. The TUI prefers loading favorites first when any exist.

Develop (for power users & developers)

Prerequisites

  • Go 1.24.2+
  • make (recommended)
  • mpv (for local playback testing)
  • Optional: golangci-lint for make lint

Common tasks

git clone https://repos.gmgauthier.com/gmgauthier/gostations.git
cd gostations

make help                 # list all targets
make build                # dev build (version from git describe, ldflags into internal/version + main.version)
make install              # build + copy to ~/.local/bin/gostations
make test-short           # fast unit tests (no network, no player required)
make test                 # full suite with -race
make test-cover           # coverage report in build/
make lint
make cross                # release matrix (linux/amd64+arm64, darwin/amd64+arm64, windows/amd64)

See the Makefile for the exact ldflags, per-platform go mod download, and the release-notes helper.

Releasing

./release.sh v2.1.0
# or manually
git tag -a v2.1.0 -m "..." 
git push origin v2.1.0

release.sh does a clean-tree check, creates the annotated tag, optionally runs grokkit changelog (best-effort), and pushes. The Gitea Actions workflow (.gitea/workflows/release.yml) then:

  • Checks out the tag.
  • Sets up Go 1.24.2 + module cache.
  • Runs go mod tidy + make cross.
  • Packages tarballs + checksums + the two install scripts.
  • Creates the release (with install instructions in the body) and uploads every asset via the Gitea API using the RELEASE_TOKEN secret.

Project layout (post-reorg)

  • internal/ui/ — Bubble Tea TUI (list + playback view + hint bar + volume bar + polling).
  • internal/player/Player interface + mpvPlayer (JSON IPC via unix socket) + legacy exec fallback.
  • internal/data/ — favorites (JSON, atomic save, sorted list with stable indices).
  • internal/radio/, internal/config/ — search + ini handling.
  • Legacy wmenu code (radiomenu.go, commander.go, etc.) remains gated behind --legacy.
  • scripts/ — installers (.sh + .ps1).
  • .gitea/workflows/ — build + release CI.
  • Makefile + release.sh drive local builds and the tag-triggered release path.

All the pre-2.0 wmenu screenshots, the old go mod vendor instructions, the touchbar error note, and the ancient TODO list have been retired from this document. See git history for the full modernization (TUI, IPC player, favorites + index delete, subcommands, internal/ package reorg, CI/release pipeline, etc.). The --legacy flag remains until the TUI is declared "perfect."


The project is WOMM Platinum certified (see badge at the top).