skillfed

click-config-file

Configuration file support for click applications.

click-config-file v0.6.0 198.6K downloads/30d#9,726 on PyPI42
Permissive license MIT Abandoned released

What it is and what it does

click-config-file is a decorator that bolts configuration file support onto Click applications. Instead of manually parsing config files, you add a single @click_config_file.configuration_option() decorator to your command, and it automatically handles reading and merging settings from a file. It respects a sensible resolution order: command-line arguments override environment variables, which override config file settings, which override defaults.

The package uses configobj's unrepr mode by default to parse configuration files, but you can supply a custom provider function to support other formats like JSON or YAML. It's designed for simplicity—it works with sensible defaults out of the box and requires no mandatory configuration arguments.

Use it for:

  • Add config file support to a CLI tool without writing custom file-parsing logic
  • Let users override CLI defaults with a persistent configuration file in their home directory
  • Support both command-line and config-file options with proper precedence handling
  • Build a multi-command CLI where each command can read from a shared config file

Worth the install?

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

Adds configuration file support to Click command-line applications through a single decorator, automatically handling file parsing and option resolution.

Yes, if you need lightweight config file support for a Click application and can accept the maintenance risk. The package is abandoned (last release 2020), so it will not receive updates for new Click versions or Python features. Install only if the feature set is complete for your use case and you're willing to fork or patch it yourself if Click evolves incompatibly.

Install

click-config-file on PyPI

pip

pip install click-config-file

uv

uv add click-config-file

poetry

poetry add click-config-file

Installing click-config-file

Before you install

Low friction install with only two runtime dependencies (click and configobj). However, the package is abandoned—last release was 2020-04-28 and no commits since 2023-03-22. Use only if you need minimal config file support and can maintain a fork if necessary.

License in practice

MIT license is permissive; you can use this in commercial or proprietary projects with minimal restrictions, though you must include the license text.

Quickstart

pip install click-config-file

import click
import click_config_file

@click.command()
@click.option('--name', default='World')
@click_config_file.configuration_option()
def hello(name):
    click.echo('Hello {}!'.format(name))

Verify before relying

  • Whether the package works with current Click versions (last tested 2020)
  • Whether configobj's unrepr mode is still the recommended config format
  • Support for Python versions beyond 3.x (requires_python is unspecified)

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — click, configobj
Maintenance abandoned — 2,299 days since the last release
Last repo commit
First released
Downloads 198,553/month — #9,726 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: click_config_file-0.6.0-py2.py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3

Tags

click config file decoratorconfiguration file support clickcli config file handlingclick application settingscommand line config parserclick configuration managementini config file click
cli-configclick-extension

More Software Development packages