Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

option to load all arguments from config file #21

Closed
jossef opened this issue Mar 23, 2023 · 1 comment · Fixed by #107
Closed

option to load all arguments from config file #21

jossef opened this issue Mar 23, 2023 · 1 comment · Fixed by #107
Assignees
Labels
enhancement New feature or request

Comments

@jossef
Copy link
Member

jossef commented Mar 23, 2023

optional, when specified, instead of cli args, values of args should be loaded from a config file
I give you the freedom to decide the file format (json, yaml, properties, ...)
and its structure

@jossef jossef added the enhancement New feature or request label Mar 23, 2023
@joaopedrocsilva joaopedrocsilva self-assigned this Mar 24, 2023
@jossef jossef assigned baruchiro and unassigned joaopedrocsilva Jun 12, 2023
@jossef jossef added this to 2ms Jun 12, 2023
@jossef jossef moved this to Todo in 2ms Jun 12, 2023
@jossef jossef changed the title load all arguments from config file option to load all arguments from config file Jun 12, 2023
@baruchiro
Copy link
Contributor

cobra and viper are working perfectly together (they are from the same author), so it should be easy to support multiple formats.

@baruchiro baruchiro moved this from Todo to In Progress in 2ms Jun 12, 2023
@baruchiro baruchiro moved this from In Progress to Review in 2ms Jun 25, 2023
baruchiro pushed a commit that referenced this issue Jun 29, 2023
- bind flags from viper to cobra command
- add tests
- test for Execute
- support multiple config formats
- update readme with help message
- document configuration env and file

Closes #21

**Proposed Changes**
- feat: read arguments from Environment Variables
- feat: read arguments from JSON/YAML file
- docs: auto-update the README when the `help` message was changed
- docs: how to use arguments from Environment Variables or config file

**Limitations**
- You still can run only one plugin at a time.
- You have to add the plugin command to the CLI command.
- Positional arguments are not yet supported.

---------

Co-authored-by: Jossef Harush Kadouri <jossef12@gmail.com>
@github-project-automation github-project-automation bot moved this from Review to Done in 2ms Jun 29, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants