skillfed

typer-config

Utilities for working with configuration files in typer CLIs.

typer-config v1.5.1 307.1K downloads/30d#7,780 on PyPI
Permissive license MIT Active released

What it is and what it does

typer-config is a decorator-based utility library that extends typer CLI applications with configuration-file support. Instead of passing many command-line options every time you run a CLI tool, you can write those parameters once in a YAML, TOML, JSON, or Dotenv file and reference it with a single --config parameter. The package provides decorators like @use_yaml_config, @use_toml_config, @use_json_config, and @use_dotenv_config that inject a --config option into your typer command, plus a generic @use_config decorator for custom loaders.

The package depends only on typer and works with modern Python versions (3.10 through 3.14). Optional dependencies for specific file formats can be installed separately, so you only add what you need. It's designed for typer applications with many parameters where repeatedly typing long command lines becomes impractical.

Use it for:

  • Replace repetitive multi-option CLI invocations with a single config file reference for complex tools.
  • Store environment-specific settings (dev, staging, prod) in separate YAML or TOML files for the same CLI.
  • Let non-technical users configure CLI tools by editing a simple configuration file instead of memorizing command syntax.
  • Manage dotenv-based configuration for CLI tools that read from environment files.
  • Prototype CLI parameter sets and reuse them across multiple runs without retyping.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds configuration-file support to typer CLI applications, letting you replace long command-line arguments with a single config file parameter.

Yes. Low install friction, active maintenance, no known vulnerabilities, and a clear use case for typer users managing complex CLIs. The MIT license poses no restrictions. Install if you build typer applications with many parameters or want to let users configure them via files.

Install

typer-config on PyPI

pip

pip install typer-config

uv

uv add typer-config

poetry

poetry add typer-config

Installing typer-config

Before you install

Low friction: pure Python wheel with a single runtime dependency (typer). Active maintenance status with recent release.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions.

Quickstart

pip install typer-config

import typer
from typer_config import use_yaml_config

app = typer.Typer()

@app.command()
@use_yaml_config()
def main(foo: str):
    print(foo)

if __name__ == "__main__":
    app()

Requires Python 3.10 or later.

Verify before relying

  • Whether optional dependencies (YAML, TOML, Dotenv libraries) are automatically installed or must be specified separately.
  • Performance characteristics when loading large configuration files.
  • Support for nested or complex configuration structures beyond simple key-value pairs.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — typer
Maintenance actively maintained — 166 days since the last release
First released
Downloads 307,080/month — #7,780 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: typer_config-1.5.1-py3-none-any.whl

Keywords: typer, config, configuration, configuration-file, yaml, toml, json, dotenv, cli

Intended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

typer config filecli configuration decoratoryaml config for typertoml configuration clidotenv config loadertyper command options from filecli parameter configuration
cli-configtyper-extension

More Software Development packages