Stoobly / stoobly-agent

Record, mock, and test HTTP/HTTPS requests. CLI agent for Stoobly.
Other
6 stars 0 forks source link

Can't set api key easily before enabling remote feature #74

Closed stoobmmelier closed 1 year ago

stoobmmelier commented 1 year ago

On fresh install, the config command doesn't let you set the api key

$ stoobly-agent config
Usage: stoobly-agent config [OPTIONS] COMMAND [ARGS]...

  Manage proxy config

Options:
  -h, --help  Show this message and exit.

Commands:
  dump  Display config contents.

  Run 'stoobly-agent config COMMAND --help' for more information on a
  command.

That's because remote feature is disabled by default

$ stoobly-agent feature remote show
False

When you enable remote feature, it prompts for the api key

$ stoobly-agent feature remote enable
Please enter your API key:

There's no way to easily set the api key

$ stoobly-agent feature remote enable --help
Usage: stoobly-agent feature remote enable [OPTIONS]

Options:
  -h, --help  Show this message and exit.

One workaround is to pass the api key into stdin, but this isn't intuitive and the output is poorly formatted

$ echo "$API_KEY" | stoobly-agent feature remote enable

Please enter your API key: cli.features.remote enabled

Suggestion is to allow setting api key earlier in this workflow

Jvlythical commented 1 year ago

Supposedly you would only need to set API key if remote is enabled. I think from an earlier reported issue, we chose to have enabling remote prompt for an API key.

Fix here seems to add a --api-key option to the enable command.