pyclifer
PYthon Command Line Interface FramEwoRk — a decorator-driven CLI framework built on click-extra and rich-click.
pyclifer provides four decorators (@app_group, @group, @command, @option) that give
your CLI applications automatic configuration management, environment variable binding,
Rich-enhanced logging, global option propagation, and standardized output formatting —
with zero boilerplate.
Installation
pip install pyclifer
Requires Python 3.10+.
Development
Requires Task.
task install # install dev + docs dependencies
pre-commit install # activate git hooks (ruff check + format on every commit)
task check # lint + test
task test # run test suite
task tox # run tests across Python 3.10–3.13
task release:patch # bump patch version, commit, tag and push
task release:minor
task release:major
Run task --list to see all available tasks.
Quick Start
"""CLI application using pyclifer."""
from pyclifer import app_group, command, option, Response
@app_group(handle_response=True)
def main():
"""My CLI application."""
pass
@main.command()
@option("--name", "-n", default="World", help="Your name")
def hello(name: str) -> Response:
"""Say hello."""
return Response(success=True, message=f"Hello {name}!")
if __name__ == "__main__":
main()
$ python app.py --help
Usage: app.py [OPTIONS] COMMAND [ARGS]...
My CLI application.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --version Show the version and exit. │
│ --log-file FILE Path to the log file (with │
│ daily automatic rotation). │
│ [env var: MYAPP_LOG_FILE] │
│ -v --verbosity LEVEL Either TRACE, DEBUG, INFO, │
│ WARNING, ERROR, CRITICAL. │
│ [env var: MYAPP_VERBOSITY] │
│ [default: WARNING] │
│ -C --config CONFIG_PATH Configuration file │
│ location. Supports glob │
│ patterns and remote URLs. │
│ [env var: MYAPP_CONFIG] │
│ [default: │
│ /etc/myapp/*.{toml,yaml, │
│ yml,json,ini,xml}, │
│ ~/.config/myapp/*.{toml, │
│ yaml,yml,json,ini,xml}] │
│ -o --output-format [json|yaml|table|rich|raw] Specify the output format │
│ for the command. [env var: │
│ MYAPP_OUTPUT_FORMAT] │
│ [default: table] │
│ -h --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ hello Say hello. │
╰──────────────────────────────────────────────────────────────────────────────╯
$ python app.py hello --name Alice
Hello Alice!
$ python app.py hello --help
Usage: app.py hello [OPTIONS]
Say hello.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ -n --name TEXT Your name [env var: │
│ MYAPP_HELLO_NAME] [default: │
│ World] │
│ -v --verbosity LEVEL Either TRACE, DEBUG, INFO, │
│ WARNING, ERROR, CRITICAL. │
│ [env var: │
│ MYAPP_HELLO_VERBOSITY] │
│ [default: WARNING] │
│ -o --output-format [json|yaml|table|rich|raw] Specify the output format │
│ for the command. [env var: │
│ MYAPP_HELLO_OUTPUT_FORMAT] │
│ [default: table] │
│ -h --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
Features
- Decorator-driven — four decorators (
@app_group,@group,@command,@option) cover the full CLI surface - Autoconfiguration — TOML/YAML/JSON/XML config files with Linux path conventions (
/etc/<app>/,~/.config/<app>/) - Environment variables — automatic prefix-based binding for every option
- Rich logging — colored output, custom
TRACElevel, secret masking, rotating log files - Structured output —
Response+OperationResultwith JSON/YAML/Table/Rich/Raw formatters via--output-format - Renderer system — declarative
BaseRenderercontrols all output formats from a single class; streaming generators drive a Live Rich display viarich_on_itemhooks - Service layer —
BaseInterface.respond()auto-detects list vs generator, picks the right renderer, and builds theResponse— commands stay thin - Global options — options marked
is_global=Truepropagate automatically to all subcommands - Pagination — built-in
PaginatedResponsewith page/limit/total in JSON and YAML output - Project scaffolding —
pyclifer project init / add app / add command / add integrationgenerates a ready-to-use project structure
Documentation
Full documentation at bahamut45.github.io/pyclifer.
License
MIT — see LICENSE.
Metadata
Release files for pyclifer 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyclifer-0.9.0.tar.gz | 716.5 kB | With provenance | Details for pyclifer-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyclifer-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for pyclifer-0.9.0-py3-none-any.whl |
Total release size: 829.1 kB
Release files / pyclifer-0.9.0.tar.gz
| Download URL | pyclifer-0.9.0.tar.gz |
|---|---|
| Size | 716.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a409cb524ee8d366348a2e53e7186f067b687fff6235dbcae419055ebcb8d0b0
|
|
BLAKE2b-256 checksum How to use checksums |
dee11834651ea7aa76550584bf621e0c46b2e1f78701ecfd4f46319de93dc438
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / pyclifer-0.9.0-py3-none-any.whl
| Download URL | pyclifer-0.9.0-py3-none-any.whl |
|---|---|
| Size | 112.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d862a21fa9c5097b0adaa82ab4f1ad2d1d05dce1d6323b070b4190fc1f5f5dc8
|
|
BLAKE2b-256 checksum How to use checksums |
effbd1faaff162763f6163d160af3d6cef17255f3ace611e663a82ee3e8cbfb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for pyclifer 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pyclifer-0.9.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.