Installation
Requirements
Clak supports Python 3.10–3.14. Packaging declares requires-python = ">=3.10,<4.0".
Package installation
Clak is a Python library. Install it with any of the following methods.
Install with pip
Tip
Recommended for quickstart and evaluation.
Install with package managers
Tip
Recommended for production use.
Install from git
Tip
Recommended for development or testing a specific branch.
# Development branch
pip install git+https://github.com/mrjk/python-clak.git@develop
# Stable default branch
pip install git+https://github.com/mrjk/python-clak.git
Optional extras
Colors
Colored log output for LoggingOptMixin (via coloredlogs):
--log-colors / --no-log-colors is always available. Default is on for a
TTY; set CLAK_LOG_COLORS=0 (or 1) to force the default without the flag.
CLAK_COLORS=0 is a hard kill-switch that skips coloredlogs integration even
when the package is installed.
Config / YAML
YAML config files for XDGConfigMixin, and YAML output for views
(--format yaml), need PyYAML:
JSON config files and --format json / csv work without extras (stdlib).
Markdown / RST views
Terminal rendering for MarkdownView needs rich; RstView needs docutils.
--format raw needs no extra package. The same rich extra colors
--help and CompositeView section titles.
Shell completion helper
argcomplete is already a dependency of Clak. To activate it for many Python
CLIs on a machine (optional, once):
See Shell completion for generating a script for your app.