arga-cli 0.1.3__tar.gz → 0.1.4__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arga-cli
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Command-line interface for Arga authentication, MCP installation, and browser validation
5
5
  Author: Arga Labs
6
6
  Project-URL: Homepage, https://github.com/ArgaLabs/arga-cli
@@ -10,6 +10,7 @@ import tempfile
10
10
  import time
11
11
  import webbrowser
12
12
  from datetime import datetime
13
+ from importlib.metadata import PackageNotFoundError, version
13
14
  from pathlib import Path
14
15
  from typing import Any
15
16
  from urllib.parse import urlencode
@@ -27,6 +28,13 @@ POLL_TIMEOUT_SECONDS = 600.0
27
28
  SKIP_TRAILER = "[skip arga]"
28
29
 
29
30
 
31
+ def _cli_version() -> str:
32
+ try:
33
+ return version("arga-cli")
34
+ except PackageNotFoundError:
35
+ return "unknown"
36
+
37
+
30
38
  class CliError(Exception):
31
39
  """Base CLI error."""
32
40
 
@@ -1240,6 +1248,11 @@ def run_wizard(args: argparse.Namespace) -> int:
1240
1248
 
1241
1249
  def build_parser() -> argparse.ArgumentParser:
1242
1250
  parser = argparse.ArgumentParser(prog="arga")
1251
+ parser.add_argument(
1252
+ "--version",
1253
+ action="version",
1254
+ version=f"%(prog)s {_cli_version()}",
1255
+ )
1243
1256
  subparsers = parser.add_subparsers(dest="command", required=True)
1244
1257
 
1245
1258
  login_parser = subparsers.add_parser("login", help="Authenticate the CLI")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arga-cli
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Command-line interface for Arga authentication, MCP installation, and browser validation
5
5
  Author: Arga Labs
6
6
  Project-URL: Homepage, https://github.com/ArgaLabs/arga-cli
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "arga-cli"
7
- version = "0.1.3"
7
+ version = "0.1.4"
8
8
  description = "Command-line interface for Arga authentication, MCP installation, and browser validation"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -127,3 +127,17 @@ def test_main_dispatches_validate_wrapper_before_argparse(monkeypatch) -> None:
127
127
  raise AssertionError("Expected main() to exit")
128
128
 
129
129
  assert captured["argv"] == ["config", "arga-labs/validation-server"]
130
+
131
+
132
+ def test_main_supports_global_version_flag(monkeypatch, capsys) -> None:
133
+ monkeypatch.setattr(main, "_cli_version", lambda: "0.1.3")
134
+ monkeypatch.setattr(sys, "argv", ["arga", "--version"])
135
+
136
+ try:
137
+ main.main()
138
+ except SystemExit as exc:
139
+ assert exc.code == 0
140
+ else:
141
+ raise AssertionError("Expected main() to exit")
142
+
143
+ assert capsys.readouterr().out.strip() == "arga 0.1.3"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes