click-config-file
Configuration file support for click applications.
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-fileuv
uv add click-config-filepoetry
poetry add click-config-fileInstalling 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
clickClick is a Python toolkit for building…
permissive · top 100 on PyPI
click-datetimeAdds datetime type support to Click, allowing…
permissive · top 15,000 on PyPI
click-promptclick-prompt adds interactive prompts to Click…
permissive · top 15,000 on PyPI
click-configfileExtends click with configuration file support,…
permissive · top 15,000 on PyPI
more-clickProvides pre-built Click decorators and…
permissive · top 15,000 on PyPI
click-composeProvides composable callback utilities for…
permissive · top 15,000 on PyPI
configobjConfigObj reads, writes, and validates…
permissive · top 5,000 on PyPI
rich-clickRenders Click command-line interfaces with rich…
permissive · top 1,000 on PyPI
django-clickWraps the click command-line library to let you…
permissive · top 15,000 on PyPI
click-logIntegrates Python's standard logging module…
permissive · top 5,000 on PyPI