$npx skillfedfor your agent

knack

A Command-Line Interface framework

With conditionsPyPI Application FrameworksReleased May 20267.4M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — knack-0.14.0-py3-none-any.whl
v0.14.0 · released 2026-05-14 · 6 runtime deps: argcomplete, jmespath, packaging, pygments, pyyaml, tabulate

Yes, if you are building a command-line tool in Python and want to avoid writing boilerplate argument parsing and command dispatch logic. The framework is actively maintained, has low install friction, and is proven in production by major projects like Azure CLI. Pin to a specific minor version as the authors recommend, since the project is still in initial development phase.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with six common runtime dependencies.
  • The project is actively maintained with a recent release, though the maintainers note it remains in initial development phase and recommend pinning to a specific minor version when used as a dependency.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute knack with minimal restrictions, though you must include the license notice.

last release 2026-05-14 (92 days) · last repo commit 2026-06-23 · 358 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 7,443,659 downloads/mo, #1,738 on PyPI

Verify before relying

pip install knack

from knack import CLI, CLICommandsLoader
from knack.commands import CommandGroup

class MyCommandsLoader(CLICommandsLoader):
    def load_command_table(self, args):
        with CommandGroup(self, 'mygroup', '__main__#{}') as g:
            g.command('mycommand', 'my_function')
        return self.command_table

mycli = CLI(cli_name='mycli', commands_loader_cls=MyCommandsLoader)
exit_code = mycli.invoke(['mygroup', 'mycommand'])
  • Whether the framework supports subcommands, aliases, or command hierarchies beyond the basic group structure shown in examples.
  • What testing or validation utilities knack provides for CLI applications built with it.
  • Performance characteristics or scalability limits for CLIs with many commands or complex argument trees.
Same gist for agents: .md · .json

What it is and what it does

Knack is a framework for building structured command-line interfaces in Python. It handles command registration, argument parsing, help text generation, and output formatting so you can focus on implementing command logic rather than CLI plumbing. The framework uses a loader pattern where you define command groups and arguments declaratively, then invoke the CLI with user input to execute the appropriate command.

The package depends on argcomplete for shell completion, jmespath for output filtering, packaging for version handling, pygments for syntax highlighting, pyyaml for configuration, and tabulate for formatted output. It's designed to scale from simple single-command tools to complex multi-command CLIs like the Azure CLI and VSTS CLI, which use knack in production. The project is in active development and maintained, though the authors recommend pinning to a specific minor version rather than using loose version constraints.

Use it for

  • Build a multi-command CLI tool with subcommands, argument validation, and automatic help text generation.
  • Create a wrapper around Azure or cloud service APIs that exposes functionality through a structured command interface.
  • Develop an internal DevOps or automation tool with consistent argument parsing and formatted output across many commands.
  • Add shell completion and formatted table output to an existing command-line application.
  • Implement a CLI that reads YAML or JSON configuration and applies it through structured commands.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are building a command-line tool in Python and want to avoid writing boilerplate argument parsing and command dispatch logic.

The framework is actively maintained, has low install friction, and is proven in production by major projects like Azure CLI. Pin to a specific minor version as the authors recommend, since the project is still in initial development phase.

Install

knack on PyPI

Before you install

Low install friction with six common runtime dependencies. The project is actively maintained with a recent release, though the maintainers note it remains in initial development phase and recommend pinning to a specific minor version when used as a dependency.

License in practice

MIT license is permissive; you can use, modify, and distribute knack with minimal restrictions, though you must include the license notice.

Quickstart

pip install knack

from knack import CLI, CLICommandsLoader
from knack.commands import CommandGroup

class MyCommandsLoader(CLICommandsLoader):
    def load_command_table(self, args):
        with CommandGroup(self, 'mygroup', '__main__#{}') as g:
            g.command('mycommand', 'my_function')
        return self.command_table

mycli = CLI(cli_name='mycli', commands_loader_cls=MyCommandsLoader)
exit_code = mycli.invoke(['mygroup', 'mycommand'])

Verify before relying

  • Whether the framework supports subcommands, aliases, or command hierarchies beyond the basic group structure shown in examples.
  • What testing or validation utilities knack provides for CLI applications built with it.
  • Performance characteristics or scalability limits for CLIs with many commands or complex argument trees.

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
6 packages
argcompletejmespathpackagingpygmentspyyamltabulate
MaintenanceActively maintained 92 days since the last release
Last repo commit
First released
Downloads7,443,659 / month, #1,738 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Evidence: knack-0.14.0-py3-none-any.whl

Tags

Capabilities
cli framework pythoncommand line interface builderargument parsing frameworkcli development librarycommand-line tool frameworkpython cli toolkitstructured command parser
Topics
cli-frameworkcommand-dispatchargument-parsing

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “argument parsing framework”

  • knackKnack is a Python framework for building command-line interfaces with…
  • cementCement is a Python application framework designed specifically for…
  • cleoCleo builds command-line interfaces with argument and option parsing,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Application Frameworks packages

fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
textual Worth it
PyPI · Application Frameworks · released Jun 2026

Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.

Install it if you're developing CLI tools, dashboards, or interactive terminal applications.

MITpure Python
443.6Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
mcp Worth it
PyPI · Application Frameworks · released Jul 2026

Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.

Install it if you need to build or connect to servers.

MITpure Python · 3.10+
319.3Mdownloads / mo
Werkzeug Worth it
PyPI · Application Frameworks · released Apr 2026

Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.

BSD-3-Clausepure Python · 3.9+
268.1Mdownloads / mo

See also ms-fabric-cli · azure-cli-core · sfctl · botbuilder-core · cliff · az.cli · azdev · clikit · args