-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Labels
Description
Add ability to clear all configuration settings
Description
Currently, the CLI tool supports clearing individual configuration settings with mycoder config clear <key>
, but there is no way to clear all settings at once. This would be useful for users who want to reset their configuration to defaults.
Proposed Implementation
- Extend the
config.ts
command to add a new option to clear all settings - Update the help text to include the new option
- Implement the functionality to delete all custom settings from the config file
Specific Changes
-
In
packages/cli/src/commands/config.ts
:- Add a new option for the
clear
command (e.g.,--all
or using a special keyword likeall
) - Update the command description and examples
- Add validation to check for the "all" option
- Implement logic to clear all settings when the option is provided
- Add a new option for the
-
In
packages/cli/src/settings/config.ts
:- Add a function to reset the config file to an empty object or delete it entirely
- Ensure proper error handling for file operations
Expected Behavior
- When a user runs
mycoder config clear --all
(or similar command), all custom settings should be removed - The CLI should fall back to default values for all settings
- The user should receive a confirmation message that all settings have been cleared
Additional Considerations
- Should there be a confirmation prompt before clearing all settings?
- Should we keep a backup of the cleared configuration?
- Should we just delete the config file or replace it with an empty object?