Skip to main content

onair

CI PyPI Python License

Turn your terminal into an internet radio. onair is a small interactive shell for finding and playing stations by genre, country, or language.

Features

  • Browse genres, countries, and languages, optionally filtered by name.
  • Play a genre, a country (name or ISO code), a language, or a random genre.
  • Jump between stations and return to recently played ones.
  • Pause, resume, stop, mute, unmute, and set volume with n, +n, or -n.
  • Start with flags such as --play jazz --volume 30 (or -p / -v), then continue in the REPL.
  • Show the current station with info.
  • Tab completion, command history, and short aliases (p, c, l, v, m, and others).
  • Discover stations through Radio Browser without an API key.

Requirements

  • Python 3.12 or newer.
  • VLC installed on your system. The python-vlc binding is installed with onair, but playback still requires the VLC application and its native library.

Quick start

Install the release from PyPI:

python -m pip install onair
onair

Or run it without installing by using uv:

uvx onair

To run the source:

uv sync
uv run onair

Start a station from the command line, then keep using the shell:

onair --play jazz --volume 30
onair -p jazz -v 30
onair --country poland
onair -c poland
onair --language polish
onair -l polish
onair --version

Startup flags select a station and set its initial volume before opening the interactive shell. When only a volume flag is given, onair chooses a random genre.

Common tasks

Start quietly and keep the interactive shell open:

onair --play jazz --volume 20

Browse before choosing a station:

onair> genres chill
onair> countries pol
onair> languages en
onair> play chillout

Move between stations and inspect the current one:

onair> next
onair> previous
onair> info

Commands

Run help for every command and help play for command-specific examples.

Discover:

  • genres [filter] lists genres.
  • countries [filter] lists countries.
  • languages [filter] lists languages.
  • play [genre] (p) plays a genre. With no genre, it resumes paused playback or picks a genre at random.
  • country [name|ISO] (c) plays a station from a country.
  • language [name] (lang, l) plays a station in a language.

Playback:

  • next (skip) plays the next station.
  • previous (prev, back) plays the previous station.
  • pause / resume / stop control playback without leaving the shell.
  • mute (m) and unmute (um) silence or restore audio.
  • volume [n|+n|-n] (v, vol) sets volume, or changes it with +n / -n.

Session:

  • info (i, information) shows the current station.
  • help [command] lists commands or explains one command.
  • quit (q, exit, e) stops playback and exits.

Troubleshooting

  • No audio: make sure the VLC application is installed, then restart the terminal.
  • A station does not play: try next or choose another genre, country, or language.
  • Lists are empty: Radio Browser may be unavailable or blocked by the network. Try again later.

Acknowledgments

Inspired by cmd.fm. onair is an independent project and is not affiliated with or endorsed by cmd.fm.

Development

See CONTRIBUTING.md for the development workflow and release process.

License

Licensed under the MIT License.

Metadata

Release files for onair 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onair 1.1.1
File Size Uploaded Provenance
onair-1.1.1.tar.gz 57.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for onair 1.1.1
File Interpreter ABI Platform
onair-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 81.4 kB

Release files / onair-1.1.1.tar.gz

Download URL onair-1.1.1.tar.gz
Size 57.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8a9cb88617e39f1284d1a316032c5ebfc53df5d2ac195a04c6328c00c754d945
BLAKE2b-256 checksum
How to use checksums
8c57ad75fb2288879490b60ffb2bdd116002c93ea6dd8ff8fc0107e074bf334b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / onair-1.1.1-py3-none-any.whl

Download URL onair-1.1.1-py3-none-any.whl
Size 24.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4efc022d1fae8910efd1ff23c848604cd9cb27423cbd20c8d80bceb6369c6be5
BLAKE2b-256 checksum
How to use checksums
bfcd71a219f6925359487613146952c5e8e49fbbbe69412a74d07eac57cc76ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for onair 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page