--- id: asyncclick version: "8.4.2.1" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # asyncclick — Composable command line interface toolkit, async fork License: permissive · Maintenance: active · Downloads: 1.4M/mo ## 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 above — 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 pip install asyncclick uv add asyncclick poetry add asyncclick ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags async cli framework, asyncio command line interface, trio cli builder, async click fork, async command handler, composable async cli, async subcommand framework, async-cli, click-fork, asyncio-trio [View on SkillFed](https://skillfed.io/packages/asyncclick) · [View on PyPI](https://pypi.org/project/asyncclick/)