Clak
Class-based command-line interfaces on top of Python’s argparse.
Define apps with Parser, Argument, and Command — same argument syntax you
already know, plus optional components for views, logging, config, and shell
completion.
Requires Python 3.10–3.14.
Start here
- Install —
pip install mrjk.clak - Quickstart — a two-command hello world
- Getting started guide — arguments step by step
Then pick what you need:
| I want to… | Go to |
|---|---|
| Build nested / git-like commands | Nested commands |
| Print tables / JSON from commands | Views |
Add -v logging |
Logging |
| Load XDG config files | Config |
| Ship shell tab-completion scripts | Completion |
| Handle errors with exit codes | Error handling |
| Paste context into an AI chat | AI primer · AI reference |
| Compare Clak to argparse, Click, Typer, Cliff | Comparison |
| See what is planned | Roadmap |
Why Clak?
- Argparse-native — no new DSL;
Argument(...)mirrorsadd_argument(...) - Class-based — inheritance and composition for real apps
- Optional batteries — mix in views, logging, config, completion only when useful
Feature overview: Features. How Clak relates to argparse, Click, Typer, and Cliff: Comparison. Design notes: Architecture.