Expand description
Configuration-tree loading and CLI helpers for layered config files.
The high-level API loads confique schemas directly, while the lower-level
tree traversal helpers remain available for custom loaders.
Use ConfigSchema with a confique::Config type when your schema owns an
include field. Use load_config to load the root config, all recursive
includes, .env values, and schema-declared environment values into the
final schema. Use build_config_figment or load_config_with_figment
when you need runtime source tracking. Use write_config_templates or
ConfigCommand to generate example template files that mirror the same
include tree. Use write_config_schemas to generate root and section JSON
Schemas for editor completion and validation. Use
install_shell_completion and uninstall_shell_completion for reusable
shell completion lifecycle commands.
Structs§
- Config
Node - One loaded config source in a tree.
- Config
Schema Target - Generated JSON Schema content for one output path.
- Config
Source - Value and includes returned by a config source loader.
- Config
Template Target - Generated template content for one output path.
- Config
Tree - A loaded config tree in traversal order.
- Config
Tree Options - Options for loading a recursive config tree.
- Confique
EnvProvider - Figment provider that maps environment variables declared in
confiqueschema metadata onto their exact field paths. - Template
Target - A source-to-output mapping for one generated config template.
Enums§
- Config
Command - Built-in clap subcommands for config templates and shell completions.
- Config
Error - Errors produced by high-level config loading and template generation.
- Config
Format - File format used when loading config files or rendering templates.
- Config
Tree Error - Errors produced while traversing a recursive config tree.
- Include
Order - Controls the order in which sibling include paths are traversed.
Traits§
- Config
Schema - A
confiqueschema that can expose recursive include paths and template section layout.
Functions§
- absolutize_
lexical - Converts a path to an absolute path and normalizes it lexically.
- build_
config_ figment - Builds the Figment runtime source graph for a config tree.
- collect_
template_ targets - Collects template targets by recursively following include paths.
- config_
schema_ targets_ for_ path - Collects the root schema and section schemas for a config type.
- handle_
config_ command - Handles a built-in config subcommand for a consumer CLI.
- install_
shell_ completion - Generates shell completion files and updates shell startup files when needed.
- load_
config - Loads a complete
confiqueschema from a root config path. - load_
config_ from_ figment - Extracts and validates a config schema from a Figment source graph.
- load_
config_ tree - Loads a config tree with default traversal options.
- load_
config_ with_ figment - Loads a config schema and returns the Figment graph used for runtime loading.
- normalize_
lexical - Normalizes a path by removing lexical
.and..components. - print_
shell_ completion - Writes shell completion output to stdout.
- resolve_
include_ path - Resolves an include path relative to the file that declared it.
- select_
template_ source - Chooses the source file used when generating templates.
- template_
for_ path - Renders the default template for one path.
- template_
targets_ for_ paths - Collects all template targets that should be generated for a config tree.
- template_
targets_ for_ paths_ with_ schema - Collects template targets and binds generated templates to JSON Schemas.
- trace_
config_ sources - Emits Figment source metadata for every leaf field at TRACE level.
- uninstall_
shell_ completion - Removes shell completion files and managed shell startup-file blocks.
- upsert_
managed_ block - Inserts or replaces a managed shell configuration block in a startup file.
- write_
config_ schema - Writes a Draft 7 JSON Schema for the root config type.
- write_
config_ schemas - Writes the root schema and section schemas for a config type.
- write_
config_ templates - Writes all generated config templates for a config tree.
- write_
config_ templates_ with_ schema - Writes all generated config templates with editor schema bindings.
Type Aliases§
- BoxError
- Boxed error type used by custom loaders.
- Config
Result - Result type used by the high-level configuration API.
- Result
- Result type used by the lower-level tree API.