Fork of pallets/click CLI library for vendoring in Reynard
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David Lord 04ef3a6f47
Some checks failed
pre-commit / main (push) Has been cancelled
GitHub Actions security analysis with zizmor / zizmor (push) Has been cancelled
Tests / 3.10 (push) Failing after 0s
Tests / 3.11 (push) Failing after 0s
Tests / 3.12 (push) Failing after 0s
Tests / 3.13 (push) Failing after 0s
Tests / 3.14 (push) Failing after 0s
Tests / 3.14t (push) Failing after 0s
Tests / Mac (push) Failing after 0s
Tests / PyPy (push) Failing after 0s
Tests / Windows (push) Failing after 0s
Tests / typing (push) Failing after 0s
update dev dependencies
2026-04-03 15:55:22 -07:00
.devcontainer update project files 2024-04-24 11:17:44 -07:00
.github update dev dependencies 2026-04-03 15:55:22 -07:00
docs apply review suggestions 2026-02-07 13:40:28 -07:00
examples drop end of life python versions 2025-05-10 15:04:47 -07:00
src/click Revert "Use default=True as a sentinel for non-boolean flags" 2026-03-02 13:17:20 +04:00
tests fix windows import check 2026-04-03 15:52:33 -07:00
.editorconfig update project files 2024-04-24 11:17:44 -07:00
.gitignore use uv 2025-05-15 12:09:23 -04:00
.pre-commit-config.yaml update dev dependencies 2026-04-03 15:55:22 -07:00
.readthedocs.yaml Minor tweaks to readthdocs builds. 2025-05-27 01:36:10 -07:00
CHANGES.rst Change update release date. 2026-04-02 23:18:50 -07:00
LICENSE.txt update project files 2024-04-24 11:17:44 -07:00
pyproject.toml Release version 8.3.2 2026-03-14 22:33:02 -07:00
README.md svg logo 2025-06-12 13:55:01 -07:00
uv.lock update dev dependencies 2026-04-03 15:55:22 -07:00

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

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.

Contributing

See our detailed contributing documentation for many ways to contribute, including reporting issues, requesting features, asking or answering questions, and making PRs.