Coverage for /home/runner/work/bijux-cli/bijux-cli/src/bijux_cli/commands/dev/__init__.py: 100%
11 statements
« prev ^ index » next coverage.py v7.10.4, created at 2025-08-19 23:36 +0000
« 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
4"""Defines the `dev` command group for the Bijux CLI.
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.
10The `dev` command, when run without a subcommand, provides a simple status
11confirmation.
13The available subcommands are:
14 * `di`: Displays the dependency injection (DI) container graph.
15 * `list-plugins`: Lists all installed CLI plugins.
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"""
24from __future__ import annotations
26import typer
28from bijux_cli.commands.dev.di import dev_di_graph
29from bijux_cli.commands.dev.list_plugins import dev_list_plugins
30from bijux_cli.commands.dev.service import dev
32typer.core.rich = None # type: ignore[attr-defined,assignment]
34dev_app = typer.Typer( # pytype: skip-file
35 name="dev",
36 help="Developer tools and diagnostics.",
37 rich_markup_mode=None,
38 context_settings={"help_option_names": ["-h", "--help"]},
39 no_args_is_help=False,
40)
42dev_app.callback(invoke_without_command=True)(dev)
43dev_app.command("di")(dev_di_graph)
44dev_app.command("list-plugins")(dev_list_plugins)
46__all__ = ["dev_app"]