akashcli 3.6.0__tar.gz → 4.3.0__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.
Files changed (38) hide show
  1. {akashcli-3.6.0 → akashcli-4.3.0}/PKG-INFO +13 -7
  2. {akashcli-3.6.0 → akashcli-4.3.0}/akashcli/auth.py +15 -10
  3. akashcli-4.3.0/akashcli/cli.py +2118 -0
  4. akashcli-4.3.0/akashcli/client.py +92 -0
  5. akashcli-4.3.0/akashcli/env_manager.py +211 -0
  6. akashcli-4.3.0/akashcli/exec.py +1085 -0
  7. akashcli-4.3.0/akashcli/integrity.py +207 -0
  8. akashcli-4.3.0/akashcli/logger.py +104 -0
  9. {akashcli-3.6.0 → akashcli-4.3.0}/akashcli/models.py +1 -0
  10. akashcli-4.3.0/akashcli/p2p.py +366 -0
  11. akashcli-4.3.0/akashcli/packages.py +315 -0
  12. akashcli-4.3.0/akashcli/relay.py +537 -0
  13. akashcli-4.3.0/akashcli/restore.py +229 -0
  14. akashcli-4.3.0/akashcli/snapshot_crypto.py +262 -0
  15. akashcli-4.3.0/akashcli/storage.py +328 -0
  16. akashcli-4.3.0/akashcli/terminal.py +399 -0
  17. akashcli-4.3.0/akashcli/uploader.py +187 -0
  18. akashcli-4.3.0/akashcli/utils.py +9 -0
  19. {akashcli-3.6.0 → akashcli-4.3.0}/akashcli.egg-info/PKG-INFO +13 -7
  20. {akashcli-3.6.0 → akashcli-4.3.0}/akashcli.egg-info/SOURCES.txt +11 -1
  21. akashcli-4.3.0/akashcli.egg-info/requires.txt +5 -0
  22. akashcli-4.3.0/pyproject.toml +29 -0
  23. akashcli-3.6.0/akashcli/cli.py +0 -378
  24. akashcli-3.6.0/akashcli/client.py +0 -164
  25. akashcli-3.6.0/akashcli/downloader.py +0 -28
  26. akashcli-3.6.0/akashcli/uploader.py +0 -113
  27. akashcli-3.6.0/akashcli/utils.py +0 -38
  28. akashcli-3.6.0/akashcli.egg-info/requires.txt +0 -6
  29. akashcli-3.6.0/pyproject.toml +0 -21
  30. {akashcli-3.6.0 → akashcli-4.3.0}/README.md +0 -0
  31. {akashcli-3.6.0 → akashcli-4.3.0}/akashcli/__init__.py +0 -0
  32. {akashcli-3.6.0 → akashcli-4.3.0}/akashcli/config.py +0 -0
  33. {akashcli-3.6.0 → akashcli-4.3.0}/akashcli/crypto.py +0 -0
  34. {akashcli-3.6.0 → akashcli-4.3.0}/akashcli/exceptions.py +0 -0
  35. {akashcli-3.6.0 → akashcli-4.3.0}/akashcli.egg-info/dependency_links.txt +0 -0
  36. {akashcli-3.6.0 → akashcli-4.3.0}/akashcli.egg-info/entry_points.txt +0 -0
  37. {akashcli-3.6.0 → akashcli-4.3.0}/akashcli.egg-info/top_level.txt +0 -0
  38. {akashcli-3.6.0 → akashcli-4.3.0}/setup.cfg +0 -0
@@ -1,15 +1,21 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akashcli
3
- Version: 3.6.0
4
- Summary: Enterprise Developer SDK and CLI for Akash Vault
5
- Requires-Python: >=3.12
3
+ Version: 4.3.0
4
+ Summary: Akash CLI — secure remote shell relay, file vault, and device management
5
+ License: MIT
6
+ Keywords: akash,cli,relay,remote-shell,vault
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Environment :: Console
11
+ Classifier: Topic :: Utilities
12
+ Requires-Python: >=3.9
6
13
  Description-Content-Type: text/markdown
7
14
  Requires-Dist: httpx
8
- Requires-Dist: typer[all]
9
- Requires-Dist: rich
10
- Requires-Dist: jwt
15
+ Requires-Dist: typer
11
16
  Requires-Dist: cryptography
12
- Requires-Dist: questionary
17
+ Requires-Dist: pydantic
18
+ Requires-Dist: websockets
13
19
 
14
20
  To get started with **AkashCLI**, your users should follow these steps. You can provide this guide as a `README.md` or a "Getting Started" message in your bot.
15
21
 
@@ -9,31 +9,31 @@ from .crypto import SecureVault
9
9
  class AuthManager:
10
10
  @staticmethod
11
11
  def verify_remote_key(api_key: str, api_url: str) -> UserInfo:
12
- """Calls the /api/verify endpoint to check key status."""
12
+ """Calls the /api/me endpoint to verify the key and fetch account info."""
13
13
  try:
14
14
  with httpx.Client(base_url=api_url, timeout=10.0) as client:
15
15
  response = client.get(
16
- "/api/verify",
16
+ "/api/me",
17
17
  headers={"x-api-key": api_key, "Origin": "https://akash.cli"}
18
18
  )
19
-
19
+
20
20
  if response.status_code == 403:
21
21
  raise AuthenticationError("API Key is invalid or locked.")
22
-
22
+
23
23
  response.raise_for_status()
24
24
  data = response.json()
25
-
25
+
26
26
  return UserInfo(
27
27
  owner=data["owner"],
28
- quota_used=data["quota_used"],
29
- quota_limit=data["quota_limit"],
28
+ quota_used=data["quota"]["used"],
29
+ quota_limit=data["quota"]["limit"],
30
30
  allowed_domains=data.get("allowed_domains", "*")
31
31
  )
32
32
  except httpx.RequestError as e:
33
- raise NetworkError(f"Could not connect to Akash Vault: {e}")
33
+ raise NetworkError(f"Could not connect to Akash: {e}")
34
34
 
35
35
  @staticmethod
36
- def perform_login(api_key: str, api_url: str) -> UserInfo:
36
+ def perform_login(api_key: str, api_url: str, label: str = "") -> UserInfo:
37
37
  """Verifies the key and persists it to the encrypted config."""
38
38
  user_info = AuthManager.verify_remote_key(api_key, api_url)
39
39
 
@@ -41,11 +41,16 @@ class AuthManager:
41
41
  config_data = {
42
42
  "api_key": api_key,
43
43
  "api_url": api_url,
44
- "owner": user_info.owner
44
+ "owner": user_info.owner,
45
45
  }
46
46
 
47
47
  # Encrypt and save
48
48
  encrypted_blob = SecureVault.encrypt(json.dumps(config_data))
49
49
  ConfigManager.save(encrypted_blob)
50
+
51
+ # Persist device label separately using the stable machine.key path
52
+ if label:
53
+ from .exec import _save_device_label
54
+ _save_device_label(label)
50
55
 
51
56
  return user_info