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

Make CLI arguments order invariant #77

Closed
AleF83 opened this issue Jan 15, 2019 · 4 comments
Closed

Make CLI arguments order invariant #77

AleF83 opened this issue Jan 15, 2019 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@AleF83
Copy link
Contributor

AleF83 commented Jan 15, 2019

I suggest to use options instead of arguments in CLI encrypt command.
The encrypt command will be as following:

kamus-cli encrypt  \
   --secret super-secret \
   --service-account kamus-example-sa \
   --namespace default \
   --kamus-url <Kamus URL>

This approach will make the command line arguments order invariant and also we will be able to implement support for secret stored in file fixing #35.
For example for secret stored in file the command will be as following:

kamus-cli encrypt  \
   --secret-file /path/to/secret-file \
   --service-account kamus-example-sa \
   --namespace default \
   --kamus-url <Kamus URL>

I think it's more intuitive and self-describing command format.

@omerlh
Copy link
Contributor

omerlh commented Jan 15, 2019

I think that the --secret is not required, the rest looks like a good proposal. Feel free to open a PR, we will appreciate the contribution :)

@omerlh omerlh added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jan 15, 2019
@shaikatz
Copy link
Contributor

I actually like the --secret approach because as Alex said, it'll open a comfortable option to add the files support.

@omerlh
Copy link
Contributor

omerlh commented Jan 15, 2019

I just think it is the only parameter that you expect to exist, but it's not critical. Both are good IMO

@AleF83
Copy link
Contributor Author

AleF83 commented Jan 15, 2019

I'll PR this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants