dhub-cli 0.1.2__tar.gz → 0.1.3__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 (36) hide show
  1. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/PKG-INFO +1 -1
  2. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/pyproject.toml +1 -1
  3. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/cli/app.py +2 -1
  4. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/cli/auth.py +13 -0
  5. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/cli/registry.py +1 -1
  6. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/cli/search.py +2 -1
  7. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/.gitignore +0 -0
  8. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/README.md +0 -0
  9. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/__init__.py +0 -0
  10. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/cli/__init__.py +0 -0
  11. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/cli/config.py +0 -0
  12. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/cli/keys.py +0 -0
  13. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/cli/org.py +0 -0
  14. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/cli/runtime.py +0 -0
  15. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/core/__init__.py +0 -0
  16. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/core/install.py +0 -0
  17. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/core/manifest.py +0 -0
  18. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/core/runtime.py +0 -0
  19. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/core/validation.py +0 -0
  20. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/src/dhub/models.py +0 -0
  21. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/__init__.py +0 -0
  22. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/conftest.py +0 -0
  23. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_cli/__init__.py +0 -0
  24. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_cli/test_auth_cli.py +0 -0
  25. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_cli/test_keys_cli.py +0 -0
  26. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_cli/test_org_cli.py +0 -0
  27. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_cli/test_registry_cli.py +0 -0
  28. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_cli/test_runtime_cli.py +0 -0
  29. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_cli/test_search_cli.py +0 -0
  30. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_core/__init__.py +0 -0
  31. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_core/test_docx_integration.py +0 -0
  32. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_core/test_install.py +0 -0
  33. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_core/test_install_symlinks.py +0 -0
  34. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_core/test_manifest.py +0 -0
  35. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_core/test_runtime.py +0 -0
  36. {dhub_cli-0.1.2 → dhub_cli-0.1.3}/tests/test_core/test_validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dhub-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dhub-cli"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "The CLI package manager for AI agent skills"
5
5
  requires-python = ">=3.11"
6
6
  license = "MIT"
@@ -27,12 +27,13 @@ def main(
27
27
  """Decision Hub - The package manager for AI agent skills."""
28
28
 
29
29
  # Register top-level commands
30
- from dhub.cli.auth import login_command # noqa: E402
30
+ from dhub.cli.auth import login_command, logout_command # noqa: E402
31
31
  from dhub.cli.registry import delete_command, install_command, list_command, publish_command # noqa: E402
32
32
  from dhub.cli.runtime import run_command # noqa: E402
33
33
  from dhub.cli.search import ask_command # noqa: E402
34
34
 
35
35
  app.command("login")(login_command)
36
+ app.command("logout")(logout_command)
36
37
  app.command("publish")(publish_command)
37
38
  app.command("install")(install_command)
38
39
  app.command("list")(list_command)
@@ -49,6 +49,19 @@ def login_command(
49
49
  console.print(f"[green]Authenticated as @{token_data['username']}[/]")
50
50
 
51
51
 
52
+ def logout_command() -> None:
53
+ """Log out by removing the stored token."""
54
+ from dhub.cli.config import CONFIG_FILE, CliConfig, load_config, save_config
55
+
56
+ config = load_config()
57
+ if not config.token:
58
+ console.print("Not logged in.")
59
+ return
60
+
61
+ save_config(CliConfig(api_url=config.api_url, token=None))
62
+ console.print("[green]Logged out.[/]")
63
+
64
+
52
65
  def _poll_for_token(
53
66
  base_url: str,
54
67
  device_code: str,
@@ -111,7 +111,7 @@ def list_command() -> None:
111
111
  console.print("No skills published yet.")
112
112
  return
113
113
 
114
- table = Table(title="Published Skills")
114
+ table = Table(title="Published Skills", show_lines=True)
115
115
  table.add_column("Org", style="cyan")
116
116
  table.add_column("Skill", style="green")
117
117
  table.add_column("Version")
@@ -3,6 +3,7 @@
3
3
  import httpx
4
4
  import typer
5
5
  from rich.console import Console
6
+ from rich.markdown import Markdown
6
7
  from rich.panel import Panel
7
8
 
8
9
  console = Console()
@@ -30,7 +31,7 @@ def ask_command(
30
31
  data = resp.json()
31
32
 
32
33
  console.print(Panel(
33
- data["results"],
34
+ Markdown(data["results"]),
34
35
  title=f"Results for: {data['query']}",
35
36
  border_style="blue",
36
37
  ))
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes