Skip to main content

CLI harness for OBS Studio - Create and manage streaming/recording scenes via command line

Project description

OBS Studio CLI - Agent Harness

A stateful command-line interface for OBS Studio scene collection editing, following the same patterns as the Blender CLI harness. Uses a JSON scene collection format. No OBS installation required for editing.

Installation

pip install click prompt_toolkit

Quick Start

# Create a new project
python3 -m cli.obs_cli project new --name "my_stream" -o project.json

# Add sources
python3 -m cli.obs_cli --project project.json source add video_capture --name "Camera"
python3 -m cli.obs_cli --project project.json source add display_capture --name "Game"

# Add filters
python3 -m cli.obs_cli --project project.json filter add chroma_key -S 0 -p similarity=400

# Add scenes
python3 -m cli.obs_cli --project project.json scene add --name "BRB"

# Configure streaming
python3 -m cli.obs_cli --project project.json output streaming --service twitch --key "your_key"

# Save
python3 -m cli.obs_cli --project project.json project save

JSON Output Mode

python3 -m cli.obs_cli --json project new -o project.json
python3 -m cli.obs_cli --json --project project.json source list

Interactive REPL

python3 -m cli.obs_cli repl
python3 -m cli.obs_cli repl --project project.json

Command Groups

Project Management

project new   - Create a new scene collection
project open  - Open an existing project file
project save  - Save the current project
project info  - Show project information
project json  - Print raw project JSON

Scene Management

scene add        - Add a new scene
scene remove     - Remove a scene by index
scene duplicate  - Duplicate a scene
scene set-active - Set the active scene
scene list       - List all scenes

Source Management

source add       - Add a source (video_capture, display_capture, image, text, browser, etc.)
source remove    - Remove a source by index
source duplicate - Duplicate a source
source set       - Set a source property (name, visible, locked, opacity, rotation)
source transform - Transform a source (position, size, crop, rotation)
source list      - List all sources in a scene

Filter Management

filter add            - Add a filter to a source
filter remove         - Remove a filter
filter set            - Set a filter parameter
filter list           - List filters on a source
filter list-available - List all available filter types

Audio Management

audio add     - Add a global audio source
audio remove  - Remove an audio source
audio volume  - Set volume (0.0-3.0)
audio mute    - Mute an audio source
audio unmute  - Unmute an audio source
audio monitor - Set audio monitoring type
audio list    - List all audio sources

Transition Management

transition add        - Add a transition
transition remove     - Remove a transition
transition set-active - Set the active transition
transition duration   - Set transition duration
transition list       - List all transitions

Output Configuration

output streaming - Configure streaming settings
output recording - Configure recording settings
output settings  - Configure encoder/resolution/bitrate
output info      - Show current output configuration
output presets   - List available encoding presets

Session

session status  - Show session status
session undo    - Undo the last operation
session redo    - Redo the last undone operation
session history - Show undo history

Running Tests

# From the agent-harness directory:
python3 -m pytest cli/tests/ -v

# Unit tests only
python3 -m pytest cli/tests/test_core.py -v

# E2E tests only
python3 -m pytest cli/tests/test_full_e2e.py -v

Architecture

cli/
├── __init__.py
├── obs_cli.py            # Main CLI entry point (Click + REPL)
├── core/
│   ├── __init__.py
│   ├── project.py        # Project create/open/save/info
│   ├── scenes.py         # Scene management
│   ├── sources.py        # Source management + SOURCE_TYPES registry
│   ├── filters.py        # Filter management + FILTER_TYPES registry
│   ├── audio.py          # Audio source management
│   ├── transitions.py    # Transition management
│   ├── output.py         # Streaming/recording/encoding config
│   └── session.py        # Session state, undo/redo
├── utils/
│   ├── __init__.py
│   └── obs_utils.py      # JSON helpers and utilities
└── tests/
    ├── __init__.py
    ├── test_core.py       # Unit tests (60+ tests)
    └── test_full_e2e.py   # E2E tests (40+ tests)

Source Types

video_capture, display_capture, window_capture, image, media, browser, text, color, audio_input, audio_output, group, scene

Filter Types

color_correction, chroma_key, color_key, lut, image_mask, crop_pad, scroll, sharpen, noise_suppress, gain, compressor, noise_gate, limiter

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

cli_anything_obs_studio-1.0.0.tar.gz (36.5 kB view details)

Uploaded Source

Built Distribution

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

cli_anything_obs_studio-1.0.0-py3-none-any.whl (44.4 kB view details)

Uploaded Python 3

File details

Details for the file cli_anything_obs_studio-1.0.0.tar.gz.

File metadata

  • Download URL: cli_anything_obs_studio-1.0.0.tar.gz
  • Upload date:
  • Size: 36.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for cli_anything_obs_studio-1.0.0.tar.gz
Algorithm Hash digest
SHA256 008a692ec1b4c2436da121ccf60bbf3ff1359a0a728cb7e6df199bdb55f417aa
MD5 eacc1f5af1cba50e568737058fe4c4e7
BLAKE2b-256 06a92ce33f7a4abc33dfb159565c9041bd8d2812b121243bdddc2cb0c9806cfd

See more details on using hashes here.

File details

Details for the file cli_anything_obs_studio-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cli_anything_obs_studio-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f7969967e39b9c20ac925de14f3210523073a4a1ea2ed276b382cf5c1460f12
MD5 bc963d42973b7d9316690d860bfd0725
BLAKE2b-256 c80a2e848286a42f1bcdb6d52b28a26d9be8e76fb14974ac020c742c7a3851ea

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