click
Package — CLIPython 3.7+Intermediate
Composable CLI toolkit with decorators for options and arguments
Quick Info
- Documentation
- Official Docs
- Python Version
- 3.7+
- Dependencies
- None (pure Python)
- Install
pip install click
Learn by Difficulty
Quick Example
python
# Install: pip install click import click @click.command() @click.option("--name", default="World", help="Who to greet") @click.option("--count", default=1, help="Number of greetings") def hello(name, count): for _ in range(count): click.echo(f"Hello, {name}!") if __name__ == "__main__": hello()
click is a third-party package. Composable CLI toolkit with decorators for options and arguments. Install with: pip install click
Try in PlaygroundTags
packageclicommand-linedecoratorargument-parsing
Related Items
typer
Package — CLI
Build CLI apps with type hints; built on Click
argparse
Stdlib — CLI
Parse command-line arguments with type checking and help messages
fire
Package — CLI
Auto-generate CLIs from any Python object
rich
Package — CLI
Rich text, tables, progress bars, syntax highlighting in terminal
questionary
Package — CLI
Interactive CLI prompts (select, confirm, checkbox, text)