Skip to main content

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

Release files for cli-anything-obs-studio 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cli-anything-obs-studio 1.0.0
File Size Uploaded
cli_anything_obs_studio-1.0.0.tar.gz 36.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cli-anything-obs-studio 1.0.0
File Interpreter ABI Platform
cli_anything_obs_studio-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 80.9 kB

Release files / cli_anything_obs_studio-1.0.0.tar.gz

Download URL cli_anything_obs_studio-1.0.0.tar.gz
Size 36.5 kB
Tags Source
SHA-256 checksum
How to use checksums
008a692ec1b4c2436da121ccf60bbf3ff1359a0a728cb7e6df199bdb55f417aa
BLAKE2b-256 checksum
How to use checksums
06a92ce33f7a4abc33dfb159565c9041bd8d2812b121243bdddc2cb0c9806cfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / cli_anything_obs_studio-1.0.0-py3-none-any.whl

Download URL cli_anything_obs_studio-1.0.0-py3-none-any.whl
Size 44.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f7969967e39b9c20ac925de14f3210523073a4a1ea2ed276b382cf5c1460f12
BLAKE2b-256 checksum
How to use checksums
c80a2e848286a42f1bcdb6d52b28a26d9be8e76fb14974ac020c742c7a3851ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page