mpc
command-line client for MPD
TLDR
Show current song
$ mpc
Play/pause toggle$ mpc toggle
Next track$ mpc next
Previous track$ mpc prev
Add file to playlist$ mpc add [path/to/song.mp3]
Clear playlist$ mpc clear
Set volume$ mpc volume [80]
Update database$ mpc update
Seek within current song$ mpc seek [+10]
Toggle repeat mode$ mpc repeat
SYNOPSIS
mpc [options] [command] [arguments]
DESCRIPTION
mpc is a command-line client for MPD (Music Player Daemon). It connects to a running MPD instance and controls playback, playlists, volume, and playback state according to commands and arguments passed to it.If no command is given, the current status is printed (same as mpc status).
PARAMETERS
-f, --format FORMAT
Configure song display format using metadata delimiters like %artist%, %album%, %title%, %track%, %time%, %file%.-h, --host HOST
Host to connect to. Use password@host for authentication. An absolute path connects via Unix Domain Socket.-p, --port PORT
Port to connect to (default: MPD_PORT env or 6600).-q, --quiet, --no-status
Suppress current song status after commands.-v, --verbose
Verbose output.--wait
Wait for operation to finish (e.g., database update).
COMMANDS
play [position]
Start playback, optionally at a playlist position.pause
Pause playback.toggle
Toggle play/pause.stop
Stop playback.next
Skip to next track.prev
Go to previous track.seek value
Seek within current song (e.g., +10, -5, 50%).volume LEVEL
Set volume percentage (0-100), or relative (+5, -5).repeat [on|off]
Toggle or set repeat mode.random [on|off]
Toggle or set random mode.shuffle
Shuffle the current playlist.crossfade [seconds]
Get or set crossfade between songs (0 disables).add URI
Add a song to the playlist.clear
Clear the playlist.playlist
Print the current playlist.search type query
Search for songs in the database.update [path]
Scan for updated files in the music directory.status
Display current playback status.
CAVEATS
Requires a running MPD instance. The client does not play audio itself. Connection parameters default to localhost:6600 or can be set via MPDHOST and MPDPORT environment variables.
HISTORY
mpc was created as the reference command-line client for the Music Player Daemon project.
