feat: llama stack list-deps

`llama stack show` prints all required pip dependencies for a distro.
use --format to get different types of output (json, plain, deps-only). Users can pipe this output to the installation method of their choice: uv, pip install, etc

Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
Charlie Doern 2025-07-30 18:55:22 -04:00
parent 05a62a6ffb
commit cb6aeeff8f
7 changed files with 350 additions and 6 deletions

View file

@ -8,6 +8,9 @@ import textwrap
from llama_stack.cli.stack.utils import ImageType
from llama_stack.cli.subcommand import Subcommand
from llama_stack.log import get_logger
logger = get_logger(__name__, category="cli")
class StackBuild(Subcommand):
@ -16,7 +19,7 @@ class StackBuild(Subcommand):
self.parser = subparsers.add_parser(
"build",
prog="llama stack build",
description="Build a Llama stack container",
description="[DEPRECATED] Build a Llama stack container. This command is deprecated and will be removed in a future release. Use `llama stack list-deps <distro>' instead.",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
self._add_arguments()
@ -93,6 +96,9 @@ the build. If not specified, currently active environment will be used if found.
)
def _run_stack_build_command(self, args: argparse.Namespace) -> None:
logger.warning(
"The 'llama stack build' command is deprecated and will be removed in a future release. Please use 'llama stack list-deps'"
)
# always keep implementation completely silo-ed away from CLI so CLI
# can be fast to load and reduces dependencies
from ._build import run_stack_build_command