4 Commits

Author SHA1 Message Date
bad14fe8c8 bump uv version 2026-03-27 07:18:12 +00:00
431452d35c use value from parse_args instead of indexing into tokens.
patch bump
2026-03-27 07:13:31 +00:00
185e9f2287 bump cyclopts dep version
add ToC to README.
add Shell Completion section to README

patch bump
2026-03-23 23:22:16 +00:00
372baa7804 upd pre-commit config 2026-03-21 14:22:26 +00:00
5 changed files with 43 additions and 18 deletions

View File

@@ -1,4 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.10.7

View File

@@ -5,7 +5,16 @@
---
## Install
## Table of Contents
- [Installation](#installation)
- [Configuration](#configuration)
- [Use](#use)
- [Shell Completion](#shell-completion)
- [License](#license)
## Installation
#### With uv
@@ -211,6 +220,14 @@ vban-cli sendtext 'Point(ASIO128.IN[1..4],ASIO128.OUT[1]).dBGain = -3.0'
see `vban-cli sendtext --help` for more info.
## Shell Completion
Shell completion scripts are available for *bash*, *zsh*, and *fish*.
```console
vban-cli --install-completion
```
---
## Implementation Notes
@@ -226,8 +243,6 @@ see `vban-cli sendtext --help` for more info.
I've made the effort to set up the basic skeletal structure of the CLI as well as demonstrate how to combine subcommand groups with subcommand groups so more can be implemented, it just needs doing. There may be restrictions on some things however, for example, retrieving values is only possible for parameters [defined in the protocol](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/3be2c1c36563afbd6df3da8436406c77d2cc1f10/VoicemeeterRemote.h#L787). Setting parameters can be done for anything possible by a string request.
Shell completion scripts are available (for zsh, bash and fish) but they haven't been thoroughly tested.
If there's something missing that you would like to see added the best bet is to submit a PR. You may raise an issue and if it's quick and simple to do I may (or may not) do it.
---

View File

@@ -1,11 +1,11 @@
[project]
name = "vban-cli"
version = "0.12.5"
version = "0.12.7"
description = "A command-line interface for Voicemeeter leveraging VBAN."
readme = "README.md"
license = { text = "LICENSE" }
requires-python = ">=3.10"
dependencies = ["cyclopts>=4.6.0", "loguru>=0.7.3", "vban-cmd>=2.10.3"]
dependencies = ["cyclopts>=4.10.1", "loguru>=0.7.3", "vban-cmd>=2.10.3"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
@@ -20,8 +20,9 @@ classifiers = [
[project.scripts]
vban-cli = "vban_cli.app:run"
[tool.uv]
package = true
[build-system]
requires = ["uv_build>=0.11.2,<0.12.0"]
build-backend = "uv_build"
[tool.uv.sources]
vban-cmd = { path = "../vban-cmd-python", editable = true }

View File

@@ -42,12 +42,14 @@ def launcher(
*tokens: Annotated[str, Parameter(show=False, allow_leading_hyphen=True)],
vban_config: Annotated[VBANConfig, Parameter()] = VBANConfig(),
):
"""A command-line interface for Voicemeeter/Matrix over VBAN."""
command, bound, _ = app.parse_args(tokens)
if tokens[0] == '--install-completion':
return command(*bound.args, **bound.kwargs)
disable_rt_listeners = False
if command.__name__ == 'sendtext':
match command.__name__:
case '_install_completion_command':
return command(*bound.args, **bound.kwargs)
case 'sendtext':
disable_rt_listeners = True
try:

10
uv.lock generated
View File

@@ -22,7 +22,7 @@ wheels = [
[[package]]
name = "cyclopts"
version = "4.6.0"
version = "4.10.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "attrs" },
@@ -32,9 +32,9 @@ dependencies = [
{ name = "tomli", marker = "python_full_version < '3.11'" },
{ name = "typing-extensions", marker = "python_full_version < '3.11'" },
]
sdist = { url = "https://files.pythonhosted.org/packages/49/5c/88a4068c660a096bbe87efc5b7c190080c9e86919c36ec5f092cb08d852f/cyclopts-4.6.0.tar.gz", hash = "sha256:483c4704b953ea6da742e8de15972f405d2e748d19a848a4d61595e8e5360ee5", size = 162724, upload-time = "2026-02-23T15:44:49.286Z" }
sdist = { url = "https://files.pythonhosted.org/packages/6c/c4/2ce2ca1451487dc7d59f09334c3fa1182c46cfcf0a2d5f19f9b26d53ac74/cyclopts-4.10.1.tar.gz", hash = "sha256:ad4e4bb90576412d32276b14a76f55d43353753d16217f2c3cd5bdceba7f15a0", size = 166623, upload-time = "2026-03-23T14:43:01.098Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/8f/eb/1e8337755a70dc7d7ff10a73dc8f20e9352c9ad6c2256ed863ac95cd3539/cyclopts-4.6.0-py3-none-any.whl", hash = "sha256:0a891cb55bfd79a3cdce024db8987b33316aba11071e5258c21ac12a640ba9f2", size = 200518, upload-time = "2026-02-23T15:44:47.854Z" },
{ url = "https://files.pythonhosted.org/packages/8a/0b/2261922126b2e50c601fe22d7ff5194e0a4d50e654836260c0665e24d862/cyclopts-4.10.1-py3-none-any.whl", hash = "sha256:35f37257139380a386d9fe4475e1e7c87ca7795765ef4f31abba579fcfcb6ecd", size = 204331, upload-time = "2026-03-23T14:43:02.625Z" },
]
[[package]]
@@ -189,7 +189,7 @@ wheels = [
[[package]]
name = "vban-cli"
version = "0.12.5"
version = "0.12.7"
source = { editable = "." }
dependencies = [
{ name = "cyclopts" },
@@ -199,7 +199,7 @@ dependencies = [
[package.metadata]
requires-dist = [
{ name = "cyclopts", specifier = ">=4.6.0" },
{ name = "cyclopts", specifier = ">=4.10.1" },
{ name = "loguru", specifier = ">=0.7.3" },
{ name = "vban-cmd", editable = "../vban-cmd-python" },
]