click-default-group
click_default_group
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-groupuv
uv add click-default-grouppoetry
poetry add click-default-groupInstalling 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
click-aliasesAdds command aliases to Click CLI groups and…
permissive · top 5,000 on PyPI
click-didyoumeanAdds git-like "did-you-mean" suggestions to…
permissive · top 1,000 on PyPI
click-pluginsExtends Click CLI groups to load external…
permissive · top 1,000 on PyPI
click-help-colorsAdds color customization to Click command-line…
permissive · top 5,000 on PyPI
click-shellConverts a click command-line app into an…
permissive · top 15,000 on PyPI
md-click-2Generates markdown documentation files…
permissive · top 15,000 on PyPI
click-replAdds an interactive REPL mode to Click…
permissive · top 1,000 on PyPI
click-logIntegrates Python's standard logging module…
permissive · top 5,000 on PyPI
cloupCloup extends Click with option groups,…
permissive · top 5,000 on PyPI
more-clickProvides pre-built Click decorators and…
permissive · top 15,000 on PyPI