Source code for ferrosoft.cli.dumpconfig
#!/usr/bin/env python3
"""``platform-dumpconfig`` — print the resolved Ferrosoft configuration.
Reads and merges all YAML config files listed in the ``FERROSOFT_CONFIG``
environment variable (colon-separated paths, defaulting to ``settings.yml``),
applies environment-block overrides for the active ``FERROSOFT_ENV``, and
prints the resulting dictionary as YAML to stdout.
Useful for debugging configuration issues or verifying that variable
substitution (``@ {env[…]}`` / ``@ {settings[…]}``) resolves correctly.
"""
import yaml
from ferrosoft.config import read_config_files
[docs]
def main():
"""Read all config files and print the merged result as YAML."""
print(yaml.dump(read_config_files(), default_flow_style=False))
if __name__ == "__main__":
main()