dhub-cli 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl

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.
dhub/cli/app.py CHANGED
@@ -1,13 +1,31 @@
1
1
  """Main Typer app with subcommand registration."""
2
2
 
3
+ from importlib.metadata import version as pkg_version
4
+
3
5
  import typer
4
6
 
7
+
8
+ def _version_callback(value: bool) -> None:
9
+ if value:
10
+ typer.echo(f"dhub {pkg_version('dhub-cli')}")
11
+ raise typer.Exit()
12
+
13
+
5
14
  app = typer.Typer(
6
15
  name="dhub",
7
- help="Decision Hub - The package manager for AI agent skills",
8
16
  no_args_is_help=True,
9
17
  )
10
18
 
19
+
20
+ @app.callback()
21
+ def main(
22
+ version: bool = typer.Option(
23
+ False, "--version", "-V", help="Show version and exit.",
24
+ callback=_version_callback, is_eager=True,
25
+ ),
26
+ ) -> None:
27
+ """Decision Hub - The package manager for AI agent skills."""
28
+
11
29
  # Register top-level commands
12
30
  from dhub.cli.auth import login_command # noqa: E402
13
31
  from dhub.cli.registry import delete_command, install_command, list_command, publish_command # noqa: E402
dhub/cli/registry.py CHANGED
@@ -93,12 +93,15 @@ def _create_zip(path: Path) -> bytes:
93
93
 
94
94
  def list_command() -> None:
95
95
  """List all published skills on the registry."""
96
- from dhub.cli.config import get_api_url
96
+ from dhub.cli.config import get_api_url, get_token
97
97
 
98
98
  api_url = get_api_url()
99
99
 
100
100
  with httpx.Client(timeout=30) as client:
101
- resp = client.get(f"{api_url}/v1/skills")
101
+ resp = client.get(
102
+ f"{api_url}/v1/skills",
103
+ headers={"Authorization": f"Bearer {get_token()}"},
104
+ )
102
105
  resp.raise_for_status()
103
106
  skills = resp.json()
104
107
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dhub-cli
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: The CLI package manager for AI agent skills
5
5
  Project-URL: Homepage, https://github.com/lfiaschi/decision-hub
6
6
  Project-URL: Repository, https://github.com/lfiaschi/decision-hub
@@ -19,7 +19,7 @@ Requires-Python: >=3.11
19
19
  Requires-Dist: httpx>=0.27.0
20
20
  Requires-Dist: pyyaml>=6.0.0
21
21
  Requires-Dist: rich>=13.0.0
22
- Requires-Dist: typer[all]>=0.12.0
22
+ Requires-Dist: typer>=0.12.0
23
23
  Provides-Extra: dev
24
24
  Requires-Dist: pytest>=8.0.0; extra == 'dev'
25
25
  Description-Content-Type: text/markdown
@@ -34,10 +34,10 @@ The CLI package manager for AI agent skills.
34
34
 
35
35
  ```bash
36
36
  # Via uv
37
- uv tool install dhub
37
+ uv tool install dhub-cli
38
38
 
39
39
  # Via pipx
40
- pipx install dhub
40
+ pipx install dhub-cli
41
41
  ```
42
42
 
43
43
  ## Quick Start
@@ -1,12 +1,12 @@
1
1
  dhub/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
2
2
  dhub/models.py,sha256=P0nJY8CMCMsiS3KK1ZhvAV-gLQnB6kjK1HTjSTBeAxA,816
3
3
  dhub/cli/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
- dhub/cli/app.py,sha256=Vkn-PCytu9XUWRTfsqURXT4vcAEf3j6tUrMWvmFKRpQ,1021
4
+ dhub/cli/app.py,sha256=eIC-G3msECmlXEL7z5DhG-t_2prQv135-IC4S51xCpk,1413
5
5
  dhub/cli/auth.py,sha256=aRaP5A00iTJMvj-cDC4LbqcgCHWHaTTj5cwH8m8Pz64,2787
6
6
  dhub/cli/config.py,sha256=39D-BopFh2pdW0oFxxbL9UiehODq-3UgvX-f-32Wog8,1844
7
7
  dhub/cli/keys.py,sha256=JIVxklYRstZyk_57GeZ8xWDsM0xliZCctXVwps_xXBE,2667
8
8
  dhub/cli/org.py,sha256=dF1BKZ6zI2BYL9BLfV5c7T2UTPjyeJ9l1pkohDejJec,3602
9
- dhub/cli/registry.py,sha256=hca6YM9pmAeaGObAnvhKoXU_ICip2axqqwQzWD4K5vM,7964
9
+ dhub/cli/registry.py,sha256=1rF9T6ObOW72lP83kZHo1eaFlr4cdgMdLDARLEZuI80,8062
10
10
  dhub/cli/runtime.py,sha256=YsBusGwRue6ulzhHqMxNh6i0x3jnj9hrYD0B9azYkSg,2813
11
11
  dhub/cli/search.py,sha256=_mx_pEcFf-oHr5vZjtGatU8xPE9R-t9uyZgt4P0UHA0,1009
12
12
  dhub/core/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
@@ -14,7 +14,7 @@ dhub/core/install.py,sha256=UJBpcL8hmPjrJGc-8e92dXVsS_z7Vbg3xMDgbMjybbI,4840
14
14
  dhub/core/manifest.py,sha256=LDTwTXm8peaQWoMHIai5xaArFswrx1hHWFcyeTiR9GI,7064
15
15
  dhub/core/runtime.py,sha256=Q4JHRd4HhP2MtytC_IkQ8uT3i33z82YL9q0nZIPFhTA,2338
16
16
  dhub/core/validation.py,sha256=ObnOTQMsk55KeerUbJCYd23jeMIYwmrc0KYTMCvtoTo,1383
17
- dhub_cli-0.1.0.dist-info/METADATA,sha256=Q-49Oz3jZz-3RBQ01PWmdjTZz1fBULG1uncF9uwJxZc,2199
18
- dhub_cli-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
19
- dhub_cli-0.1.0.dist-info/entry_points.txt,sha256=vyRYVaVMaUfD0QoXh4QU1AMDwxKgSWxL9-xdGrMcSH8,42
20
- dhub_cli-0.1.0.dist-info/RECORD,,
17
+ dhub_cli-0.1.2.dist-info/METADATA,sha256=AK6HIG0Xuz6bh66yLXRs21kdd7Va4gaHx95iDC6C5eI,2202
18
+ dhub_cli-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
19
+ dhub_cli-0.1.2.dist-info/entry_points.txt,sha256=vyRYVaVMaUfD0QoXh4QU1AMDwxKgSWxL9-xdGrMcSH8,42
20
+ dhub_cli-0.1.2.dist-info/RECORD,,