skillfed

click-default-group

click_default_group

click-default-group v1.2.4 8.1M downloads/30d#1,662 on PyPI78
Permissive license DORMANT released

What it is and what it does

click-default-group is a small extension to Click that changes how command groups behave when invoked without a subcommand. Normally, Click shows a help message; this package lets you designate a default subcommand to run instead. You define the default by passing `default='subcommand_name'` and optionally `default_if_no_args=True` to the `@click.group()` decorator, and the specified subcommand executes automatically when the CLI is called with no arguments.

The package depends only on click and installs with low friction. It is marked Production/Stable and has no known security vulnerabilities. Maintenance is dormant (last release August 2023), but the codebase remains archived and the repository shows recent activity. It supports Python 2.7 and Python 3.5 through 3.11, as well as PyPy.

Use it for:

  • Build a CLI tool where running the command with no arguments triggers a sensible default action instead of showing help.
  • Create a command-line interface where one subcommand is so frequently used that users expect it to run implicitly.
  • Simplify user experience for single-purpose CLI wrappers that have optional alternate subcommands but a clear primary workflow.
  • Extend existing Click applications to support a fallback behavior without rewriting the group logic.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Extends Click's Group class to invoke a default subcommand when no subcommand is explicitly passed, instead of showing the help message.

Yes, if you use Click and want a default subcommand behavior. The package is lightweight, stable, and dependency-light. Dormant maintenance is a minor concern only if you anticipate needing updates for future Click versions; for current Click releases, it works as documented with no known issues.

Install

click-default-group on PyPI

pip

pip install click-default-group

uv

uv add click-default-group

poetry

poetry add click-default-group

Installing click-default-group

Before you install

Low install friction with a single dependency on click. Maintenance is dormant (last release 2023-08-04, last commit 2024-09-03), but the package is marked Production/Stable and has no known vulnerabilities.

License in practice

Distributed under permissive licensing (BSD 3-Clause per description), allowing commercial and private use with minimal restrictions.

Quickstart

pip install click-default-group

import click
from click_default_group import DefaultGroup

@click.group(cls=DefaultGroup, default='foo', default_if_no_args=True)
def cli():
    pass

@cli.command()
def foo():
    click.echo('foo')

cli()

Verify before relying

  • Whether dormant maintenance status poses a risk for future Click API changes or Python version incompatibilities beyond those already declared.
  • Real-world compatibility with Click versions beyond 7.0, given the last release was in 2023.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=2.7)
Install friction low — pure-Python wheel
Runtime dependencies 1 — click
Maintenance dormant — 1,106 days since the last release
Last repo commit
First released
Downloads 8,120,702/month — #1,662 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: click_default_group-1.2.4-py2.py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: Public DomainProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

click default subcommandclick group default commandcli default behaviorclick without subcommandclick implicit commanddefault click groupclick command fallback
click-extensioncli-defaults

More Software Development packages