Utils Command API Reference¶
This section documents the internals of the utils
command in Bijux CLI.
bijux_cli.commands.memory.utils ¶
Provides shared utilities for the bijux memory
command group.
This module centralizes common logic used by the memory-related subcommands. Its primary responsibility is to provide a consistent way to resolve the MemoryProtocol
service from the Dependency Injection (DI) container, including standardized error handling for cases where the service is unavailable.
resolve_memory_service ¶
resolve_memory_service(
command: str,
fmt_lower: str,
quiet: bool,
include_runtime: bool,
debug: bool,
) -> MemoryProtocol
Resolves the MemoryProtocol implementation from the DI container.
Parameters:
-
command
(str
) –The full command name (e.g., "memory list").
-
fmt_lower
(str
) –The chosen output format, lowercased.
-
quiet
(bool
) –If True, suppresses non-error output.
-
include_runtime
(bool
) –If True, includes runtime metadata in errors.
-
debug
(bool
) –If True, enables debug diagnostics.
Returns:
-
MemoryProtocol
(MemoryProtocol
) –An instance of the memory service.
Raises:
-
SystemExit
–Exits with a structured error if the service cannot be resolved from the container.