A command-line utility toolkit for Python, providing classes and functions for building CLI applications with subcommands, namespaces, configuration, logging, and auto-colorized help text. Current version is 2.7.7, supporting Python 3.9+. It follows a moderate release cadence with bugfixes and minor features.
Install & Compatibility
Where this runs
tested against v2.7.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
from cmdkit import Application
from cmdkit import Interface
Creates a minimal CLI application using the Command class.
from cmdkit import Command, Namespace
class MyApp(Command):
name = 'myapp'
usage = 'myapp [options]'
description = 'A sample CLI application'
interface = Command.build_interface(
'MyApp',
'A sample CLI app',
'v1.0'
)
def __init__(self, name=None):
super().__init__(name=name)
# Add subcommands, options, etc.
if __name__ == '__main__':
MyApp.main()
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.