saturnin._scripts.cli¶
Saturnin CLI manager.
—
When invoked without additional parameters, it’s activated in console mode. This mode runs REPL that provides advanced functionality like command and parameter completion, interactive help and persistent command history. The command set available in this mode may differ from command set available in direct mode (see below).
When saturnin is invoked with additional parameters, it executes specified command and exists. Some commands (typically those required to run only once or not very often like initialize or create home) are available only in this direct mode.
Globals¶
- saturnin._scripts.cli.REPL_INTRO¶
REPL introductory markdown text
- saturnin._scripts.cli.REPL_HELP¶
REPL help text
Functions¶
- saturnin._scripts.cli.find_group(in_app: Typer, name: str) Typer [source]¶
Returns sub-command group in command group.
- Parameters:
in_app (Typer) – Typer instance to be searched.
name (str) – Command name.
- Return type:
Typer
Returns: Typer instance for command.
- saturnin._scripts.cli.add_command(app: Typer, name: str, cmd: Callable, *, help: str | None = None, panel: str | None = None) None [source]¶
Add command into main Typer application.
- Parameters:
app (Typer) – Typer instance under which the command should be placed.
name (str) – Command name. Can use dot notation to create a sub-command.
cmd (Callable) – Callable to be registered as Typer command.
help (str | None) – Optional help for command.
pabel – Rich panel where command should be listed in help.
panel (str | None) –
- Return type:
None