Skip to main content

A command line interface for the OBS WebSocket API.

Project description

obsws-cli

Hatch project Ruff


Table of Contents

Requirements

Installation

with uv
uv tool install .
with pipx
pipx install .

The CLI should now be discoverable as obsws-cli

Configuration

Flags

Pass --host, --port and --password as flags to the root command, for example:

obsws-cli --host=localhost --port=4455 --password=<websocket password> --help

Environment Variables

Store and load environment variables from:

  • A .env file in the cwd
  • user home directory / .config / obsws-cli / obsws.env
OBS_HOST=localhost
OBS_PORT=4455
OBS_PASSWORD=<websocket password>

Flags can be used to override environment variables.

Root Typer

  • version: Get the OBS Client and WebSocket versions.
obsws-cli version

Sub Typers

Scene

  • list: List all scenes.
obsws-cli scene list
  • current: Get the current program scene.
obsws-cli scene current
  • switch: Switch to a scene.
    • args: <scene_name>
obsws-cli scene switch LIVE

Scene Item

  • list: List all items in a scene.
    • args: <scene_name>
obsws-cli sceneitem list LIVE
  • show: Show an item in a scene.
    • flags:

      optional

      • --parent: Parent group name
    • args: <scene_name> <item_name>

obsws-cli sceneitem show START "Colour Source"
  • hide: Hide an item in a scene.
    • flags:

      optional

      • --parent: Parent group name
    • args: <scene_name> <item_name>

obsws-cli sceneitem hide START "Colour Source"
  • toggle: Toggle an item in a scene.
    • flags:

      optional

      • --parent: Parent group name
    • args: <scene_name> <item_name>

obsws-cli sceneitem toggle --parent=test_group START "Colour Source 3"
  • visible: Check if an item in a scene is visible.
    • flags:

      optional

      • --parent: Parent group name
    • args: <scene_name> <item_name>

obsws-cli sceneitem visible --parent=test_group START "Colour Source 4"
  • transform: Set the transform of an item in a scene.
    • flags:

      optional

      • --position-x: X position of the item in the scene
      • --position-y: Y position of the item in the scene
      • --scale-x: X scale of the item in the scene
      • --scale-y: Y scale of the item in the scene
obsws-cli sceneitem transform --position-x=556.0 --scale-x=0.7946954965591431 --scale-y=0.7948529124259949 LIVE "Window Capture"

Scene Collections

  • list: List all scene collections.
obsws-cli scenecollection list
  • current: Get the current scene collection.
obsws-cli scenecollection current
  • switch: Switch to a scene collection.
    • args: <scene_collection_name>
obsws-cli scenecollection switch test-collection
  • create: Create a new scene collection.
    • args: <scene_collection_name>
obsws-cli scenecollection create test-collection

Group

  • list: List groups in a scene.
    • args: <scene_name>
obsws-cli group list START
  • show: Show a group in a scene.
    • args: <scene_name> <group_name>
obsws-cli group show START "test_group"
  • hide: Hide a group in a scene.
    • args: <scene_name> <group_name>
obsws-cli group hide START "test_group"
  • toggle: Toggle a group in a scene.
    • args: <scene_name> <group_name>
obsws-cli group toggle START "test_group"
  • status: Get the status of a group in a scene.
    • args: <scene_name> <group_name>
obsws-cli group status START "test_group"

Input

  • list: List all inputs.
    • flags:

      optional

      • --input: Filter by input type.
      • --output: Filter by output type.
      • --colour: Filter by colour source type.
obsws-cli input list

obsws-cli input list --input --colour
  • mute: Mute an input.
    • args: <input_name>
obsws-cli input mute "Mic/Aux"
  • unmute: Unmute an input.
    • args: <input_name>
obsws-cli input unmute "Mic/Aux"
  • toggle: Toggle an input.
obsws-cli input toggle "Mic/Aux"

Record

  • start: Start recording.
obsws-cli record start
  • stop: Stop recording.
obsws-cli record stop
  • status: Get recording status.
obsws-cli record status
  • toggle: Toggle recording.
obsws-cli record toggle
  • resume: Resume recording.
obsws-cli record resume
  • pause: Pause recording.
obsws-cli record pause

Stream

  • start: Start streaming.
obsws-cli stream start
  • stop: Stop streaming.
obsws-cli stream stop
  • status: Get streaming status.
obsws-cli stream status
  • toggle: Toggle streaming.
obsws-cli stream toggle

Profile

  • list: List profiles.
obsws-cli profile list
  • current: Get the current profile.
obsws-cli profile current
  • switch: Switch to a profile.
    • args: <profile_name>
obsws-cli profile switch test-profile
  • create: Create a new profile.
    • args: <profile_name>
obsws-cli profile create test-profile
  • remove: Remove a profile.
    • args: <profile_name>
obsws-cli profile remove test-profile

Replay Buffer

  • start: Start the replay buffer.
obsws-cli replaybuffer start
  • stop: Stop the replay buffer.
obsws-cli replaybuffer stop
  • status: Get the status of the replay buffer.
obsws-cli replaybuffer status
  • save: Save the replay buffer.
obsws-cli replaybuffer save

Studio Mode

  • enable: Enable studio mode.
obsws-cli studiomode enable
  • disable: Disable studio mode.
obsws-cli studiomode disable
  • toggle: Toggle studio mode.
obsws-cli studiomode toggle
  • status: Get the status of studio mode.
obsws-cli studiomode status

Virtual Cam

  • start: Start virtual camera.
obsws-cli virtualcam start
  • stop: Stop virtual camera.
obsws-cli virtualcam stop
  • toggle: Toggle virtual camera.
obsws-cli virtualcam toggle
  • status: Get the status of the virtual camera.
obsws-cli virtualcam status

License

obsws-cli is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

obsws_cli-0.9.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

obsws_cli-0.9.2-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file obsws_cli-0.9.2.tar.gz.

File metadata

  • Download URL: obsws_cli-0.9.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for obsws_cli-0.9.2.tar.gz
Algorithm Hash digest
SHA256 6c391326e4e4b1696415e50c3e7fdebac07aef15869dd471c5740839eb2df5ed
MD5 d4d885d3da9fe733ede8f7e3065f62a3
BLAKE2b-256 a96027b516a4852a4db9e0702b257fd7a18da82b7d09afbc1982eaf30da5a524

See more details on using hashes here.

File details

Details for the file obsws_cli-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: obsws_cli-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for obsws_cli-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5432635a04531cb01ffd9d77f84573ead4ec2d4bd40b7d464529719e0554c108
MD5 d5d248b53b4afc4d58266c395b377c7c
BLAKE2b-256 5d8c83759bfea4c154a2fe12ded9bc17de07980f67d5ded017c62ec5d03e3e9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page