+3
Daily
17,826
stars
2,724
forks
182
watchers
1,920
prs
1,825
issues
31
releases
README
Click
Click is a Python package for creating beautiful command line interfaces
in a composable way with as little code as necessary. It's the "Command
Line Interface Creation Kit". It's highly configurable but comes with
sensible defaults out of the box.
It aims to make the process of writing command line tools quick and fun
while also preventing any frustration caused by the inability to
implement an intended CLI API.
Click in three points:
- Arbitrary nesting of commands
- Automatic help page generation
- Supports lazy loading of subcommands at runtime
A Simple Example
python
import click
@click.command()
@click.option("--count", default=1, help="Number of greetings.")
@click.option("--name", prompt="Your name", help="The person to greet.")
def hello(count, name):
"""Simple program that greets NAME for a total of COUNT times."""
for _ in range(count):
click.echo(f"Hello, {name}!")
if __name__ == '__main__':
hello()
$ python hello.py --count=3
Your name: Click
Hello, Click!
Hello, Click!
Hello, Click!
Donate
The Pallets organization develops and supports Click and other popular
packages. In order to grow the community of contributors and users, and
allow the maintainers to devote more time to the projects, [please
donate today][].
[please donate today]: https://palletsprojects.com/donate
Contributing
See our [detailed contributing documentation][contrib] for many ways to
contribute, including reporting issues, requesting features, asking or answering
questions, and making PRs.
[contrib]: https://palletsprojects.com/contributing/Top issues
#473The leftover arguments are empty in Click 6.0 Context28 comments · 2015-12-01#373Equivalent of argparse's add_argument_group, help sections28 comments · 2015-07-12#2033[Feature] Basic `async` support23 comments · 2021-08-04#3076Introduction to the command line tutorial21 comments · 2025-09-21#3081Add Screenshot workflow18 comments · 2025-09-22#2834Meta Issue for Future Parser Changes15 comments · 2025-01-04#3154Click 9.010 comments · 2025-11-22#3847More private utilities that need to be marked and public api deprecated9 comments · 2026-09-06
Latest release
8.5.1 8.5.1 2026-11-06This is the Click 8.5.1 fix release, which fixes bugs but does not otherwise change behavior and should not result in breaking changes compared to the latest feature release. PyPI: https://pypi.org/project/click/8.5.1/ Changes: https://click.palletsprojects.com/page/changes/version-8-5-1 Milestone: https://github.com/pallets/click/milestone/66 - Fix copy.deepcopy() and pickle on a Parameter, Option or Command. 3805 - A KeyboardInterrupt arriving while Command.main() reports an abort or an error, or while it exits, no longer escapes as an unhandled traceback. The command still ex