Command: itunes / music

Control the iTunes or Music application from the command line.

Note: On macOS Catalina (10.15) and later, this command controls the Music app. On older versions, it controls iTunes. The functionality is identical.

Usage

Usage: m itunes [OPTION] [ARGUMENTS]

Description: Control iTunes/Music via command line

Options:
  --help            Show this help message
  --status          Show current status
  --play            Play current track
  --stop            Stop current track
  --pause           Pause current track
  --next            Play next track
  --prev            Play previous track
  --mute            Mute itunes/music
  --vol LEVEL       Set volume to LEVEL (0-100)
  --quit            Quit itunes/music

Options

--status

Displays the current player state (playing, paused, stopped) and, if playing, shows the artist and title of the current track.

Example:

m itunes --status

--play / --pause / --stop

Controls playback.

Example:

m itunes --pause

--next / --prev

Skips to the next or previous track in the queue.

Example:

m itunes --next

--mute / --unmute

Mutes or unmutes the application's volume without changing the volume level.

Example:

m itunes --mute

--vol LEVEL

Sets the application's volume to a specific level, from 0 (silent) to 100 (maximum).

Example:

m itunes --vol 75

--quit

Closes the iTunes or Music application.

Example:

m itunes --quit