README.md

March 20, 2025 · View on GitHub

retro_music

play music with command line

GitHub release GitHub license GitHub issues GitHub stars GitHub forks GitHub watchers

play music then continue your work on the terminal.

hi

🗺️ map

📦 Installation

Install Retro{\color{#AC3097}Install \space \color{#56565E}Retro}

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.

Uninstall Retro{\color{#AC3097}Uninstall \space \color{#56565E}Retro}

~/.local/bin/uninstall_retro.sh

🎮 Music Management

Play Music{\color{#AC3097}Play \space \color{#56565E} Music}

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.

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

Status Music{\color{#AC3097}Status \space \color{#56565E} Music}

retro status # 🎵 check the queue status tasks downloading|searching, playing|paused, songs in queue

Pause/Resume Music{\color{#AC3097}Pause/Resume \space \color{#56565E}Music}

retro pause  # ⏸️
retro resume # ▶ ️

Next/Previous MusicQueue{\color{#AC3097}Next/Previous \space \color{#56565E}Music Queue}

retro next # ⏭️️
retro prev # ⏮️️

Remove MusicfromQueue{\color{#AC3097} Remove \space \color{#56565E}Music from Queue}

retro remove music_name #🗑️

you can remove music from queue by name or index retro remove 1

Adjust Volume{\color{#AC3097}Adjust \space \color{#56565E}Volume}

retro vol 50 # 🎚️ set volume to 50% 
retro vol 0  # 🔇 mute volume Adjust

Stop MusicQueue{\color{#AC3097}Stop \space \color{#56565E}Music Queue}

retro stop # 🛑

🎧 Playlist Management

Create Playlist{\color{#AC3097}Create \space \color{#56565E}Playlist}

retro list create my_playlist # 📂

Add MusictoPlaylist{\color{#AC3097}Add \space \color{#56565E}Music to Playlist}

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|nameretro list add my_playlist music_index) and file path

Remove MusicfromPlaylist{\color{#AC3097}Remove \space \color{#56565E}Music from Playlist}

retro list remove my_playlist "Despacito - Luis Fonsi" # ➖ remove song from playlist
retro list remove my_playlist 1                        # ➖ remove song from playlist by index

Show Playlist{\color{#AC3097}Show \space \color{#56565E}Playlist}

retro list my_playlist # 📂 show all songs in playlist

Play Playlist{\color{#AC3097}Play \space \color{#56565E}Playlist}

retro list play my_playlist # 📂 add all songs in playlist to queue

Delete Playlist{\color{#AC3097}Delete \space \color{#56565E}Playlist}

retro list remove my_playlist # 📂 delete playlist

🚦 Controls

Logs Control{\color{#AC3097}Logs \space \color{#56565E}Control}

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

Changing Theme{\color{#AC3097}Changing \space \color{#56565E}Theme}

retro theme pink    #🧼 
retro theme purple  #🔮  
retro theme blue    #🌊
# TODO: retro theme custom 

Command Help{\color{#AC3097}Command \space \color{#56565E}Help}

retro help      #❓ show all commands
retro help play #❗ show play command help

💾 Cache

Cache Control{\color{#AC3097}Cache \space \color{#56565E}Control}

retro cache       # 💾 show all cached data
retro cache clear # 🧹 clear all cache

🔧 Configuration

Config File{\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

mkdir -p ~/.retro
touch ~/.retro/config.json

Default Config{\color{#AC3097}Default \space \color{#56565E}Config}


{
  "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.

Note that{\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

Retro Update\color{#AC3097}Retro \space \color{#56565E}Update

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

retro update

📝 License

This project is licensed under the MIT License - see the LICENSE file for details

📢 Acknowledgments

Thanks to our sponsor @HelloHabiba ☕{\color{#AC3097}Thanks \space to \space our \space sponsor \space \color{#FF99EE}@HelloHabiba \space ☕}

retro is made with ❤️{\color{#AC3097}retro \space \color{#56565E}is \space made \space with \space \color{red} ❤️}