Coverage for / home / runner / work / bijux-cli / bijux-cli / src / bijux_cli / cli / plugins / commands / __init__.py: 100%
18 statements
« prev ^ index » next coverage.py v7.13.2, created at 2026-01-26 17:59 +0000
« prev ^ index » next coverage.py v7.13.2, created at 2026-01-26 17:59 +0000
1# SPDX-License-Identifier: Apache-2.0
2# Copyright © 2025 Bijan Mousavi
4"""Defines the `plugins` command group for the Bijux CLI.
6This module serves as the central entry point for all plugin management
7functionality. It aggregates the various subcommands into a single `Typer`
8application, creating the `bijux plugins` command hierarchy.
10This command group does not have a default action and requires a subcommand
11to be specified.
13The available subcommands are:
14 * `scaffold`: Creates a new plugin project from a `cookiecutter` template.
15 * `install`: Installs a plugin from a local source directory.
16 * `uninstall`: Removes an installed plugin.
17 * `list`: Lists all installed plugins.
18 * `info`: Displays detailed metadata for a specific plugin.
19 * `check`: Runs a health check on an installed plugin.
21Exit codes for the subcommands generally follow this pattern:
22 * `0`: Success.
23 * `1`: An internal error or command failure occurred.
24 * `2`: An invalid argument or format was provided.
25 * `3`: An ASCII or encoding error was detected.
26"""
28from __future__ import annotations
30import typer
32from bijux_cli.cli.plugins.commands.check import check_plugin
33from bijux_cli.cli.plugins.commands.info import info_plugin
34from bijux_cli.cli.plugins.commands.install import install_plugin
35from bijux_cli.cli.plugins.commands.list import list_plugin
36from bijux_cli.cli.plugins.commands.scaffold import scaffold_plugin
37from bijux_cli.cli.plugins.commands.uninstall import uninstall_plugin
38from bijux_cli.core.runtime import AsyncTyper
40typer.core.rich = None # type: ignore[attr-defined]
42plugins_app = AsyncTyper(
43 name="plugins",
44 help="Manage Bijux CLI plugins",
45 rich_markup_mode=None,
46 context_settings={"help_option_names": ["-h", "--help"]},
47 no_args_is_help=False,
48)
50plugins_app.command("scaffold")(scaffold_plugin)
51plugins_app.command("install")(install_plugin)
52plugins_app.command("uninstall")(uninstall_plugin)
53plugins_app.command("list")(list_plugin)
54plugins_app.command("info")(info_plugin)
55plugins_app.command("check")(check_plugin)
58__all__ = [
59 "plugins_app",
60]