asyncclick
Composable command line interface toolkit, async fork
What it is and what it does
Asyncclick is a fork of Click that brings async/await support to command-line interface building. Where Click requires synchronous command handlers, asyncclick lets you write async command and subcommand handlers that work seamlessly with asyncio or trio. You can mix sync and async handlers in the same program, and most of the Click API translates directly—the main difference is that several methods like BaseCommand.main and Context.invoke are now asynchronous.
The package inherits Click's core strengths: arbitrary nesting of commands, automatic help generation, and lazy subcommand loading. It depends only on colorama for terminal color support. Most existing Click code can be adapted by changing imports from click to asyncclick, though you'll need to await certain operations and may need to use anyio.run() to invoke commands from an async context.
Use it for:
- Build CLI tools that need to perform async I/O (network calls, database queries) without blocking the event loop.
- Create command-line applications that integrate with asyncio or trio-based libraries and frameworks.
- Migrate existing Click-based CLIs to async when performance or concurrency requirements change.
- Develop multi-command CLI applications where some handlers are async and others remain synchronous.
- Write interactive CLI tools that use async prompts and need to remain responsive during user input.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Asyncclick provides a fork of Click that enables async command and subcommand handlers compatible with asyncio or trio, letting you build command-line interfaces with async/await syntax.
Yes, if you need async command-line interfaces. Asyncclick is actively maintained, production-stable, has no known vulnerabilities, and requires only one lightweight dependency. The main constraint is Python 3.11+. It's a straightforward choice for CLI projects that depend on async I/O or integrate with async frameworks.
Install
asyncclick on PyPI
pip
pip install asyncclickuv
uv add asyncclickpoetry
poetry add asyncclickInstalling asyncclick
Before you install
Low install friction with a single runtime dependency (colorama). The package is actively maintained with a recent release 45 days ago and marked Production/Stable, though it requires Python 3.11 or later.
License in practice
BSD-3-Clause is permissive and imposes no significant restrictions on use or redistribution in most contexts.
Quickstart
pip install asyncclick
import asyncclick as click
@click.command()
@click.option("--name", prompt="Your name")
async def hello(name):
click.echo(f"Hello, {name}!")
if __name__ == '__main__':
hello()
Requires Python 3.11 or later
Verify before relying
- Whether the asyncclick.prompt blocking parameter bug mentioned in the description has been fixed in version 8.4.2.1
- Compatibility scope with existing Click codebases beyond the documented import-swap requirement
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — colorama |
| Maintenance | actively maintained — 45 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,373,428/month — #3,990 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: asyncclick-8.4.2.1-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
clickClick is a Python toolkit for building…
permissive · top 100 on PyPI
opentelemetry-instrumentation-asyncclickAdds OpenTelemetry tracing to asyncclick CLI…
permissive · top 15,000 on PyPI
click-composeProvides composable callback utilities for…
permissive · top 15,000 on PyPI
auto-click-autoAutomatically enables tab shell completion for…
permissive · top 15,000 on PyPI
rich-clickRenders Click command-line interfaces with rich…
permissive · top 1,000 on PyPI
click-default-groupExtends Click's Group class to invoke a default…
permissive · top 5,000 on PyPI
click-configfileExtends click with configuration file support,…
permissive · top 15,000 on PyPI
click-config-fileAdds configuration file support to Click…
permissive · top 15,000 on PyPI
click-help-colorsAdds color customization to Click command-line…
permissive · top 5,000 on PyPI
click-datetimeAdds datetime type support to Click, allowing…
permissive · top 15,000 on PyPI