minder
minder copied to clipboard
Accept names in CLI arguments as positional arguments
Please describe the enhancement
In a number of places in the CLI, we allow objects in the system to be referred to by either ID or name. The general convention is:
minder foo get --id <uuid>
minder foo get --name <name>
Instead, let's use a scheme like this:
minder foo get <name>
minder foo get --id <uuid>
My thinking:
- Name is likely to be the most common way these commands will be used
- Using flags for mandatory arguments feels kinda janky for a *nix CLI tool
Solution Proposal
- Modify CLI code to accept positional arguments
- Keep
--idas-is - Keep
--namefor backwards compatibility, but mark as deprecated
Describe alternatives you've considered
No response
Additional context
No response
Acceptance Criteria
No response
We should fix this consistently everywhere.
The general rule I've seen elsewhere is to use positional arguments for required fields, and flags for optional ones.