An open API service indexing awesome lists of open source software.

https://github.com/xorbit01/retro

๐Ÿ“ผ play musics with command line on linux
https://github.com/xorbit01/retro

command-line linux mpv mpv-config music music-player temrinal tui

Last synced: 8 months ago
JSON representation

๐Ÿ“ผ play musics with command line on linux

Awesome Lists containing this project

README

          

![retro_music](https://github.com/XORbit01/retro/assets/130087473/c9824547-9b09-48fc-a113-e1a847793cca)

play music with command line

[![GitHub release](https://img.shields.io/github/v/release/XORbit01/retro?color=blue&label=release)]()
[![GitHub license](https://img.shields.io/github/license/XORbit01/retro?color=green)]()
[![GitHub issues](https://img.shields.io/github/issues/XORbit01/retro?color=red)]()
[![GitHub stars](https://img.shields.io/github/stars/XORbit01/retro?color=yellow)]()
[![GitHub forks](https://img.shields.io/github/forks/XORbit01/retro?color=orange)]()
[![GitHub watchers](https://img.shields.io/github/watchers/XORbit01/retro?color=blue)]()

play music then continue your work on the terminal.

hi

## ๐Ÿ—บ๏ธ map
- [๐Ÿ“ฆ Installation](#-installation)
- [๐ŸŽฎ Music management](#-music-management)
- [๐ŸŽง Playlist management](#-playlist-management)
- [๐Ÿšฆ๏ธ Controls](#-controls)
- [โš™๏ธ Configuration](#-configuration)
- [๐Ÿ’พ Cache](#-cache)
- [๐ŸŒ Update](#-update)
- [๐Ÿ“ License](#-license)
- [๐Ÿ“ข Acknowledgments](#-acknowledgments)

## ๐Ÿ“ฆ Installation
$${\color{#AC3097}Install \space \color{#56565E}Retro}$$
```sh
wget https://github.com/XORbit01/retro/releases/download/v0.0.46/installer.tar.gz
tar -xvf installer.tar.gz
chmod +x installer.sh
./installer.sh
```
this installer is for linux of `systemd` based systems, if you are using other systems you can install it manually by compiling the source code then run the server as you like with `make build`.

$${\color{#AC3097}Uninstall \space \color{#56565E}Retro}$$
```sh
~/.local/bin/uninstall_retro.sh
```

## ๐ŸŽฎ Music Management
$${\color{#AC3097}Play \space \color{#56565E} Music}$$
```sh
retro play "Despacito - Luis Fonsi" # you can search and play music by name
```
*play command is smart enough to play music from different sources, you can play music by name, url, file path, directory path, queue, and playlist.*
```sh
retro play "https://www.youtube.com/watch?v=kJQP7kiw5Fk" # you can play music by url
retro play queue_music # you can play music from queue, you can do this with music index in the queue
retro play ~/Music/Despacito.mp3 # you can play music by file path
retro play ~/Music/ # you can play music by directory path, it will play all music in the directory
retro play queue_music # it prioritize music in queue and play it first you can do this with music index in the queue
retro play playlist_name # you can play music from playlist
```

$${\color{#AC3097}Status \space \color{#56565E} Music}$$
```sh
retro status # ๐ŸŽต check the queue status tasks downloading|searching, playing|paused, songs in queue
```

$${\color{#AC3097}Pause/Resume \space \color{#56565E}Music}$$
```sh
retro pause # โธ๏ธ
retro resume # โ–ถ ๏ธ
```

$${\color{#AC3097}Next/Previous \space \color{#56565E}Music Queue}$$
```sh
retro next # โญ๏ธ๏ธ
retro prev # โฎ๏ธ๏ธ
```
$${\color{#AC3097} Remove \space \color{#56565E}Music from Queue}$$
```sh
retro remove music_name #๐Ÿ—‘๏ธ
```
you can remove music from queue by name or index `retro remove 1`

$${\color{#AC3097}Adjust \space \color{#56565E}Volume}$$
```sh
retro vol 50 # ๐ŸŽš๏ธ set volume to 50%
retro vol 0 # ๐Ÿ”‡ mute volume Adjust
```

$${\color{#AC3097}Stop \space \color{#56565E}Music Queue}$$
```sh
retro stop # ๐Ÿ›‘
```
## ๐ŸŽง Playlist Management
$${\color{#AC3097}Create \space \color{#56565E}Playlist}$$
```sh
retro list create my_playlist # ๐Ÿ“‚
```

$${\color{#AC3097}Add \space \color{#56565E}Music to Playlist}$$
```sh
retro list add my_playlist "Despacito - Luis Fonsi" # โž• search and add song to playlist
retro list add my_playlist "https://www.youtube.com/watch?v=kJQP7kiw5Fk" # โž• add song to playlist by url
retro list add my_playlist queue_music # โž• add music from queue
```
*you can add music to playlist by name, url, queue (index|name`retro list add my_playlist music_index`) and file path*

$${\color{#AC3097}Remove \space \color{#56565E}Music from Playlist}$$
```sh
retro list remove my_playlist "Despacito - Luis Fonsi" # โž– remove song from playlist
retro list remove my_playlist 1 # โž– remove song from playlist by index
```

$${\color{#AC3097}Show \space \color{#56565E}Playlist}$$
```sh
retro list my_playlist # ๐Ÿ“‚ show all songs in playlist
```

$${\color{#AC3097}Play \space \color{#56565E}Playlist}$$
```sh
retro list play my_playlist # ๐Ÿ“‚ add all songs in playlist to queue
```
$${\color{#AC3097}Delete \space \color{#56565E}Playlist}$$
```sh
retro list remove my_playlist # ๐Ÿ“‚ delete playlist
```

## ๐Ÿšฆ Controls
$${\color{#AC3097}Logs \space \color{#56565E}Control}$$
```sh
retro logs # ๐Ÿ“œ show all logs #last 200 lines
retro logs info # ๐Ÿ“ข show all info logs
retro logs error # ๐Ÿšซ show all error logs
retro logs warn # โš ๏ธ show all warning logs
```

$${\color{#AC3097}Changing \space \color{#56565E}Theme}$$
```sh
retro theme pink #๐Ÿงผ
retro theme purple #๐Ÿ”ฎ
retro theme blue #๐ŸŒŠ
# TODO: retro theme custom
```

$${\color{#AC3097}Command \space \color{#56565E}Help}$$
```sh
retro help #โ“ show all commands
retro help play #โ— show play command help
```
## ๐Ÿ’พ Cache

$${\color{#AC3097}Cache \space \color{#56565E}Control}$$
```
retro cache # ๐Ÿ’พ show all cached data
retro cache clear # ๐Ÿงน clear all cache
```

## ๐Ÿ”ง Configuration

$${\color{#AC3097}Config \space \color{#56565E}File}$$

the config file is located by default in `~/.retro/config.json`
if not found, you can create it manually by
```sh
mkdir -p ~/.retro
touch ~/.retro/config.json
```
$${\color{#AC3097}Default \space \color{#56565E}Config}$$
```json

{
"retro_path": "~/.retro/",
"path_ytldpl": "yt-dlp",
"path_ffmpeg": "ffmpeg",
"path_ffprobe": "ffprobe",
"search_timeout": 60000000000,
"theme": "pink",
"db_path": "~/.retro/retro.db",
"discord_rpc": false,
"log_file": "~/.retro/retro.log",
"server_port": "3131"
}
```
you can change the config manually, easy to understand and modify.

$${\color{#AC3097}Note \space \color{#56565E}that}$$

* โ˜ ๏ธ if you change the config file, its recommended to restart the retro service.
with `systemctl --user restart retro`
* โš ๏ธ the config file will override the default values.
* ๐Ÿค– please make sure to setup the autocompletion script to have a better experience with retro. see `retro completion`
## ๐ŸŒ Update
$$\color{#AC3097}Retro \space \color{#56565E}Update$$

to update retro to the latest version on github you can use the following command
```sh
retro update
```

## ๐Ÿ“ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

## ๐Ÿ“ข Acknowledgments

#### $${\color{#AC3097}Thanks \space to \space our \space sponsor \space \color{#FF99EE}@HelloHabiba \space โ˜•}$$
#### $${\color{#AC3097}retro \space \color{#56565E}is \space made \space with \space \color{red} โค๏ธ}$$