{"id":5593,"library":"click-plugins","title":"click-plugins","description":"click-plugins is an extension module for the Click library, designed to enable registering CLI commands via setuptools entry-points. The project's official PyPI package is currently marked as inactive, with version 1.1.1.2 being the final release. While a 2.0 release exists on GitHub, it restructured the project to support vendoring and no longer directly supports building a `pip` package, effectively making the PyPI offering abandoned.","status":"abandoned","version":"1.1.1.2","language":"en","source_language":"en","source_url":"https://github.com/click-contrib/click-plugins","tags":["click","cli","plugins","entry-points","command-line"],"install":[{"cmd":"pip install click-plugins","lang":"bash","label":"Install the last PyPI release"}],"dependencies":[{"reason":"Core dependency for CLI application building, which this library extends.","package":"click"}],"imports":[{"note":"This decorator is the primary mechanism for adding plugin support to a Click group.","symbol":"with_plugins","correct":"from click_plugins import with_plugins"}],"quickstart":{"code":"import click\nfrom click_plugins import with_plugins\nimport os\n\n# Example of a 'plugin' that would be discovered via entry points\n# In your setup.py/pyproject.toml, you'd define:\n# [options.entry_points]\n# click_commands = click_plugins_example.plugins:hello_plugin\n\n@click.group()\ndef plugins():\n    \"A group for plugin commands.\"\n    pass\n\n@plugins.command()\ndef hello_plugin():\n    click.echo(\"Hello from a plugin!\")\n\n@with_plugins(ep_group='click_commands')\n@click.group()\ndef cli():\n    \"A CLI with plugin support.\"\n    pass\n\n# To make the quickstart runnable without a full setup.py, \n# we'll simulate the entry point discovery by directly adding it.\n# In a real scenario, this wouldn't be necessary.\ncli.add_command(plugins)\n\nif __name__ == '__main__':\n    # In a real environment, you'd run `cli()` directly.\n    # For this quickstart, we're demonstrating the integration.\n    # For testing, ensure 'plugins' command is added.\n    cli()\n","lang":"python","description":"This quickstart demonstrates how to use `with_plugins` to enable a Click group to discover commands via setuptools entry-points. The `ep_group` parameter specifies the entry-point group to look for. For this example to be fully functional, you would typically define entry points in your `setup.py` or `pyproject.toml` under a section like `[options.entry_points]`, e.g., `click_commands = my_package.my_plugins:my_command_function`."},"warnings":[{"fix":"Consider migrating to alternatives or vendoring the necessary code. If you must use `click-plugins`, pin your dependency to `click-plugins==1.1.1.2`.","message":"The PyPI package `click-plugins` is no longer actively maintained. Version 1.1.1.2 is the final release available via `pip install`.","severity":"breaking","affected_versions":"1.1.1.2 and later (on PyPI)"},{"fix":"Do not attempt to install version 2.0 via `pip` or expect it to be a drop-in replacement for earlier PyPI versions. It's intended for direct inclusion in other projects.","message":"GitHub release 2.0 is *not* a continuation of the PyPI package. It restructured the project for vendoring and explicitly states it 'no longer directly supports building a `pip` package'.","severity":"breaking","affected_versions":"2.0"},{"fix":"Avoid using version 1.1; use 1.1.1 or 1.1.1.2 instead.","message":"Version 1.1 contained a mismatch between its stated version and `click_plugins.__version__`. It was superseded by 1.1.1.","severity":"gotcha","affected_versions":"1.1"},{"fix":"Carefully review your `pyproject.toml` (or `setup.py`) to ensure the `[options.entry_points]` section correctly defines your plugin groups (e.g., `click_commands = ...`) and points to the correct functions.","message":"The primary mechanism for discovering commands relies on setuptools entry points. Misconfiguration of `setup.py` or `pyproject.toml` can lead to commands not being discovered.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-03-28T00:00:00.000Z","next_check":"2026-06-26T00:00:00.000Z"}