Skip to content

feat: Interactive mode for creating resources #632

Open

Description

@apricote

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

Activity

  1. self-assigned this
    on Dec 13, 2023
  2. github-actions commented on Mar 12, 2024

    @github-actions
    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.

  3. reopened this on Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions