A command line interface for the Streamlabs Desktop websocket API.
For an outline of past/future changes refer to: CHANGELOG
- Python 3.11 or greater
- Streamlabs Desktop
- A websocket token: Settings > Mobile > Third Party Connections > API Token
uv tool install slobs-clipipx install slobs-cliThe CLI should now be discoverable as slobs-cli
- --domain/-d: Streamlabs client domain
- --port/-p Streamlabs client port
- --token/-t: API Token
- --version/-v: Print the slobs-cli version
Pass --domain, --port and --token as flags on the root command, for example:
slobs-cli --domain localhost --port 59650 --token <API token> --helpLoad the following values from your environment:
SLOBS_DOMAIN=localhost
SLOBS_PORT=59650
SLOBS_TOKEN=<API Token>Flags can be used to override environment variables.
Styling is opt-in, by default you will get a colourless output:
You may enable styling with the --style/-s flag:
slobs-cli --style="yellow" audio listAvailable styles: red, magenta, purple, blue, cyan, green, yellow, orange, white, grey, navy, black
Optionally you may disable border colouring with the --no-border flag:
slobs-cli --style="yellow" --no-border audio listOr with environment variables:
SLOBS_STYLE=yellow
SLOBS_STYLE_NO_BORDER=true- list: List all available scenes.
-
flags:
optional
- --id: Include scene IDs in the output.
-
slobs-cli scene list- current: Show the currently active scene.
-
flags:
optional
- --id: Include scene IDs in the output.
-
slobs-cli scene current- switch: Switch to a scene by its name.
-
flags:
optional
- --id: Include scene IDs in the output.
- --preview: Switch the preview scene.
-
args: <scene_name>
-
slobs-cli scene switch "slobs-test-scene-1"- start: Start the stream.
slobs-cli stream start- stop: Stop the stream.
slobs-cli stream stop- status: Get the current stream status.
slobs-cli stream status- toggle: Toggle the stream status.
slobs-cli stream toggle- start: Start recording.
slobs-cli record start- stop: Stop recording.
slobs-cli record stop- status: Get recording status.
slobs-cli record status- toggle: Toggle recording status.
slobs-cli record toggle- list: List all audio sources.
-
flags:
optional
- --id: Include audio source IDs in the output.
-
slobs-cli audio list- mute: Mute an audio source by name.
- args: <source_name>
slobs-cli audio mute "Mic/Aux"- unmute: Unmute an audio source by name.
- args: <source_name>
slobs-cli audio unmute "Mic/Aux"- toggle: Toggle mute state of an audio source by name.
- args: <source_name>
slobs-cli audio toggle "Mic/Aux"- status: Get the mute status of an audio source by name.
slobs-cli audio status "Mic/Aux"- start: Start the replay buffer.
slobs-cli replaybuffer start- stop: Stop the replay buffer.
slobs-cli replaybuffer stop- status: Get the current status of the replay buffer.
slobs-cli replaybuffer status- save: Save the current replay buffer.
slobs-cli replaybuffer save- enable: Enable studio mode.
slobs-cli studiomode enable- disable: Disable studio mode.
slobs-cli studiomode disable- toggle: Toggle studio mode.
slobs-cli studiomode toggle- status: Check the status of studio mode.
slobs-cli studiomode status- force-transition: Force a transition in studio mode.
slobs-cli studiomode force-transition- list: List all scene collections.
-
flags:
optional
- --id: Include scenecollection IDs in the output.
-
slobs-cli scenecollection list- create: Create a new scene collection.
- args: <scenecollection_name>
slobs-cli scenecollection create "NewCollection"- delete: Delete a scene collection by name.
- args: <scenecollection_name>
slobs-cli scenecollection delete "ExistingCollection"- load: Load a scene collection by name.
- args: <scenecollection_name>
slobs-cli scenecollection load "ExistingCollection"- rename: Rename a scene collection.
- args: <scenecollection_name> <new_name>
slobs-cli scenecollection rename "ExistingCollection" "NewName"- Julian-0 For writing the PySLOBS wrapper on which this CLI depends.
slobs-cli is distributed under the terms of the MIT license.


