Skip to content

CLI and Command Mode

Rmpc also features a basic command line interface to support scripting and headless control of mpd without a need for additional tools.

To view the available commands run rmpc --help.

These commands are also available in the TUI mode by pressing CommandMode bind (: by default).

Additionally, these commands can also be bound to a key using the Command action as described here

You can also get help for a specific command by running the command with --help. For example rmpc toggle-output --help.

> rmpc help
Usage: rmpc [OPTIONS] [COMMAND]
Commands:
config Prints the default config. Can be used to bootstrap your config file
update Scan MPD's music directory for updates
rescan Scan MPD's music directory for updates. Also rescans unmodified files
theme Prints the default theme. Can be used to bootstrap your theme file
albumart Saves the current album art to a file. Exit codes: * 0: Success * 1: Error * 2: No album art found * 3: No song playing
debuginfo Prints information about optional runtime dependencies
version Prints the rmpc version
play Plays song at the position in the current playlist. Defaults to current paused song
pause Pause playback
unpause Unpause playback
togglepause Toggles between play and pause
stop Stops playback
next Plays the next song in the playlist
prev Plays the previous song in the playlist
volume Sets volume, relative if prefixed by + or -. Prints current volume if no arguments is given
repeat On or off
random On or off
single On, off or oneshot
consume On, off or oneshot
seek Seeks current song(seconds), relative if prefixed by + or -
clear Clear the current queue
add Add a song to the current queue. Relative to music database root. '/' to add all files to the queue
addyt Add a song from youtube to the current queue
outputs List MPD outputs
toggleoutput Toggle MPD output on or off
enableoutput Enable MPD output
disableoutput Disable MPD output
status Prints various information like the playback status
song Prints info about the current song. If --path specified, prints information about the song at the given path instead. If --path is specified multiple times, prints an array containing all the songs
mount Mounts supported storage to MPD
unmount Unmounts storage with given name
listmounts List currently mounted storages
help Print this message or the help of the given subcommand(s)
Options:
-c, --config <FILE> [default: /home/<USER>/.config/rmpc/config.debug.ron]
-a, --address <ADDRESS> Override the address to connect to. Defaults to value in the config file
-h, --help Print help