cli-anything-obs-studio

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cli-anything-obs_studio

cli-anything-obs_studio

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.
一款有状态的OBS Studio场景集合编辑命令行界面,遵循与Blender CLI工具相同的模式。采用JSON格式存储场景集合,编辑时无需安装OBS。

Installation

安装

This CLI is installed as part of the cli-anything-obs_studio package:
bash
pip install cli-anything-obs_studio
Prerequisites:
  • Python 3.10+
  • obs_studio must be installed on your system
该CLI作为cli-anything-obs_studio包的一部分进行安装:
bash
pip install cli-anything-obs_studio
前提条件:
  • Python 3.10及以上版本
  • 系统中必须安装obs_studio

Usage

使用方法

Basic Commands

基础命令

bash
undefined
bash
undefined

Show help

显示帮助信息

cli-anything-obs_studio --help
cli-anything-obs_studio --help

Start interactive REPL mode

启动交互式REPL模式

cli-anything-obs_studio
cli-anything-obs_studio

Create a new project

创建新项目

cli-anything-obs_studio project new -o project.json
cli-anything-obs_studio project new -o project.json

Run with JSON output (for agent consumption)

以JSON格式输出结果(供Agent调用)

cli-anything-obs_studio --json project info -p project.json
undefined
cli-anything-obs_studio --json project info -p project.json
undefined

REPL Mode

REPL模式

When invoked without a subcommand, the CLI enters an interactive REPL session:
bash
cli-anything-obs_studio
当不指定子命令调用时,CLI会进入交互式REPL会话:
bash
cli-anything-obs_studio

Enter commands interactively with tab-completion and history

交互式输入命令,支持自动补全和历史记录

undefined
undefined

Command Groups

命令组

Project

项目管理

Project management commands.
CommandDescription
new
Create a new OBS scene collection
open
Open an existing project
save
Save the current project
info
Show project information
json
Print raw project JSON
项目管理相关命令。
命令说明
new
创建新的OBS场景集合
open
打开现有项目
save
保存当前项目
info
显示项目信息
json
打印原始项目JSON内容

Scene Group

场景管理

Scene management commands.
CommandDescription
add
Add a new scene
remove
Remove a scene by index
duplicate
Duplicate a scene
set-active
Set the active scene
list
List all scenes
场景管理相关命令。
命令说明
add
添加新场景
remove
按索引删除场景
duplicate
复制场景
set-active
设置活动场景
list
列出所有场景

Source Group

源管理

Source management commands.
CommandDescription
add
Add a source to a scene
remove
Remove a source by index
duplicate
Duplicate a source
set
Set a source property (name, visible, locked, opacity, rotation)
transform
Transform a source (position, size, crop, rotation)
list
List all sources in a scene
源管理相关命令。
命令说明
add
为场景添加源
remove
按索引删除源
duplicate
复制源
set
设置源属性(名称、可见性、锁定状态、透明度、旋转角度)
transform
变换源(位置、大小、裁剪、旋转)
list
列出场景中的所有源

Filter Group

滤镜管理

Filter management commands.
CommandDescription
add
Add a filter to a source
remove
Remove a filter from a source
set
Set a filter parameter
list
List all filters on a source
list-available
List all available filter types
滤镜管理相关命令。
命令说明
add
为源添加滤镜
remove
从源中删除滤镜
set
设置滤镜参数
list
列出源上的所有滤镜
list-available
列出所有可用的滤镜类型

Audio Group

音频管理

Audio management commands.
CommandDescription
add
Add a global audio source
remove
Remove a global audio source
volume
Set volume for an audio source (0.0-3.0)
mute
Mute an audio source
unmute
Unmute an audio source
monitor
Set audio monitoring type
list
List all audio sources
音频管理相关命令。
命令说明
add
添加全局音频源
remove
删除全局音频源
volume
设置音频源音量(0.0-3.0)
mute
静音音频源
unmute
取消静音音频源
monitor
设置音频监听类型
list
列出所有音频源

Transition Group

过渡效果管理

Transition management commands.
CommandDescription
add
Add a transition
remove
Remove a transition
set-active
Set the active transition
duration
Set transition duration in milliseconds
list
List all transitions
过渡效果管理相关命令。
命令说明
add
添加过渡效果
remove
删除过渡效果
set-active
设置活动过渡效果
duration
设置过渡效果时长(毫秒)
list
列出所有过渡效果

Output Group

输出配置

Output/streaming/recording configuration.
CommandDescription
streaming
Configure streaming settings
recording
Configure recording settings
settings
Configure output settings
info
Show current output configuration
presets
List available encoding presets
输出/推流/录制配置相关命令。
命令说明
streaming
配置推流设置
recording
配置录制设置
settings
配置输出设置
info
显示当前输出配置
presets
列出可用的编码预设

Session

会话管理

Session management commands.
CommandDescription
status
Show session status
undo
Undo the last operation
redo
Redo the last undone operation
history
Show undo history
会话管理相关命令。
命令说明
status
显示会话状态
undo
撤销上一步操作
redo
重做上一步撤销的操作
history
显示撤销历史记录

Examples

示例

Create a New Project

创建新项目

Create a new obs_studio project file.
bash
cli-anything-obs_studio project new -o myproject.json
创建新的obs_studio项目文件。
bash
cli-anything-obs_studio project new -o myproject.json

Or with JSON output for programmatic use

或以JSON格式输出供程序化调用

cli-anything-obs_studio --json project new -o myproject.json
undefined
cli-anything-obs_studio --json project new -o myproject.json
undefined

Interactive REPL Session

交互式REPL会话

Start an interactive session with undo/redo support.
bash
cli-anything-obs_studio
启动支持撤销/重做的交互式会话。
bash
cli-anything-obs_studio

Enter commands interactively

交互式输入命令

Use 'help' to see available commands

使用'help'查看可用命令

Use 'undo' and 'redo' for history navigation

使用'undo'和'redo'导航历史记录

undefined
undefined

State Management

状态管理

The CLI maintains session state with:
  • Undo/Redo: Up to 50 levels of history
  • Project persistence: Save/load project state as JSON
  • Session tracking: Track modifications and changes
该CLI通过以下方式维护会话状态:
  • 撤销/重做:最多支持50级历史记录
  • 项目持久化:以JSON格式保存/加载项目状态
  • 会话跟踪:跟踪修改和变更

Output Formats

输出格式

All commands support dual output modes:
  • Human-readable (default): Tables, colors, formatted text
  • Machine-readable (
    --json
    flag): Structured JSON for agent consumption
bash
undefined
所有命令支持两种输出模式:
  • 人类可读格式(默认):表格、彩色文本、格式化内容
  • 机器可读格式
    --json
    参数):结构化JSON,供Agent调用
bash
undefined

Human output

人类可读格式输出

cli-anything-obs_studio project info -p project.json
cli-anything-obs_studio project info -p project.json

JSON output for agents

供Agent调用的JSON格式输出

cli-anything-obs_studio --json project info -p project.json
undefined
cli-anything-obs_studio --json project info -p project.json
undefined

For AI Agents

面向AI Agent的使用说明

When using this CLI programmatically:
  1. Always use
    --json
    flag
    for parseable output
  2. Check return codes - 0 for success, non-zero for errors
  3. Parse stderr for error messages on failure
  4. Use absolute paths for all file operations
  5. Verify outputs exist after export operations
当以编程方式使用该CLI时:
  1. 始终使用
    --json
    参数
    以获得可解析的输出
  2. 检查返回码 - 0表示成功,非0表示错误
  3. 解析stderr以获取失败时的错误信息
  4. 使用绝对路径进行所有文件操作
  5. 导出操作后验证输出文件是否存在

More Information

更多信息

  • Full documentation: See README.md in the package
  • Test coverage: See TEST.md in the package
  • Methodology: See HARNESS.md in the cli-anything-plugin
  • 完整文档:查看包中的README.md
  • 测试覆盖率:查看包中的TEST.md
  • 实现方法:查看cli-anything-plugin中的HARNESS.md

Version

版本

1.0.0
1.0.0