Bare maestro opens the TUI #119

Closed
opened 2026-08-25 12:17:17 +01:00 by naps62-yolo · 0 comments
Collaborator

maestro with no arguments prints help and exits. It should open the TUI — the TUI is the thing an operator wants when they type the bare command, and maestro tui is a detour.

In crates/maestro/src/main.rs, Cli::command is a required Command and the parser carries arg_required_else_help = true. Make the subcommand optional and dispatch a missing one to the TUI with default TuiArgs, so maestro and maestro tui do the same thing.

The global flags must keep working without a subcommand: maestro --daemon-url http://host:7070 should open the TUI against that daemon, exactly as maestro tui --daemon-url ... does today.

On a build compiled without the tui feature — cargo install --no-default-features --features daemon — there is no TUI to open. Keep today's behaviour there: print help and exit 0. So the no-argument default is "open the TUI where a TUI exists, help otherwise", and only the tui feature's presence decides which.

Tests belong in crates/maestro/tests/cli.rs. Cover both feature configurations, since the point of the issue is that they differ.

Update docs/INSTALL.md wherever it tell the reader to run maestro tui.

`maestro` with no arguments prints help and exits. It should open the TUI — the TUI is the thing an operator wants when they type the bare command, and `maestro tui` is a detour. In `crates/maestro/src/main.rs`, `Cli::command` is a required `Command` and the parser carries `arg_required_else_help = true`. Make the subcommand optional and dispatch a missing one to the TUI with default `TuiArgs`, so `maestro` and `maestro tui` do the same thing. The global flags must keep working without a subcommand: `maestro --daemon-url http://host:7070` should open the TUI against that daemon, exactly as `maestro tui --daemon-url ...` does today. On a build compiled without the `tui` feature — `cargo install --no-default-features --features daemon` — there is no TUI to open. Keep today's behaviour there: print help and exit 0. So the no-argument default is "open the TUI where a TUI exists, help otherwise", and only the `tui` feature's presence decides which. Tests belong in `crates/maestro/tests/cli.rs`. Cover both feature configurations, since the point of the issue is that they differ. Update `docs/INSTALL.md` wherever it tell the reader to run `maestro tui`.
naps62-yolo added this to the TUI shell milestone 2026-08-25 12:17:17 +01:00
naps62-yolo added the area/clitype/featdifficulty/easy labels 2026-08-25 12:17:17 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: naps62/maestro#119