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

CLI Enhancement: Ability to specify all command parameters in a json file ("command-params-file" flag) #597

Open
kcq opened this issue Oct 22, 2023 · 5 comments

Comments

@kcq
Copy link
Member

kcq commented Oct 22, 2023

Right now each CLI command accepts a set of command parameters as separate command line flags. It's ok for adhoc use, but it's less ideal for automation. The goal for the "command-params-file" flag is to provide an ability to specify all required command-specific parameters in one JSON formatted file.

There's already a placeholder for the flag, but there's no logic to load and process the file data.

This is a good first issue for somebody already comfortable with Go and refactoring a significant amount of CLI flag processing code.

@MeenuyD
Copy link

MeenuyD commented Oct 23, 2023

Hello @kcq I would like to work on this issue can you please assign it to me and tell me which files need to be changed

thecoons added a commit to thecoons/slim that referenced this issue Oct 24, 2023
This commit introduces a new flag `FlagCommandParamsFile` across
multiple command files, allowing parameters to be loaded from a
specified file.

The `LoadParamsFromFile` function has been defined to handle
file reading and parameter setting. Additionally, code comments
and formatting have been updated for improved readability.

This enhancement provides a more flexible and organized way
to handle command parameters, especially in cases with numerous
or complex parameter sets.
thecoons added a commit to thecoons/slim that referenced this issue Oct 24, 2023
This commit introduces a new flag `FlagCommandParamsFile` across
multiple command files, allowing parameters to be loaded from a
specified file.

The `LoadParamsFromFile` function has been defined to handle
file reading and parameter setting. Additionally, code comments
and formatting have been updated for improved readability.

This enhancement provides a more flexible and organized way
to handle command parameters, especially in cases with numerous
or complex parameter sets.

Signed-off-by: Barthelemy Antonin <[email protected]>
@vash-knives
Copy link
Contributor

@kcq , still need this done? let me know, can work on this.

@dpcamargo
Copy link

@kcq is this issue still open?

@kcq
Copy link
Member Author

kcq commented May 16, 2024

@kcq is this issue still open?

yes, it is open. if you are interested in working on it it's good to post the PRs here

@Billy-North
Copy link

I was just been playing around with this issue yesterday and think I have a solution outlined, I would be keen to try and post a PR over this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants