Skip to main content

Module claude_settings

Module claude_settings 

Source
Expand description

Inline --settings JSON for gw-spawned Claude sessions.

Claude Code’s --settings <json> flag merges its content into the user’s existing settings layers (user/project/local). Array-valued keys such as hooks are concatenated and deduplicated across scopes, so injecting a single PreToolUse(Bash) hook here adds the gw guard without disturbing anything the user already has configured.

Functions§

guard_settings_json
Build the --settings JSON payload that registers gw guard as a PreToolUse(Bash) hook.