Elffuss BraidHub

kikocis/llama-stack public

566afbf5da2b · 1.0 KiBRawPermalink
1# Copyright (c) Meta Platforms, Inc. and affiliates.
2# All rights reserved.
3#
4# This source code is licensed under the terms described in the LICENSE file in
5# the root directory of this source tree.
6
7import argparse
8
9from llama_stack.cli.subcommand import Subcommand
10
11from .build import StackBuild
12from .configure import StackConfigure
13from .list_apis import StackListApis
14from .list_providers import StackListProviders
15from .run import StackRun
16
17
18class StackParser(Subcommand):
19 def __init__(self, subparsers: argparse._SubParsersAction):
20 super().__init__()
21 self.parser = subparsers.add_parser(
22 "stack",
23 prog="llama stack",
24 description="Operations for the Llama Stack / Distributions",
25 )
26
27 subparsers = self.parser.add_subparsers(title="stack_subcommands")
28
29 # Add sub-commands
30 StackBuild.create(subparsers)
31 StackConfigure.create(subparsers)
32 StackListApis.create(subparsers)
33 StackListProviders.create(subparsers)
34 StackRun.create(subparsers)