Click vs Typer
Click vs Typer compared for 2026: Click 8.5.1 (decorator-based CLI toolkit from Pallets, zero dependencies, BSD-3-Clause) vs Typer 0.29.2 (type-hint CLIs that now vendor Click 8.3.1 and validate with Pydantic, MIT). Includes startup time, install size, validation behaviour, completion and testing from runs we did on the same machine, plus a clear pick.
Quick Answer
Click and Typer both build Python command-line tools with subcommands, help pages, shell completion and a test runner, and in 2026 they are no longer the same stack. Click 8.5.1 is a single 0.5 MB package with no dependencies that declares options in decorators. Typer 0.29.2 declares options with type hints, but since 0.26.0 it ships its own copy of Click 8.3.1 instead of depending on Click, and since 0.29.0 it validates arguments with Pydantic. In our run, the same two-command CLI started in about 50 ms with Click and about 155 ms with Typer, and Typer installed 12 packages (16 MB) against Click's one. Typer accepted Unix timestamps and timezone offsets for datetime options that Click rejected. Pick Typer for internal tools and apps where typed signatures and nicer errors matter more than startup time; pick Click for CLIs that run often, ship inside other packages, or need Click plugins and custom parameter types.
Last updated November 25, 2026. Covers Click 8.5.1 (6 November 2026) and Typer 0.29.2 (18 November 2026) on Python 3.13.18; release notes, docs, package metadata and repository data read on 25 November 2026, plus same-machine startup, install-size, memory, validation, completion and testing runs we did that day.
| Feature | Click | Typer |
|---|---|---|
| Licence & Repository | BSD-3-Clause; pallets/click, ~17.8k stars | MIT; fastapi/typer, ~20.4k stars |
| Latest Release (Nov 2026) | 8.5.1 on 6 Nov 2026 (8.5.0 feature release, Aug 2026) | 0.29.2 on 18 Nov 2026 (0.29.0 Pydantic validation, 9 Nov 2026) |
| Supported Python | 3.10+ | 3.11+ (3.10 dropped in 0.29.2) |
| Runtime Dependencies | None (colorama dropped in 8.5.0) | pydantic>=2.5.3, rich>=13.8.0, shellingham, annotated-doc (+ colorama on Windows) |
| How You Declare Options | Decorators: @click.option('--count', type=int, default=1) | Type hints: count: Annotated[int, typer.Option()] = 1 |
| Parser Underneath | Click's own optparse-style parser | Vendored copy of Click 8.3.1 (typer._click) since 0.26.0 |
| Type Conversion & Validation | ParamType classes (INT, FLOAT, Choice, DateTime, Path, File...) | Pydantic since 0.29.0 |
| Datetime Parsing (default) | Three formats: %Y-%m-%d, %Y-%m-%dT%H:%M:%S, %Y-%m-%d %H:%M:%S | Pydantic rules: ISO strings, timezone offsets, Unix timestamps |
| Custom Parameter Types | Subclass ParamType; generic ParamType[int, str] typing since 8.5.0 | click_type removed in 0.29.0; Pydantic-based custom types announced as planned |
| Help & Error Output | Plain text help and 'Error: Invalid value...' lines | Rich panels with coloured help and boxed errors |
| Shell Completion | bash, zsh, fish, PowerShell (8.5.0+) via _PROG_COMPLETE | bash, zsh, fish, PowerShell via --install-completion |
| Testing Helper | click.testing.CliRunner | typer.testing.CliRunner |
| Static Typing of Command Functions | Only if you annotate parameters yourself; decorators hold the CLI types | Typed by design: the signature is the CLI |
| Plugin / Extension Ecosystem | Large: custom groups and types, many Click-based tools | Typer-specific; Click plugins unsupported since 0.26.0 |
| API Stability (2026) | 8.x line with deprecations announced for 9.0 | 0.x; several breaking releases in 2026 |
| Our Run: 2-command CLI startup | 49-52 ms (bare Python 17 ms) | 153-159 ms |
| Our Run: 50-command CLI startup | 54-59 ms | 174-183 ms |
| Our Run: install footprint | 1 package, 516 KB | 12 packages, 16 MB |
| Our Run: peak memory, one command | ~16 MB | ~27-30 MB |
| Our Run: --since 1700000000 | Rejected: does not match the formats, exit 2 | Accepted: 2023-11-14T22:13:20+00:00 |
Click
Click is the Pallets project's toolkit for building command-line interfaces, originally written for Flask. You turn functions into commands with decorators such as @click.command, @click.option and @click.argument, group them into nested command trees, and get help pages, environment-variable defaults, prompts, file handling, a pager, progress bars and shell completion. It implements its own optparse-style parser rather than argparse, which its docs say is needed for safe nested subcommand dispatch. Click 8.5.1 was released on 6 November 2026, requires Python 3.10 or newer, is BSD-3-Clause licensed, has no runtime dependencies (8.5.0 dropped colorama) and has about 17.8k GitHub stars.
Pros
- Fast to start: our two-command CLI ran in 49-52 ms and a 50-command CLI in 54-59 ms, about 30-35 ms above a bare Python start
- One package, no dependencies, 516 KB installed, which matters for tools vendored into other projects or installed on servers
- Mature extension points: custom ParamType classes, lazily composable command groups and third-party Click-based plugins
- PowerShell completion joined bash, zsh and fish in 8.5.0; we generated bash and PowerShell scripts with one environment variable
- Plain, stable error text ('is not a valid integer', exit code 2) that is easy to assert in tests and scripts
- Active Pallets maintenance with frequent fix releases: 8.4.0 to 8.5.1 shipped between May and November 2026
Cons
- Option names, types and defaults live in decorators, separately from the function parameters, so the same name is written twice
- Command functions are untyped from the editor's point of view unless you annotate the parameters yourself
- The default DateTime type only accepts three fixed formats: a Unix timestamp and an ISO string with +05:30 were both rejected in our run
- Help output is plain text with no colour panels unless you add a third-party formatter
- 8.5.0 deprecated CliRunner.isolated_filesystem and get_binary_stream/get_text_stream ahead of Click 9.0, so older test suites will start warning
Best For
CLIs that run often or ship inside libraries and system tools, projects that need custom parameter types, custom command groups or existing Click plugins, and environments where one dependency-free package matters.
Typer
Typer builds command-line apps from ordinary Python functions with type hints, in the same style as FastAPI, which shares its author. A parameter such as count: int = 1 becomes a --count option, an Enum becomes a choice, and help text, completion and coloured error panels come for free. Typer 0.26.0 (26 May 2026) stopped depending on Click and now vendors Click's source (version 8.3.1, per its docs); 0.29.0 (9 November 2026) moved parameter validation to Pydantic and removed click_type. Typer 0.29.2 was released on 18 November 2026, requires Python 3.11 or newer, is MIT-licensed, depends on pydantic, rich, shellingham and annotated-doc, and has about 20.4k GitHub stars.
Pros
- Less code duplication: the function signature is the CLI, so names, types and defaults are written once
- Editors and type checkers see real types on command parameters without any extra annotations
- Pydantic-based parsing since 0.29.0: our datetime option accepted a Unix timestamp and a +05:30 offset that Click rejected
- Coloured Rich help panels and boxed error messages out of the box, with required options marked
- Vendored Click removes version conflicts: Typer 0.29.2, Click 8.5.1 and Black 26.10.1 installed side by side in our test
- --install-completion and --show-completion options appear automatically, with shellingham detecting the shell
Cons
- Slower start: about 155 ms for our two-command CLI and 175-183 ms for the 50-command one, roughly three times Click
- Heavier install: 12 packages and 16 MB, mostly pydantic-core, pygments, pydantic and rich
- Still 0.x with breaking changes in 2026: vendoring in 0.26.0, click_type removed and stricter defaults in 0.29.0, Python 3.10 dropped in 0.29.2
- Click plugins and Click-specific types no longer work; passing click_type now raises TypeError
- Some docs lag the code: the Alternatives page still says Typer does not use Pydantic
Best For
Internal tools, project task runners, data and ML scripts, and FastAPI-adjacent codebases where typed function signatures and readable error output matter more than 100 ms of startup.
Same job, different source of truth
Both libraries turn Python functions into commands with subcommands, help pages, defaults, required options and exit codes. The difference is where the CLI is described. In Click it lives in decorators: @click.option('--count', type=int, default=1, show_default=True, help=...) sits on top of def greet(name, count, shout), so the name count, its type and its default are declared in the decorator and the parameter list separately. In Typer the parameter list is the description: count: Annotated[int, typer.Option(help=...)] = 1 produces the same --count option, and an Enum produces a choice. Our test CLI, a greet command with an argument and two options and a report command with a required datetime, a choice and a float, took 29 lines in Click and 35 in Typer, because Typer needed an Enum class for the choice; for wider commands with many options Typer saves lines, since nothing is repeated. Typer's docs describe Click's approach as requiring code repetition and synchronisation between the decorator and the parameter, which is accurate. Click's docs, for their part, explain why Click uses its own parser instead of argparse: argparse guesses whether a token is an option or an argument and cannot disable interspersed arguments, both of which break nested subcommand dispatch. That parser is now inside both libraries, because Typer ships a copy of it.
Typer in 2026: vendored Click and Pydantic validation
Typer changed more this year than in the previous five. Version 0.26.0 (26 May 2026) removed Click as a dependency and vendored its source; the Typer docs name Click 8.3.1 as the vendored version, and we found it at typer/_click in the installed package. The stated reasons are fewer dependency conflicts between projects that use Click and projects that use Typer, and freedom for both teams to change code independently. We confirmed the benefit: Typer 0.29.2, Click 8.5.1 and Black 26.10.1 installed together without a resolver conflict, and our Typer CLI ran beside them. The cost is that Click-specific functionality is gone. You can no longer extract the Click app from a Typer app, add Click plugins, or pass Click types: typer.Option('a', click_type=...) raised TypeError: unexpected keyword argument in our run. A Typer-only environment also no longer contains click at all, so a script that did import click next to import typer failed with ModuleNotFoundError until we installed Click separately. Version 0.29.0 (9 November 2026) moved parameter validation to Pydantic, made pydantic>=2.5.3 a required dependency, validated some defaults more strictly (a (None, None, None) tuple default now fails) and changed some error and help text. Version 0.29.2 then dropped Python 3.10. Each step is documented, but a pinned upgrade path matters if you maintain a Typer app.
What we measured: startup, size and memory
On 25 November 2026 we ran both CLIs in the cloud sandbox on Python 3.13.18 with 2 vCPUs, each in its own virtual environment, timing 30 runs after 3 warm-ups and reporting medians across two rounds. A bare python -c pass took 17 ms. The Click CLI's greet command took 49-52 ms and its --help 51-52 ms. The Typer CLI took 157-159 ms for greet and 153-157 ms for --help. Scaling to a generated CLI with 50 commands of five options each barely moved Click (54-59 ms) and moved Typer to 174-183 ms, so the gap is mostly a fixed import cost, not per-command overhead. python -X importtime put import click at 23 ms and import typer at 41-51 ms, and running a Typer command pulled in pydantic through typer._adapters for a cumulative 65 ms; the Typer process had 248 modules loaded after one command against 106 for Click. Peak RSS was about 16 MB for Click and 27-30 MB for Typer. Installed size was 516 KB for Click (one package) and 16 MB for Typer (12 packages: pydantic-core 5.3 MB, pygments 5.3 MB, pydantic 3.1 MB, rich 2.4 MB, typer 1.1 MB and smaller ones). For a command you type a few times a day, 100 ms is invisible. For a CLI called in a loop, from shell prompts, git hooks or completion scripts, it adds up, and it is the main reason to prefer Click.
Validation, errors, completion and testing
Both libraries returned exit code 2 for every bad input we tried, so scripts that check exit codes behave the same. The text differs. For --count abc, Click printed Error: Invalid value for '--count': 'abc' is not a valid integer. Typer printed the Pydantic message, Input should be a valid integer, unable to parse string as an integer, inside a Rich box. --count 3.5 was rejected by both. The real behaviour gap is datetimes. Click's DateTime type accepts exactly three formats, so --since 1700000000 and --since 2026-11-25T10:00:00+05:30 both failed. Typer 0.29.2, following Pydantic, turned the first into 2023-11-14T22:13:20+00:00 and kept the offset on the second, while a plain 2026-11-25 stayed a naive datetime in both. That flexibility is useful, but it means one Typer option can now yield both naive and timezone-aware values, which raise TypeError when compared, so normalise them in your code. Choice errors were equivalent. Typer 0.29.2's help showed two cosmetic quirks: the argument appeared as {name} in the usage line and --help was annotated <bool>. For completion, Click 8.5.1 emitted bash and PowerShell scripts from _CLI_CLICK_PY_COMPLETE=bash_source and powershell_source; Typer added --install-completion and --show-completion and printed a bash script. Both CliRunner classes invoked the commands in-process with identical output and exit codes.
Limits, migration and when not to use each
Do not choose Typer for a CLI that is executed hundreds of times in scripts, for a tool that must install into minimal containers, or for a library that would force Pydantic and Rich onto its users; Click is roughly three times faster to start and 30 times smaller to install in our measurements. Do not choose Typer if you depend on Click plugins, custom ParamType classes or direct access to the Click command object: since 0.26.0 those are unsupported, and Typer's docs say Pydantic-based custom types are planned rather than shipped. Do not choose Click for a team that writes many small internal commands and wants typed signatures with no duplication; Typer is less code and fewer mistakes there. Migration from Click to Typer is mostly mechanical for simple commands (decorators become annotated parameters, Choice becomes an Enum), but anything that touched Click internals has to be rewritten or left on Click. Upgrading an existing Typer app across 2026 releases means removing click_type, checking tuple and datetime defaults, updating callbacks that used Click parameter attributes, adding click as an explicit dependency if your code imports it, and moving to Python 3.11. Click users should replace CliRunner.isolated_filesystem with pytest's tmp_path before Click 9.0. Cyclopts (5.5.3, Apache-2.0) is a third type-hint option, and argparse in the standard library still needs no install at all.
Verdict
Pick Typer for internal tools, project scripts and FastAPI-style codebases. You write each option once as a typed parameter, your editor and type checker understand it, and users get coloured help and readable errors; since 0.29.0 it also parses datetimes and numbers with Pydantic's rules. Pin it to a minor version (for example typer~=0.29.2), because it is still 0.x and 2026 brought three breaking releases. Pick Click for CLIs that start often or ship to other people: in our run it started in about 50 ms against about 155 ms for Typer, installed as one 516 KB package against 12 packages and 16 MB, and used about half the memory. Click is also the only choice if you rely on Click plugins, custom ParamType classes or custom Group subclasses, because Typer no longer exposes the Click app underneath. If you already have a working Click CLI, there is no reason to rewrite it; if you have a Typer app that passed click_type or imported click directly, budget a migration before upgrading past 0.26.