{"id":23206,"library":"aiocmd","title":"aiocmd","description":"Coroutine-based CLI generator using prompt_toolkit. Version 0.1.5 (latest) with no new releases since 2020; project appears unmaintained.","status":"active","version":"0.1.5","language":"python","source_language":"en","source_url":"https://github.com/KimiNewt/aiocmd","tags":["cli","coroutine","prompt_toolkit","async"],"install":[{"cmd":"pip install aiocmd","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for CLI interface","package":"prompt_toolkit","optional":false}],"imports":[{"note":"Standard usage","wrong":null,"symbol":"CliCmd","correct":"from aiocmd import CliCmd"},{"note":"Entry point to run CLI","wrong":null,"symbol":"run_cmd","correct":"from aiocmd import run_cmd"}],"quickstart":{"code":"import asyncio\nfrom aiocmd import CliCmd, run_cmd\n\nclass MyCli(CliCmd):\n    async def cmd_hello(self):\n        \"\"\"Say hello\"\"\"\n        print(\"Hello, world!\")\n\nif __name__ == '__main__':\n    asyncio.run(run_cmd(MyCli()))","lang":"python","description":"Define a class inheriting from CliCmd with async methods prefixed with 'cmd_' and run with run_cmd."},"warnings":[{"fix":"Ensure all command methods are defined as 'async def cmd_<command>(self, ...):'","message":"Methods must be async and prefixed with 'cmd_'. Forgetting 'async' or wrong prefix causes method to be ignored silently.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'run_cmd(MyCli())' not 'run_cmd(MyCli)'","message":"run_cmd expects an instance of CliCmd, not the class itself. Passing the class will result in AttributeError.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add an async method with name starting with 'cmd_', e.g., 'async def cmd_help(self):'","cause":"run_cmd expects methods with 'cmd_' prefix; method missing or incorrectly named.","error":"AttributeError: 'MyCli' object has no attribute 'cmd_help'"},{"fix":"Call 'run_cmd(cli_instance)' where cli_instance is an instance of a CliCmd subclass.","cause":"run_cmd called without arguments or with wrong number of arguments.","error":"TypeError: run_cmd() missing 1 required positional argument: 'cli_cmd'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}