onair
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-vlcbinding 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/stopcontrol playback without leaving the shell.mute(m) andunmute(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
nextor 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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| onair-1.1.2.tar.gz | 553.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| onair-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 577.8 kB
Release files / onair-1.1.2.tar.gz
| Download URL | onair-1.1.2.tar.gz |
|---|---|
| Size | 553.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3739b18e4a50d6abeb478f3aec3420044a0034b4535189404069e13b5dccb4fa
|
|
BLAKE2b-256 checksum How to use checksums |
e2e7dc3ebf94049c33ff00a329644babe6dadfffd0f891c627dd03d38644fa83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","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.2-py3-none-any.whl
| Download URL | onair-1.1.2-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2d762c2aab2eb1b90c27e24a827b73d39411844d52d7e57aaf2eb591274527f
|
|
BLAKE2b-256 checksum How to use checksums |
fbc9a940d9db4e47546cbcdbcaa1832e6813f87762fe63f8650acd335703eb75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","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.2
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.