Skip to main content

Module config

Module config 

Source
Expand description

JSON configuration file CRUD operations. JSON configuration file CRUD operations.

This module provides low-level functions for reading, writing, and manipulating JSON configuration files with dot-delimited path navigation.

Structs§

WorktreeTemplateDefaults
Resolved defaults used when rendering worktree-aware templates.

Functions§

is_valid_integration_mode
Validate that an integration mode string is one of the supported values.
is_valid_worktree_strategy
Validate that a worktree strategy string is one of the supported values.
json_get_path
Navigate a JSON object by a slice of path parts, returning the value if found.
json_set_path
Set a value at a dot-delimited path in a JSON object, creating intermediate objects as needed.
json_split_path
Split a dot-delimited config key path into parts, trimming and filtering empty segments.
json_unset_path
Remove a key at a dot-delimited path in a JSON object.
parse_json_value_arg
Parse a CLI argument as a JSON value, falling back to a string if parsing fails.
read_json_config
Read a JSON config file, returning an empty object if the file doesn’t exist.
resolve_worktree_template_defaults
Resolve effective worktree defaults from cascading project configuration.
validate_config_value
Validate a config value for known keys that require enum values.
write_json_config
Write a JSON value to a config file (pretty-printed with trailing newline).