Cli Module API Reference¶
This section documents the internals of the cli
module in Bijux CLI.
bijux_cli.cli ¶
Constructs the main Typer
application for the Bijux CLI.
This module serves as the primary builder for the entire CLI. It defines the root Typer
app, orchestrates the registration of all core commands and the discovery of dynamic plugins, and sets the default behavior for when the CLI is invoked without any command.
build_app ¶
Builds and configures the root Typer
application.
This factory function performs the main steps of assembling the CLI: 1. Creates the root Typer
app instance. 2. Registers all core, built-in commands. 3. Discovers and registers all dynamic plugins. 4. Sets the default callback to launch the REPL.
Returns:
-
Typer
–typer.Typer: The fully constructed
Typer
application.
Source code in src/bijux_cli/cli.py
maybe_default_to_repl ¶
Invokes the repl
command if no other subcommand is specified.
This function is used as the root callback for the main Typer
application. It checks if a subcommand was invoked and, if not, re-executes the CLI with the repl
command.
Parameters:
-
ctx
(Context
) –The Typer context, used to check for an invoked subcommand.
Returns:
-
None
(None
) –