fluvio icon indicating copy to clipboard operation
fluvio copied to clipboard

Restrict `cluster` commands based on current profile

Open matheus-consoli opened this issue 1 year ago • 0 comments

Currently, fluvio cli may confuse users when operating on clusters because it's not always clear if they're running against a cloud or local profile. We should improve user experience by restricting which commands can be run depending on the current profile and providing a helpful error message.


We should restrict most of the fluvio cluster commands and display a helpful error message when the current profile is pointing to cloud:

$ fluvio profile
 cloud
$ fluvio cluster check
 Invalid command on `cloud`. Switch to `local` profile or start a `local` cluster and try again. 

the only exception is fluvio cluster start, which should work regardless of the current profile.

$ fluvio profile
 cloud
$ fluvio cluster start
 (start a local cluster)
$ fluvio profile
 local

matheus-consoli avatar Oct 24 '23 04:10 matheus-consoli