Browse and listen to thousands of radio stations across the globe right from your terminal ๐ ๐ป ๐ตโจ
radio
rust
tokio
web-radio
command-line-tool
tui
1
2
3
4# TuneIn CLI ๐ป ๐ต โจ
5
6<p>
7 <a href="https://flakehub.com/flake/tsirysndr/tunein-cli" target="_blank">
8 <img src="https://img.shields.io/endpoint?url=https://flakehub.com/f/tsirysndr/tunein-cli/badge" />
9 </a>
10 <a href="https://crates.io/crates/tunein-cli" target="_blank">
11 <img src="https://img.shields.io/crates/v/tunein-cli.svg" />
12 </a>
13 <a href="https://crates.io/crates/tunein-cli" target="_blank">
14 <img src="https://img.shields.io/crates/dr/tunein-cli" />
15 </a>
16 <a href="#">
17 <img alt="GitHub Downloads (all assets, all releases)" src="https://img.shields.io/github/downloads/tsirysndr/tunein-cli/total" />
18 </a>
19 <a href="LICENSE" target="./LICENSE">
20 <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg" />
21 </a>
22 <a href="https://github.com/tsirysndr/tunein-cli/actions/workflows/ci.yml">
23 <img src="https://github.com/tsirysndr/tunein-cli/actions/workflows/ci.yml/badge.svg" />
24 </a>
25</p>
26
27A command line interface for [TuneIn Radio](https://tunein.com) / [Radio Browser](https://www.radio-browser.info/).<br />
28You can search for stations, play them, and see what's currently playing.
29
30
31
32## ๐ Installation
33
34Compile from source, without Nix:
35
36```bash
37# Install dependencies
38brew install protobuf # macOS
39sudo apt-get install -y libasound2-dev protobuf-compiler libdbus-1-dev # Ubuntu/Debian
40# Compile and install
41git clone https://github.com/tsirysndr/tunein-cli
42cd tunein-cli
43cargo install --path .
44```
45
46With Nix:
47
48```bash
49git clone https://github.com/tsirysndr/tunein-cli
50cd tunein-cli
51nix develop --experimental-features "nix-command flakes"
52cargo install --path .
53```
54
55### macOS/Linux
56
57Using Bash:
58
59```bash
60curl -fsSL https://cdn.jsdelivr.net/gh/tsirysndr/tunein-cli@ab6a1ab/install.sh | bash
61```
62
63Using [Homebrew](https://brew.sh):
64
65```bash
66brew install tsirysndr/tap/tunein
67```
68
69Using [Nix](https://nixos.org/nix/):
70
71```bash
72cachix use tsirysndr
73nix profile install --experimental-features "nix-command flakes" github:tsirysndr/tunein-cli
74```
75
76### Ubuntu/Debian
77
78```bash
79echo "deb [trusted=yes] https://apt.fury.io/tsiry/ /" | sudo tee /etc/apt/sources.list.d/fury.list
80sudo apt-get update
81sudo apt-get install tunein-cli
82```
83
84### Fedora
85
86Add the following to `/etc/yum.repos.d/fury.repo`:
87
88```
89[fury]
90name=Gemfury Private Repo
91baseurl=https://yum.fury.io/tsiry/
92enabled=1
93gpgcheck=0
94```
95
96Then run:
97```bash
98dnf install tunein-cli
99```
100
101### Arch Linux
102Using [paru](https://github.com/Morganamilo/paru):
103
104```bash
105paru -S tunein-cli-bin
106```
107
108Or download the latest release for your platform [here](https://github.com/tsirysndr/tunein-cli/releases).
109
110## ๐ฆ Downloads
111- `Mac`: arm64: [tunein_v0.4.1_aarch64-apple-darwin.tar.gz](https://github.com/tsirysndr/tunein-cli/releases/download/v0.4.1/tunein_v0.4.1_aarch64-apple-darwin.tar.gz) intel: [tunein_v0.4.1_x86_64-apple-darwin.tar.gz](https://github.com/tsirysndr/tunein-cli/releases/download/v0.4.1/tunein_v0.4.1_x86_64-apple-darwin.tar.gz)
112- `Linux`: [tunein_v0.4.1_x86_64-unknown-linux-gnu.tar.gz](https://github.com/tsirysndr/tunein-cli/releases/download/v0.4.1/tunein_v0.4.1_x86_64-unknown-linux-gnu.tar.gz)
113
114## ๐ Usage
115```
116USAGE:
117 tunein <SUBCOMMAND>
118
119OPTIONS:
120 -h, --help Print help information
121 -p, --provider <provider> The radio provider to use, can be 'tunein' or 'radiobrowser'.
122 Default is 'tunein' [default: tunein]
123 -V, --version Print version information
124
125SUBCOMMANDS:
126 browse Browse radio stations
127 help Print this message or the help of the given subcommand(s)
128 play Play a radio station
129 search Search for a radio station
130 server Start the server
131 service Manage systemd service for tunein-cli server
132```
133
134Search for a radio station:
135```bash
136tunein search "BBC Radio 1"
137```
138Result:
139```
140BBC Radio 1 | The best new music | id: s24939
141BBC Radio 1Xtra | Remi Burgz | id: s20277
142```
143
144Play a radio station:
145```bash
146tunein play "alternativeradio.us"
147# Or by station ID
148tunein play s221580
149```
150
151## ๐ง Systemd Service
152
153Tunein daemon can be started as a systemd service. To enable and start the service, run the following command:
154
155```bash
156tunein service install
157```
158
159To disable and stop the service, run the following command:
160
161```bash
162tunein service uninstall
163```
164
165To check the status of the service, run the following command:
166
167```bash
168tunein service status
169```
170
171
172## API Documentation
173[https://buf.build/tsiry/tuneinserverapis/docs/main:tunein.v1alpha1](https://buf.build/tsiry/tuneinserverapis/docs/main:tunein.v1alpha1)
174
175You can start the server locally by running:
176```bash
177tunein server
178```
179
180and then use [Buf Studio](https://studio.buf.build/tsiry/tuneinserverapis?selectedProtocol=grpc-web&target=http%3A%2F%2Flocalhost%3A8090) to make requests to the server
181
182<img src="./api.png" />
183
184
185## ๐ License
186[MIT](LICENSE)