mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-03 09:21:45 +00:00
add version to cli
This commit is contained in:
parent
7a90fc5854
commit
11332c39b1
1 changed files with 7 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
# the root directory of this source tree.
|
||||
|
||||
import argparse
|
||||
from importlib.metadata import version
|
||||
|
||||
from llama_stack.cli.subcommand import Subcommand
|
||||
|
||||
|
@ -24,6 +25,12 @@ class StackParser(Subcommand):
|
|||
description="Operations for the Llama Stack / Distributions",
|
||||
)
|
||||
|
||||
self.parser.add_argument(
|
||||
"--version",
|
||||
action="version",
|
||||
version=f"llama-stack {version('llama-stack')}",
|
||||
)
|
||||
|
||||
subparsers = self.parser.add_subparsers(title="stack_subcommands")
|
||||
|
||||
# Add sub-commands
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue