Skip to content

Configuration

Configuration file support for persistent CLI defaults.

Loading Config

load_config

load_config(config_path: Path | None = None) -> PkgdbConfig

Load configuration from TOML file.

Parameters:

Name Type Description Default
config_path Path | None

Path to config file. If None, uses the default location.

None

Returns:

Type Description
PkgdbConfig

PkgdbConfig with values from the file, or defaults if file doesn't exist.

get_config_path

get_config_path() -> Path

Get the path to the config file (~/.pkgdb/config.toml).

Config Data Class

PkgdbConfig dataclass

Configuration loaded from config.toml.

All fields are optional -- missing fields use the application defaults. CLI flags always override config values.