-
Notifications
You must be signed in to change notification settings - Fork 305
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
Option parsing from environment variables #4
Comments
Yes. We have been working on this already, and we’ll open a PR within the next week or two. There are still a lot of open questions about how to do this right, and we’d love to get feedback from everyone. |
Awesome, I am happy to provide some feedback on a PR! |
@danieleggert Any update on the progress of this? |
Please check out #109 — it’s almost done. |
any updates? |
still waiting😭 |
I this still on the roadmap? |
@rauhul, do you have a preference on @KyleLeneau's proposal in this issue vs @danieleggert implementation in #109 vs something new like auto-magically populate values based on command names and argument names. For example, if we have a root command |
I was thinking about a different approach where the parsing pipeline is composed of ArgumentValueProviders, the command line would be one such provider. I haven't fleshed out the idea but the benefit is that users could add their own argument providers depending on their use cases. e.g. we could provide support out of the box for json config files, environment, |
It would be super nice/helpful to parse an options value from an Environment variable value as well taking what is passed in the command line call as the priority over the ENV variable. For CLI's that run in CI or automated environments this is super helpful as it would allow not having to print the value in the ENV variable and could keep it hidden. Not only that but it would be very convenient for repeated uses on commands!
Usage:
mycommand --secret QWERTY12345
or
mycommand
(whereSERVICE_API_SECRET='QWERTY12345'
The text was updated successfully, but these errors were encountered: