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

12 statements  

« 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 

3 

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

5 

6This module serves as the central entry point for all developer-focused tools 

7and diagnostics. It aggregates the various subcommands into a single `Typer` 

8application, creating the `bijux dev` command hierarchy. 

9 

10The `dev` command, when run without a subcommand, provides a simple status 

11confirmation. 

12 

13The available subcommands are: 

14 * `di`: Displays the dependency injection (DI) container graph. 

15 * `list-plugins`: Lists all installed CLI plugins. 

16 

17Exit codes for the subcommands generally follow this pattern: 

18 * `0`: Success. 

19 * `1`: An internal or unexpected error occurred. 

20 * `2`: An invalid argument was provided (e.g., bad format). 

21 * `3`: An ASCII or encoding error was detected. 

22""" 

23 

24from __future__ import annotations 

25 

26import typer 

27 

28from bijux_cli.cli.commands.dev.di import dev_di_graph 

29from bijux_cli.cli.commands.dev.list_plugins import dev_list_plugins 

30from bijux_cli.cli.commands.dev.service import dev 

31from bijux_cli.core.runtime import AsyncTyper 

32 

33typer.core.rich = None # type: ignore[attr-defined] 

34 

35dev_app = AsyncTyper( 

36 name="dev", 

37 help="Developer tools and diagnostics.", 

38 rich_markup_mode=None, 

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

40 no_args_is_help=False, 

41) 

42 

43dev_app.callback(invoke_without_command=True)(dev) 

44dev_app.command("di")(dev_di_graph) 

45dev_app.command("list-plugins")(dev_list_plugins) 

46 

47__all__ = ["dev_app"]