mtrx-cli 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/matrx/__init__.py +1 -1
- package/src/matrx/cli/main.py +6 -0
package/package.json
CHANGED
package/src/matrx/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.3"
|
package/src/matrx/cli/main.py
CHANGED
|
@@ -12,6 +12,7 @@ import webbrowser
|
|
|
12
12
|
|
|
13
13
|
import httpx
|
|
14
14
|
|
|
15
|
+
from matrx import __version__
|
|
15
16
|
from matrx.cli.launcher import (
|
|
16
17
|
prepare_routed_setup,
|
|
17
18
|
build_launch_plan,
|
|
@@ -43,6 +44,9 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
43
44
|
parser = _build_parser()
|
|
44
45
|
args, remainder = parser.parse_known_args(argv)
|
|
45
46
|
|
|
47
|
+
if getattr(args, "version", False) or args.command == "version":
|
|
48
|
+
print(f"mtrx {__version__}")
|
|
49
|
+
return 0
|
|
46
50
|
if args.command == "help":
|
|
47
51
|
parser.print_help()
|
|
48
52
|
return 0
|
|
@@ -65,6 +69,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
65
69
|
|
|
66
70
|
def _build_parser() -> argparse.ArgumentParser:
|
|
67
71
|
parser = argparse.ArgumentParser(prog="mtrx")
|
|
72
|
+
parser.add_argument("-V", "--version", action="store_true")
|
|
68
73
|
subparsers = parser.add_subparsers(dest="command")
|
|
69
74
|
|
|
70
75
|
login = subparsers.add_parser("login")
|
|
@@ -80,6 +85,7 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
80
85
|
use.add_argument("route", choices=["direct", "matrx"])
|
|
81
86
|
|
|
82
87
|
subparsers.add_parser("help")
|
|
88
|
+
subparsers.add_parser("version")
|
|
83
89
|
subparsers.add_parser("status")
|
|
84
90
|
subparsers.add_parser("doctor")
|
|
85
91
|
|