feat: add persistent configuration management to eliminate repetitive parameters#56
Open
sneaxhuh wants to merge 1 commit intoakave-ai:mainfrom
Open
Conversation
…ubectl, and gcloud to solve the UX issue of repeatedly entering the same parameters for every command. Changes: - Add new 'config' command with 5 subcommands (set/get/list/unset/path) - Store configuration in ~/.akave/config.json with 0600 permissions - Support all 8 repetitive parameters (node-address, private-key, etc.) - Auto-load config defaults for all commands via PreRunE hooks - Command-line flags always override config file values - Mask sensitive values (private-key, encryption-key) in output - Full test coverage with 5 new test cases Before: akavecli bucket create mybucket --node-address=... --private-key=... akavecli bucket list --node-address=... --private-key=... After: akavecli config set node-address connect.akave.ai:5000 akavecli config set private-key 0x123... akavecli bucket create mybucket akavecli bucket list Testing: - All existing tests continue to pass (51+ tests) - New config tests verify core functionality - File permissions tested (0600) - JSON serialization validated - No regressions detected Fixes akave-ai#38 Signed-off-by: sneax <paladesh600@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements a comprehensive configuration system similar to AWS CLI, kubectl,and gcloud to solve the UX issue of repeatedly entering the same parameters for every command.
Changes:
Before:
akavecli bucket create mybucket --node-address=... --private-key=... akavecli bucket list --node-address=... --private-key=...
After:
akavecli config set node-address connect.akave.ai:5000 akavecli config set private-key 0x123... akavecli bucket create mybucket akavecli bucket list
Testing:
Fixes #38