Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Interactive mode for creating resources #632

Closed
apricote opened this issue Dec 13, 2023 · 1 comment
Closed

feat: Interactive mode for creating resources #632

apricote opened this issue Dec 13, 2023 · 1 comment
Assignees

Comments

@apricote
Copy link
Member

apricote commented Dec 13, 2023

Background

When creating new resources (or making modifications), we require all parameters to be set through flags. While this is great for automation and experienced users, I believe that its not the best UX for new users, as they usually do not know which flags are available and must/should be set. Even I sometimes fallback into a loop of specifying a flag, sending the command and then getting an error that another flag is required, repeat 2-3 times. Another issue is that the list of possible values for flags is sometimes not obvious, some things are hardcoded, some are queried from the API. Both issues are already improved through autocomplete, but not everyone has this installed.

Suggested Solution

An interactive mode, where the CLI prompts the user for all possible inputs could help with this. This prompt could include a list of possible values where it makes sense (ie. Server Types, Images, SSH Keys when creating a new server).

Cherry-on-top would be to allow flags & only ask for fields that are still missing, or at least pre-select the values from the flags.

This mode should be explicitly enabled through setting a -i/--interactive flag. If we introduce some more settings (#434), this could become a configurable default.

Related Refactorings

While working on this, it might make sense to refactor the flags and prompts to be defined in a single source of truth, instead of duplicating the definitions for both in their respective formats.

It might also make sense to formalize the createOptsFromFlags pattern and employ it in all create commands to help with the previous refactor.

Possible Tools

@phm07 phm07 self-assigned this Dec 13, 2023
Copy link
Contributor

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

@github-actions github-actions bot added the stale label Mar 12, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2024
@apricote apricote added pinned and removed stale labels Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants