Module config_env

Module config_env 

Source
Expand description

Environment Variable Configuration Support

Provides hierarchical configuration loading with precedence:

  1. Environment variables (GESTURA_* prefix)
  2. Config file (~/.gestura/config.yaml)
  3. Default values

All environment variables use the GESTURA_ prefix and snake_case naming.

Enums§

ApiKeyValidation
API key validation result

Constants§

ENV_MAPPINGS
Environment variable mappings for AppConfig fields
ENV_PREFIX
Environment variable prefix for all Gestura configuration

Functions§

get_env
Get an environment variable with the GESTURA_ prefix
get_env_bool
Get an environment variable as a boolean
get_env_u32
Get an environment variable as a u32
get_env_u64
Get an environment variable as a u64
get_env_usize
Get an environment variable as a usize
get_set_env_vars
Get all environment variables that are set
is_secret_key
Check if a key is a secret (should be redacted in logs)
print_env_docs
Print documentation for all environment variables
redact_secret
Redact a secret value for logging
validate_anthropic_key
Validate an Anthropic API key
validate_api_key
Validate any API key by provider name
validate_grok_key
Validate a Grok API key
validate_openai_key
Validate an OpenAI API key