Skip to content

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.

pip install mrjk.clak

Install with package managers

Tip

Recommended for production use.

poetry add mrjk.clak
pdm add mrjk.clak
uv add mrjk.clak

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):

pip install 'mrjk.clak[colors]'

--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:

pip install 'mrjk.clak[config]'

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.

pip install 'mrjk.clak[markdown]'
pip install 'mrjk.clak[rst]'

Shell completion helper

argcomplete is already a dependency of Clak. To activate it for many Python CLIs on a machine (optional, once):

activate-global-python-argcomplete

See Shell completion for generating a script for your app.