Skip to content

feat: add --show-config flag to print effective configuration #2

@jkomalley

Description

@jkomalley

Problem

There is currently no way to inspect the effective configuration from the CLI. Users cannot tell which config file was loaded, or what truthy/falsy sets are active — making it hard to debug unexpected coercion behavior.

Proposed Solution

Add a --show-config flag that prints the effective configuration to stdout and exits:

$ envbool --show-config
config file: /path/to/pyproject.toml
strict:      false
warn:        false
truthy:      true, 1, yes, on
falsy:       false, 0, no, off

If no config file was loaded, print config file: none.

This calls the existing load_config() / EnvBoolConfig from config.py — no new config logic needed.

Files

  • src/envbool/_cli.py
  • tests/test_cli.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions