diff options
Diffstat (limited to 'lib/project/src')
| -rw-r--r-- | lib/project/src/producer/cli.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/project/src/producer/cli.py b/lib/project/src/producer/cli.py index 4788fb5..374455a 100644 --- a/lib/project/src/producer/cli.py +++ b/lib/project/src/producer/cli.py @@ -80,7 +80,15 @@ def require_input(source: Path) -> None: raise ValueError(f"Input must be an existing WAV file: {source}") +# The 'process' keyword is optional: any first argument that is not a known +# command (or a global option) is treated as the start of a process run. +COMMANDS = ("process", "preview", "config", "doctor", "setup") +GLOBAL_OPTIONS = ("-h", "--help", "--version") + + def main(): + if len(sys.argv) > 1 and sys.argv[1] not in COMMANDS and sys.argv[1] not in GLOBAL_OPTIONS: + sys.argv.insert(1, "process") app = parser() args = app.parse_args() console = Console(stderr=True) |
