Skip to content

andreztz/xradios

Repository files navigation

Xradios 📻

"Search, bookmark, and stream internet radio stations directly from your terminal."

PyPI Version License: MIT Python Version

Xradios is a terminal tool to discover and streaming radio stations worldwide.

Features ✨

  • Search: Find radio stations by name, genre, country, language or other criteria.
  • Stream: Play radio stations directly in your terminal.
  • Interactive Interface: Navigate and control playback with keyboard shortcuts.
  • Bookmarks: Save stations for quick access. (TODO)

Installation 🛠️

Prerequisites

  • Python 3.8 or higher
  • mpv or libmpv for audio playback

Using pipx (recommended)

pipx install xradios

Alternative: Install via pip

pip install --user xradios

Usage 🚀

You can run xradios in two modes:

1. Run the client and Server together (Local Mode)

If you want to launch the interactive interface and automatically start the server (if not already running), just run:

xradios

By default, it connects to 127.0.0.1:10000. You can override this by specifying the address and port:

xradios --host 192.168.0.10 --port 9000

If the host is local (127.0.0.1 or 0.0.0.0), xradios will try to start the server automatically.

2. Run the Server and Client Separately (Advanced / Remote Mode)

You can manually start the server and then connect to it using the client.

xradiosd

Or with custom host and port:

xradiosd --host 0.0.0.0 --port 9000

Then, start the client and connect to the server:

xradios --host 192.168.0.10 --port 9000

Commands

  • Open command line: Press :
  • Navigate: Use Ctrl + UP/Ctrl + DOWN to move focus.
  • Search for stations: search tag=rock limit=100 order=votes
  • Play a station: Select a station with UP/DOWN and press ENTER.
  • Exit: Press Ctrl + q

Press ? to see a complete list of shortcuts and commands.

Development Setup 💻

  1. Clone the repository and navigate into project directory:
git clone git@github.com:andreztz/xradios.git
cd xradios
  1. Install development dependencies using the following command:
uv sync --dev
uv pip install -e .
  1. Start the xradios server by running:
xradiosd
  1. Open a new terminal, and run textual console to monitor log messsages:
textual console
  1. In another terminal run xradios application in development mode:
textual run --dev xradios
  1. Run tests:
pytest

Contributing 🤝

Contributions are welcome! Please open an issue or submit a pull request.
See CONTRIBUTING.md for guidelines.

Troubleshooting 🔧

  • No audio? Ensure mpv or libmpv is installed and accessible in you PATH.

Meta 📬

André P. Santos – @ztzandreandreztz@gmail.com

Distributed under the MIT license. See LICENSE for details.

GitHub: https://github.com/andreztz/xradios

About

Search, and stream internet radio stations directly from your terminal

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published