Claude.Core.Settings (claude v0.1.0)
Generic settings management for Claude configuration files. Handles JSON-based settings that can be used by any feature.
Summary
Functions
Checks if settings are effectively empty.
Checks if the settings file exists.
Gets a value from settings using a path of keys.
Returns the path to the settings.json file.
Sets a value in settings using a path of keys.
Reads settings from the JSON file. Returns {:ok, map} or {:error, reason}.
Removes the settings file if it exists.
Updates settings by applying a function to the current settings.
Writes settings to the JSON file. Creates the directory structure if needed.
Functions
Checks if settings are effectively empty.
Checks if the settings file exists.
Gets a value from settings using a path of keys.
Examples
get(["hooks", "PostToolUse"])
get(["memory", "auto_update"], false)
Returns the path to the settings.json file.
Sets a value in settings using a path of keys.
Reads settings from the JSON file. Returns {:ok, map} or {:error, reason}.
Removes the settings file if it exists.
Updates settings by applying a function to the current settings.
Writes settings to the JSON file. Creates the directory structure if needed.