pyguides

Tutorial series

Python CLI

3 tutorials — follow in order for the best learning path.

  1. Building CLIs with Click

    Build CLIs with Python's Click library. Define commands with decorators, handle options and arguments, validate input, and compose multi-command interfaces.

  2. Modern CLIs with Typer

    Build elegant command-line interfaces using Python type hints with Typer, built on Click.

  3. Building Installable CLI Tools

    Learn how to create Python command-line tools that users can install with pip, using pyproject.toml entry points and argparse.