Free and ad-free, thanks to you. Support
Playback 4 min read Updated October 2026

Control RustMusic from the command line

Since version 0.4.2, RustMusic accepts commands at launch: /play, /pause, /next… If the app is already open, the command is passed to it without bringing the window forward. That’s all you need to control your music from a Stream Deck, a keyboard shortcut, a script or the task scheduler.

01

The commands

CommandEffect
/playStarts playback (no effect if music is already playing)
/pausePauses (if music is playing)
/playpause or /togglePlay or pause, depending on the state
/stopStops playback
/nextNext track
/prev or /previousPrevious track
/showShows the RustMusic window
/exit or /quitQuits RustMusic

The /, - and -- prefixes are all accepted (/play, -play, --play), regardless of upper and lower case. Several commands can follow one another: they run in order.

02

App open or closed

  • RustMusic is already open: the command is passed to the existing window, without bringing it to the front (except with /show).
  • RustMusic is not open: it starts and runs the command as soon as the interface is ready. /show and /exit only act if RustMusic is already open.
  • Without a command, a second launch simply brings back the existing window.
03

On Windows, macOS and Linux

Windows: run RustMusic.exe with the command. The program’s full path is in the properties of its shortcut (right-click → Properties → Target).

"C:\path\to\RustMusic.exe" /next

macOS: the program is inside the app bundle.

/Applications/RustMusic.app/Contents/MacOS/RustMusic /next

Linux: with the AppImage, pass the command to the file itself. For the .deb and .rpm packages, reuse the command from the Exec line of the RustMusic launcher (its .desktop file).

./RustMusic_0.4.3_amd64.AppImage /next
04

Stream Deck, shortcuts and scripts

  • Stream Deck and programmable key software: create an action that opens a program, with RustMusic and the command as its argument (/playpause, /next…).
  • Keyboard shortcut on Windows: create a shortcut to RustMusic.exe, add the command at the end of the Target, then pick a combination in “Shortcut key”.
  • On Linux, add a custom shortcut in your desktop’s keyboard settings; on macOS, a “Run Shell Script” action in the Shortcuts app.
  • Music alarm clock: the Windows Task Scheduler (or cron on Linux) can start RustMusic with /play at the time of your choice.

If you simply want the music to start again each time RustMusic opens, turn on “Play on startup” in Settings → General → Startup instead.

Frequently asked questions

Do the commands bring the window forward?

No, except /show: the command is passed to RustMusic without bringing it to the front.

Can I set the volume from the command line?

Not for now: the commands control playback (play, pause, stop, next, previous), the window and quitting.

Can I pass a specific file as an argument?

Not yet: paths passed as arguments are ignored by the launch commands.

Does it work on macOS and Linux?

Yes, the commands are the same on all three systems; only the program’s path changes.

Your music, at the press of a key

RustMusic can be controlled from the command line, a Stream Deck, a shortcut or a script. Free, open source, no account.

Further reading