| Crates.io | playit |
| lib.rs | playit |
| version | 1.2.0 |
| created_at | 2025-02-17 16:14:48.500349+00 |
| updated_at | 2025-02-25 09:36:11.402674+00 |
| description | A mpv-based audio runner with features like playlist and more. |
| homepage | https://github.com/kadircy/playit |
| repository | https://github.com/kadircy/playit |
| max_upload_size | |
| id | 1559078 |
| size | 51,464 |
playitAn lightweight and simple AF media player which uses youtube for sources and plays with mpv.
The goal of this project is playing audio without worry about anything.
Also you can integrate playit with almost everything like dmenu / rofi / tofi and their alternatives.

Note: playit requires mpv and youtube-dlp for runtime dependencies.
cargo install playit
curl -sSfL https://raw.githubusercontent.com/kadircy/playit/master/install.sh | sh
rust, cargo and git installed on your system.cargo --version
rustc --version
git --version
git clone https://github.com/kadircy/playit
cargo build --release
Now you can run binary with
./target/release/playit
playit is like other CLI programs. It accept options and print results.
When you run playit without arguments, it will print an small help menu with flags and options.
playit --play <QUERY> will play the given query in background and will print some information about mpv like process id.
playit --playlist <NAME> --add <QUERY> will add given query to the playlist with
playit --playlist <NAME> --play-playlist will play the playlist.
You can see other options in details with: playit --help
To use playit with another programs, you can add keybindings for getting input and using this input to play media.
I prefer using launchers for getting user query or selecting playlist.
We will use Hyprland as an example WM for configurations.
You can integrate playit in dmenu with something like this:
# Bind a key to launch playit with dmenu input
bind = $mainMod, P, exec, playit --play "$(dmenu < /dev/null)"
Also, you can integrate playlists with something like this:
# Bind a key to select and play a playlist using dmenu
bind = $mainMod SHIFT, P, exec, QUERY=$(ls $HOME/.config/playit | sed 's/\..*$//' | dmenu) && playit --playlist "$QUERY" --play-playlist
You can add more features with similar commands. Use playit --help for all options.
If you prefer rofi over dmenu, you can achieve similar functionality with this configuration:
# Bind a key to launch playit with rofi input
bind = $mainMod, P, exec, playit --play "$(rofi -dmenu < /dev/null)"
And for playlists:
# Bind a key to select and play a playlist using rofi
bind = $mainMod SHIFT, P, exec, QUERY=$(ls $HOME/.config/playit | sed 's/\..*$//' | rofi -dmenu) && playit --playlist "$QUERY" --play-playlist
For tofi, the configuration is quite similar. Here’s how you can use it to play media:
# Bind a key to launch playit with tofi input
bind = $mainMod, P, exec, playit --play "$(tofi --require-match=false < /dev/null)"
# Bind a key to select and play a playlist using tofi
bind = $mainMod, P, exec, QUERY=$(ls $HOME/.config/playit | sed 's/\..*$//' | tofi) && playit --playlist "$QUERY" --play-playlist
Contributions are welcome! If you’d like to contribute, please follow these steps:
git checkout -b feature-branch.git commit -am 'Add new feature'.git push origin feature-branch.Please make sure your code follows the style and guidelines of the project. You can format codebase and lint it with this commands:
cargo fmt # format
cargo clippy # lint
This project is licensed under the MIT License - see the LICENSE file for details.