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
[IMPROVE] Add --remove
parameter to the Terminal /keys
menu.
#5712
Comments
I'd be happy to try and tackle this if this is still an issue. Would we want the command to alter the users hub config? Or just the local ENV file? |
Currently, the ENV file takes priority over any Hub keys, so I believe these would operate independently. The account menu has a |
Working on the keys controller right now. For APIs with a single key, it's pretty straight forward to just add a new argument --remove. We are able to enforce the user to use --key or --remove and not both using mutually exclusive groups. However, with APIs which need a number of arguments to add an API (e.g., reddit), it's a bit more clunky (and requires us to code in the checks ourselves). Are we okay with adding sub-commands / subparsers? For example, to add or remove a key now the user could type any of the following (api name, followed by add or remove sub-command, and then arguments):
This has the benefit of separating the add/remove options and after trying a number of things, this seemed like the cleanest implementation to me. Alternatively if we don't like this, what do we want to happen if the user enters a key value and remove, e.g.:
I can provide some code snippets of how both of these implementations would look if curious. |
@deeleeramone any thoughts on the above question re: subcommands? I have pretty much got a completed PR. Perhaps I could just submit for discussion, school is going to start picking up for me and would hate for it to die on my local branch! |
Currently there is no way to completely remove an entered API key within the Terminal. Currently, it can be done online or manually editing the ENV file, but this is not the ideal UX.
The text was updated successfully, but these errors were encountered: