Coverage for /home/runner/work/bijux-cli/bijux-cli/src/bijux_cli/commands/plugins/__init__.py: 100%

17 statements  

« prev     ^ index     » next       coverage.py v7.10.4, created at 2025-08-19 23:36 +0000

1# SPDX-License-Identifier: MIT 

2# Copyright © 2025 Bijan Mousavi 

3 

4"""Defines the `plugins` command group for the Bijux CLI. 

5 

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. 

9 

10This command group does not have a default action and requires a subcommand 

11to be specified. 

12 

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. 

20 

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""" 

27 

28from __future__ import annotations 

29 

30import typer 

31 

32from bijux_cli.commands.plugins.check import check_plugin 

33from bijux_cli.commands.plugins.info import info_plugin 

34from bijux_cli.commands.plugins.install import install_plugin 

35from bijux_cli.commands.plugins.list import list_plugin 

36from bijux_cli.commands.plugins.scaffold import scaffold_plugin 

37from bijux_cli.commands.plugins.uninstall import uninstall_plugin 

38 

39typer.core.rich = None # type: ignore[attr-defined,assignment] 

40 

41plugins_app = typer.Typer( # pytype: skip-file 

42 name="plugins", 

43 help="Manage Bijux CLI plugins", 

44 rich_markup_mode=None, 

45 context_settings={"help_option_names": ["-h", "--help"]}, 

46 no_args_is_help=False, 

47) 

48 

49plugins_app.command("scaffold")(scaffold_plugin) 

50plugins_app.command("install")(install_plugin) 

51plugins_app.command("uninstall")(uninstall_plugin) 

52plugins_app.command("list")(list_plugin) 

53plugins_app.command("info")(info_plugin) 

54plugins_app.command("check")(check_plugin) 

55 

56 

57__all__ = [ 

58 "plugins_app", 

59]