Function Signature
Description
Deletes a configuration key and its associated value from the ScryxCLI configuration file. This function removes the specified key from the configuration object and persists the changes to~/.scrycli/config.json. The updated configuration is written with pretty-printing (2-space indentation).
Parameters
The configuration key to delete. If the key doesn’t exist, the operation completes silently without error.
Usage
Examples
Delete Single Configuration Key
Delete Multiple Configuration Keys
Conditional Deletion
Reset Specific Configuration
Clear Multiple Related Keys
Safe Deletion with Verification
Error Conditions
- If the configuration file cannot be read, a filesystem error will be thrown
- If the configuration file cannot be written after deletion, a filesystem error will be thrown
- If the configuration file contains invalid JSON, a
SyntaxErrorwill be thrown
Notes
- If the specified key doesn’t exist, the function completes successfully without error
- Uses JavaScript’s
deleteoperator to remove the key from the configuration object - The configuration file is formatted with 2-space indentation for readability
- This function performs synchronous file I/O operations
- After deletion, the key will no longer exist in the configuration object (not set to
nullorundefined)