--- id: click-configfile version: "0.2.3" license: BSD license_treatment: permissive maintenance: dormant --- # click-configfile — This package supports click commands that use configuration files. License: permissive · Maintenance: dormant · Downloads: 556.6K/mo ## What it is and what it does click-configfile bridges click command-line tools with INI-format configuration files. It lets you define configuration schemas that map INI sections and keys to click command options, then automatically populate those options from a config file at runtime. The package provides ConfigFileReader as a base class and Param/SectionSchema decorators to describe how config sections should be parsed and stored. The typical workflow is to define a schema class with nested SectionSchema classes (decorated with @matches_section to match section names, including wildcards), subclass ConfigFileReader to specify which config files to read and which schemas to use, then pass the result to click's context_settings as a default_map. This lets your CLI accept both config-file-driven and command-line-driven option values in a unified way. Use it for: - Build a CLI tool where users can set defaults in a config file instead of passing all options on every invocation. - Parse multi-section INI files with dynamic section names (e.g., person.alice, person.bob) into structured command parameters. - Combine config-file and command-line options, with CLI flags overriding config file values. - Reduce boilerplate in click commands by centralizing option defaults in an INI file. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Extends click with configuration file support, allowing CLI commands to read INI-format config files and merge their values into command options. Yes, if you need config-file support for a click CLI and are comfortable with a dormant package. The code is simple, has no known vulnerabilities, and low install friction. However, be aware that the last release was 2017 and maintenance is dormant—if you encounter issues with modern Python or click versions, you may need to fork or patch it yourself. Suitable for stable, self-contained projects that don't require ongoing upstream support. ## Install pip install click-configfile uv add click-configfile poetry add click-configfile ## Installing click-configfile Before you install: Low install friction with a pure-Python wheel. Maintenance is dormant—last release was 2017-09-24 and last commit 2023-09-07—so expect no active bug fixes or feature updates, though the package remains archived-free and has no known vulnerabilities. License in practice: BSD license (permissive) places no significant restrictions on use, modification, or distribution in most contexts. Quickstart: pip install click-configfile from click_configfile import ConfigFileReader, Param, SectionSchema import click class MySchema(SectionSchema): name = Param(type=str) class MyReader(ConfigFileReader): config_files = ["config.ini"] config_section_schemas = [MySchema] CONTEXT_SETTINGS = dict(default_map=MyReader.read_config()) @click.command(context_settings=CONTEXT_SETTINGS) def mycmd(): pass Requires click to be installed; Python 2.6+ or Python 3 support is listed but unspecified in requires_python. Verify before relying: - Whether the package works reliably with modern Python versions (3.9+) given its last release was 2017. - Current compatibility with recent versions of click, configparser, and six. ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 556.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags click configuration file support, CLI config file parsing, INI file to click options, command-line config management, click configparser integration, cli-config, click-extension [View on SkillFed](https://skillfed.io/packages/click-configfile) · [View on PyPI](https://pypi.org/project/click-configfile/)