{"id":21047,"library":"click-shell","title":"click-shell","description":"An extension to Click that turns your Click app into a shell utility with autocomplete and persistent context. Current version 2.1. Maintenance mode with no recent releases.","status":"maintenance","version":"2.1","language":"python","source_language":"en","source_url":"https://github.com/clarkperkins/click-shell","tags":["click","shell","cli","command-line","interactive"],"install":[{"cmd":"pip install click-shell","lang":"bash","label":"latest release"}],"dependencies":[{"reason":"Required dependency","package":"click","optional":false}],"imports":[{"note":"Direct import from click_shell is correct, not from submodule","wrong":"from click_shell.shell import Shell","symbol":"Shell","correct":"from click_shell import Shell"},{"note":"click-shell is a separate package, not part of click","wrong":"import click.shell","symbol":"click_shell","correct":"import click_shell"}],"quickstart":{"code":"import click\nfrom click_shell import Shell\n\n@click.group(cls=Shell, prompt='myapp> ', intro='Welcome to myapp shell')\ndef cli():\n    pass\n\n@cli.command()\ndef hello():\n    click.echo('Hello, world!')\n\nif __name__ == '__main__':\n    cli()","lang":"python","description":"Create a Click shell with custom prompt and intro message."},"warnings":[{"fix":"Pin Click to 7.x or use a fork like click-shell2.","message":"click-shell does not support Click 8+ fully; may cause import errors with newer Click versions.","severity":"gotcha","affected_versions":">=2.1, all versions"},{"fix":"Consider migrating to alternative like click-shell2 or prompt_toolkit-based solutions.","message":"Library is in maintenance mode; no active development since 2019.","severity":"deprecated","affected_versions":"all"},{"fix":"Always pass cls=Shell to @click.group.","message":"The Shell class requires a click.Group subclass; using a simple click.group() decorator will not work.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install click-shell' and use 'from click_shell import Shell'.","cause":"Incorrect import path or missing package installation.","error":"ImportError: cannot import name 'Shell' from 'click_shell'"},{"fix":"Use @click.group(cls=Shell) on a function, do not instantiate Shell directly.","cause":"Using @click.group() without cls=Shell, or calling Shell() directly instead of decorating a function.","error":"TypeError: 'Shell' object is not callable"},{"fix":"Set environment variable 'LC_ALL=C.UTF-8' or 'LANG=C.UTF-8'.","cause":"Python locale misconfiguration; common on minimal Docker images.","error":"RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}