1. License
“Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met”
Any use is allowed; keep the copyright notice and license text when you ship Click's files.
click.palletsprojects.com/en/stable/license/3. Used by agents' projects
Dependency in 154 public GitHub projects set up for AI coding agents that we scanned (2.5%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
From the package registry and GitHub, checked daily; card checked Nov 11, 2026. Tap a verdict to see its source.How we checkedReport an error
What Click does
Click is a free Python library for making command-line tools, the programs you run by typing a command in a terminal. You describe the options with a few lines above a function, and Click reads what the user typed, checks it and writes the help screen. It does not draw windows or web pages.
What people build with it
A script your team can run
Your assistant wrote a Python script that resizes photos or imports a price list; Click turns it into a command with named options, defaults and a --help screen.
One tool with several commands
An admin helper for your shop with separate commands such as create-user and wipe-orders, each with its own options and help.
Ask before deleting things
A cleanup command asks "Are you sure?" and hides a password while it is typed, so nobody wipes data or leaks a secret by accident.
Keys from settings, not the command
A command reads a service's secret key from a setting on the server instead of the typed command, so the key does not end up in the shell history.
Check your commands in tests
Your assistant writes tests that run each command with sample input and check the exit code and the printed text.
Tab completion for your tool
People who use your tool every day press Tab to finish command and option names in their terminal.
Click popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How Click is used
- Click is a dependency in 154 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (9.5% of the 1,623 Python ones), #13 of 299 in dev workflow and config.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,624; those are left out of every share on this page.
- The most used alternative in our scan is Typer (126 projects).
- Projects that use it most often also use Pydantic (64.9%), python-dotenv (61.7%), PyYAML (60.4%).
- It is more common in projects set up for Roo Code (6.3%) than for OpenClaw (1.5%).
By coding agent
Often used with
More about Click
Funding
- GitHub Sponsors: https://github.com/pallets
- Own page: https://palletsprojects.com/donate
- Tidelift: https://tidelift.com/funding/github/pypi/Flask
- thanks.dev: https://thanks.dev/u/gh/pallets
- 31 GitHub sponsors
Agent Skills for it
- click-test-plan: Design first-click and click tests for findability and navigation. Use when testing whether people can locate something. For full task-based
Head to head
- Click vs Typer used together in 36 projects
More in Dev workflow and config
Alternatives
Click This page
Pick Typer when you would rather describe options with Python type hints than with decorators; it is built on top of Click.
Pick Fire for a quick internal tool made from existing functions with no option definitions at all.
Pick docopt when you want to write the help text first and have the parser follow it, and need no nested commands.
Get started
Tell your AI assistant
“Use the Python library Click (pin click==8.5.1, Python 3.10+) to turn this script into a command with named options, defaults, a --help screen and an environment variable for the API key, add CliRunner tests, and register it under [project.scripts] in pyproject.toml.”
Install Click into your project's virtual environment.
pip install clickWrite a command as a decorated function and call it.
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()To run it as a plain command (and get tab completion), add it to pyproject.toml as an entry point and install the project.
[project.scripts] hello = "hello.hello:cli"
Mistakes to avoid
8.2.0 removed the mix_stderr parameter; in our run on 8.5.1 it raised TypeError (unexpected keyword argument).
The attribute is deprecated since 8.2.0; in our run on 8.5.1 it printed a DeprecationWarning that names removal in Click 9.1.
Both old base classes are deprecated since 8.2.0.
Click replaces underscores with dashes in command names; our run listed create-user and wipe-orders.
isolated_filesystem() is deprecated since 8.5.0 because it changes the working folder of the whole process.
Questions
Can I use it in a paid, closed-source tool?
Yes. Click is under the BSD-3-Clause license; keep its copyright notice if you ship its files.
Why not Python's built-in argparse?
Click's docs say argparse does not allow proper nesting of commands, so Click has its own parser.
Can it ask for a password without showing it?
Yes. password_option() asks twice and hides what is typed.
Which shells get tab completion?
Bash 4.4 and newer, Zsh, Fish and, since 8.5.0, PowerShell.
Is it still maintained?
Yes. Version 8.5.1 was released on 2026-11-06 by the Pallets organization, which also makes Flask.