diff --git a/obsws_cli/group.py b/obsws_cli/group.py index 7a9b78e..7477f41 100644 --- a/obsws_cli/group.py +++ b/obsws_cli/group.py @@ -44,7 +44,7 @@ def _get_group(group_name: str, resp: DataclassProtocol) -> dict | None: return group -@app.command() +@app.command('show | sh') def show(ctx: typer.Context, scene_name: str, group_name: str): """Show a group in a scene.""" if not validate.scene_in_scenes(ctx, scene_name): @@ -71,7 +71,7 @@ def show(ctx: typer.Context, scene_name: str, group_name: str): typer.echo(f"Group '{group_name}' is now visible.") -@app.command() +@app.command('hide | h') def hide(ctx: typer.Context, scene_name: str, group_name: str): """Hide a group in a scene.""" if not validate.scene_in_scenes(ctx, scene_name): @@ -129,7 +129,7 @@ def toggle(ctx: typer.Context, scene_name: str, group_name: str): typer.echo(f"Group '{group_name}' is now hidden.") -@app.command() +@app.command('status | ss') def status(ctx: typer.Context, scene_name: str, group_name: str): """Get the status of a group in a scene.""" if not validate.scene_in_scenes(ctx, scene_name): diff --git a/obsws_cli/input.py b/obsws_cli/input.py index e4c3d02..eaf137b 100644 --- a/obsws_cli/input.py +++ b/obsws_cli/input.py @@ -42,7 +42,7 @@ def list( typer.echo('\n'.join(input_.get('inputName') for input_ in inputs)) -@app.command() +@app.command('mute | m') def mute(ctx: typer.Context, input_name: str): """Mute an input.""" if not validate.input_in_inputs(ctx, input_name): @@ -60,7 +60,7 @@ def mute(ctx: typer.Context, input_name: str): typer.echo(f"Input '{input_name}' muted.") -@app.command() +@app.command('unmute | um') def unmute(ctx: typer.Context, input_name: str): """Unmute an input.""" if not validate.input_in_inputs(ctx, input_name): diff --git a/obsws_cli/profile.py b/obsws_cli/profile.py index b3f9ea4..6390ed2 100644 --- a/obsws_cli/profile.py +++ b/obsws_cli/profile.py @@ -21,14 +21,14 @@ def list(ctx: typer.Context): typer.echo(profile) -@app.command() +@app.command('current | get') def current(ctx: typer.Context): """Get the current profile.""" resp = ctx.obj.get_profile_list() typer.echo(resp.current_profile_name) -@app.command() +@app.command('switch | set') def switch(ctx: typer.Context, profile_name: str): """Switch to a profile.""" if not validate.profile_exists(ctx, profile_name): @@ -50,7 +50,7 @@ def switch(ctx: typer.Context, profile_name: str): typer.echo(f"Switched to profile '{profile_name}'.") -@app.command() +@app.command('create | new') def create(ctx: typer.Context, profile_name: str): """Create a new profile.""" if validate.profile_exists(ctx, profile_name): @@ -64,7 +64,7 @@ def create(ctx: typer.Context, profile_name: str): typer.echo(f"Created profile '{profile_name}'.") -@app.command() +@app.command('remove | rm') def remove(ctx: typer.Context, profile_name: str): """Remove a profile.""" if not validate.profile_exists(ctx, profile_name): diff --git a/obsws_cli/record.py b/obsws_cli/record.py index 5ed2844..0f70c08 100644 --- a/obsws_cli/record.py +++ b/obsws_cli/record.py @@ -18,7 +18,7 @@ def _get_recording_status(ctx: typer.Context) -> tuple: return resp.output_active, resp.output_paused -@app.command() +@app.command('start | s') def start(ctx: typer.Context): """Start recording.""" active, paused = _get_recording_status(ctx) @@ -34,7 +34,7 @@ def start(ctx: typer.Context): typer.echo('Recording started successfully.') -@app.command() +@app.command('stop | st') def stop(ctx: typer.Context): """Stop recording.""" active, _ = _get_recording_status(ctx) @@ -46,7 +46,7 @@ def stop(ctx: typer.Context): typer.echo('Recording stopped successfully.') -@app.command() +@app.command('status | ss') def status(ctx: typer.Context): """Get recording status.""" active, paused = _get_recording_status(ctx) @@ -69,7 +69,7 @@ def toggle(ctx: typer.Context): ctx.invoke(start, ctx=ctx) -@app.command() +@app.command('resume | r') def resume(ctx: typer.Context): """Resume recording.""" active, paused = _get_recording_status(ctx) @@ -84,7 +84,7 @@ def resume(ctx: typer.Context): typer.echo('Recording resumed successfully.') -@app.command() +@app.command('pause | p') def pause(ctx: typer.Context): """Pause recording.""" active, paused = _get_recording_status(ctx) diff --git a/obsws_cli/replaybuffer.py b/obsws_cli/replaybuffer.py index 01d3206..c3b6924 100644 --- a/obsws_cli/replaybuffer.py +++ b/obsws_cli/replaybuffer.py @@ -12,21 +12,21 @@ def main(): """Control profiles in OBS.""" -@app.command() +@app.command('start | s') def start(ctx: typer.Context): """Start the replay buffer.""" ctx.obj.start_replay_buffer() typer.echo('Replay buffer started.') -@app.command() +@app.command('stop | st') def stop(ctx: typer.Context): """Stop the replay buffer.""" ctx.obj.stop_replay_buffer() typer.echo('Replay buffer stopped.') -@app.command() +@app.command('status | ss') def status(ctx: typer.Context): """Get the status of the replay buffer.""" resp = ctx.obj.get_replay_buffer_status() @@ -36,7 +36,7 @@ def status(ctx: typer.Context): typer.echo('Replay buffer is not active.') -@app.command() +@app.command('save | sv') def save(ctx: typer.Context): """Save the replay buffer.""" ctx.obj.save_replay_buffer() diff --git a/obsws_cli/sceneitem.py b/obsws_cli/sceneitem.py index 7fcd64b..0fe633a 100644 --- a/obsws_cli/sceneitem.py +++ b/obsws_cli/sceneitem.py @@ -77,7 +77,7 @@ def _get_scene_name_and_item_id( @_validate_scene_name_and_item_name -@app.command() +@app.command('show | sh') def show( ctx: typer.Context, scene_name: str, @@ -99,7 +99,7 @@ def show( @_validate_scene_name_and_item_name -@app.command() +@app.command('hide | h') def hide( ctx: typer.Context, scene_name: str, @@ -164,7 +164,7 @@ def toggle( @_validate_scene_name_and_item_name -@app.command() +@app.command('visible | v') def visible( ctx: typer.Context, scene_name: str, @@ -206,7 +206,7 @@ def visible( @_validate_scene_name_and_item_name -@app.command() +@app.command('transform | t') def transform( ctx: typer.Context, scene_name: str, diff --git a/obsws_cli/stream.py b/obsws_cli/stream.py index bf95888..1501ed0 100644 --- a/obsws_cli/stream.py +++ b/obsws_cli/stream.py @@ -18,7 +18,7 @@ def _get_streaming_status(ctx: typer.Context) -> tuple: return resp.output_active, resp.output_duration -@app.command() +@app.command('start | s') def start(ctx: typer.Context): """Start streaming.""" active, _ = _get_streaming_status(ctx) @@ -30,7 +30,7 @@ def start(ctx: typer.Context): typer.echo('Streaming started successfully.') -@app.command() +@app.command('stop | st') def stop(ctx: typer.Context): """Stop streaming.""" active, _ = _get_streaming_status(ctx) @@ -42,7 +42,7 @@ def stop(ctx: typer.Context): typer.echo('Streaming stopped successfully.') -@app.command() +@app.command('status | ss') def status(ctx: typer.Context): """Get streaming status.""" active, duration = _get_streaming_status(ctx) diff --git a/obsws_cli/studiomode.py b/obsws_cli/studiomode.py index 8d668e3..91b8ba9 100644 --- a/obsws_cli/studiomode.py +++ b/obsws_cli/studiomode.py @@ -12,19 +12,19 @@ def main(): """Control studio mode in OBS.""" -@app.command() +@app.command('enable | on') def enable(ctx: typer.Context): """Enable studio mode.""" ctx.obj.set_studio_mode_enabled(True) -@app.command() +@app.command('disable | off') def disable(ctx: typer.Context): """Disable studio mode.""" ctx.obj.set_studio_mode_enabled(False) -@app.command() +@app.command('toggle | tg') def toggle(ctx: typer.Context): """Toggle studio mode.""" resp = ctx.obj.get_studio_mode_enabled() @@ -36,7 +36,7 @@ def toggle(ctx: typer.Context): typer.echo('Studio mode is now enabled.') -@app.command() +@app.command('status | ss') def status(ctx: typer.Context): """Get the status of studio mode.""" resp = ctx.obj.get_studio_mode_enabled() diff --git a/obsws_cli/virtualcam.py b/obsws_cli/virtualcam.py index 6b0dff9..dcefe7c 100644 --- a/obsws_cli/virtualcam.py +++ b/obsws_cli/virtualcam.py @@ -12,28 +12,28 @@ def main(): """Control virtual camera in OBS.""" -@app.command() +@app.command('start | s') def start(ctx: typer.Context): """Start the virtual camera.""" ctx.obj.start_virtual_cam() typer.echo('Virtual camera started.') -@app.command() +@app.command('stop | p') def stop(ctx: typer.Context): """Stop the virtual camera.""" ctx.obj.stop_virtual_cam() typer.echo('Virtual camera stopped.') -@app.command() +@app.command('toggle | tg') def toggle(ctx: typer.Context): """Toggle the virtual camera.""" ctx.obj.toggle_virtual_cam() typer.echo('Virtual camera toggled.') -@app.command() +@app.command('status | ss') def status(ctx: typer.Context): """Get the status of the virtual camera.""" resp = ctx.obj.get_virtual_cam_status()