[feat:] Added Config Command to Kitops CLI
Description
This PR introduces the new config command for the KitOps CLI. It allows users to manage the configuration of CLI settings more easily. With this command, users can set, get, list, and reset configuration values for persistent options like storage paths, credentials, logging levels, and other preferences.
Key additions:
-
Config command: Introduced the
configcommand with four subcommands:set: Allows users to set configuration values.get: Retrieves the value of a specified configuration key.list: Lists all current configuration options and their values.reset: Resets all configurations back to default values.
-
Persistent root flags: The root command now uses configuration settings from the
config.jsonfile for default values like--log-level,--progress, and--verbose, while still allowing overrides via command-line arguments.
Note: This PR supports Config for only root command flags, as it is not clearly mentioned if it should be implemented for all flags.
Linked Issues
Closes issue #419
@amisevsk Could you please review this PR and suggest upon how we can improve it?
@amisevsk Your requested changes have been made :D
@amisevsk Your requested changes have been made!
Can you add the license header for config.go?
@gorkem license header has been added!
@amisevsk @gorkem Waiting for a response on this so that we can proceed further!
@gorkem Your requested changes have been made, could you kindly review?
@amisevsk Your requested changes have been made!
@gorkem @amisevsk Any reason for this PR to be marked as draft? Any changes that are still pending?