qbraid-cli 0.15.4__tar.gz → 0.16.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.
- {qbraid_cli-0.15.4/qbraid_cli.egg-info → qbraid_cli-0.16.0}/PKG-INFO +1 -1
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/pyproject.toml +1 -1
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/skills/app.py +40 -4
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0/qbraid_cli.egg-info}/PKG-INFO +1 -1
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/LICENSE +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/README.md +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/_build_info.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/_version.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/account/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/account/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/admin/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/admin/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/admin/headers.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/admin/validation.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/agents/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/agents/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/agents/permission_response.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/ai/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/ai/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/ai/token.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/compute/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/compute/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/compute/instances.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/compute/profiles.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/compute/server.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/compute/ssh.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/configure/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/configure/actions.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/configure/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/devices/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/devices/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/devices/validation.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/envs/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/envs/activate.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/envs/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/envs/create.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/envs/data_handling.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/envs/groups.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/envs/publish.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/envs/registry.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/envs/share.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/exceptions.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/handlers.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/jobs/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/jobs/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/jobs/groups.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/kernels/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/kernels/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/lab/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/lab/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/main.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/pip/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/pip/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/pip/hooks.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/projects/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/projects/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/py.typed +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/skills/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/troubleshoot/__init__.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli/troubleshoot/app.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli.egg-info/SOURCES.txt +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli.egg-info/dependency_links.txt +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli.egg-info/entry_points.txt +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli.egg-info/requires.txt +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/qbraid_cli.egg-info/top_level.txt +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/setup.cfg +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/tests/test_cli_e2e.py +0 -0
- {qbraid_cli-0.15.4 → qbraid_cli-0.16.0}/tests/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qbraid-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.0
|
|
4
4
|
Summary: Command Line Interface for interacting with all parts of the qBraid platform.
|
|
5
5
|
Author-email: qBraid Development Team <contact@qbraid.com>
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "qbraid-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.16.0"
|
|
8
8
|
description = "Command Line Interface for interacting with all parts of the qBraid platform."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "qBraid Development Team", email = "contact@qbraid.com" }]
|
|
@@ -6,6 +6,7 @@ Module defining commands in the 'qbraid skills' namespace.
|
|
|
6
6
|
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
+
import json
|
|
9
10
|
from enum import Enum
|
|
10
11
|
from typing import Optional
|
|
11
12
|
|
|
@@ -68,6 +69,23 @@ class VisibilityOption(str, Enum):
|
|
|
68
69
|
# =============================================================================
|
|
69
70
|
|
|
70
71
|
|
|
72
|
+
def _emit_skills_json(skills) -> None:
|
|
73
|
+
"""Print skills as a JSON array on stdout, and nothing else.
|
|
74
|
+
|
|
75
|
+
Agents discover most skills through `qbraid skills list` / `search` rather
|
|
76
|
+
than having them installed, so this output is a discovery surface, not a
|
|
77
|
+
convenience. The table truncates descriptions (40-50 chars), and a
|
|
78
|
+
description is exactly what an agent matches against to decide whether a
|
|
79
|
+
skill applies -- truncating it hides the words that would have triggered it.
|
|
80
|
+
JSON carries them in full.
|
|
81
|
+
|
|
82
|
+
Uses `print`, not `console.print`: Rich would interpret square brackets in a
|
|
83
|
+
description as markup and mangle the payload.
|
|
84
|
+
"""
|
|
85
|
+
payload = [skill.model_dump(mode="json", by_alias=True, exclude_none=True) for skill in skills]
|
|
86
|
+
print(json.dumps(payload, indent=2))
|
|
87
|
+
|
|
88
|
+
|
|
71
89
|
@skills_app.command(name="list")
|
|
72
90
|
def skills_list(
|
|
73
91
|
query: Optional[str] = typer.Option(None, "--query", "-q", help="Search query for skills"),
|
|
@@ -76,8 +94,12 @@ def skills_list(
|
|
|
76
94
|
None, "--visibility", "-v", help="Filter by visibility"
|
|
77
95
|
),
|
|
78
96
|
limit: int = typer.Option(20, "--limit", "-l", help="Maximum number of results"),
|
|
97
|
+
json_output: bool = typer.Option(False, "--json", help="Output as JSON array (for programmatic use)"),
|
|
79
98
|
) -> None:
|
|
80
|
-
"""List available qBraid skills.
|
|
99
|
+
"""List available qBraid skills.
|
|
100
|
+
|
|
101
|
+
Pass --json for the full, untruncated records.
|
|
102
|
+
"""
|
|
81
103
|
|
|
82
104
|
def fetch_skills():
|
|
83
105
|
from qbraid_core.services.skills import SkillsClient
|
|
@@ -88,7 +110,13 @@ def skills_list(
|
|
|
88
110
|
return client.list_skills(query=query, tags=tag_list, visibility=vis, limit=limit)
|
|
89
111
|
|
|
90
112
|
try:
|
|
91
|
-
|
|
113
|
+
# Skip the progress spinner for --json: Rich writes it to the same
|
|
114
|
+
# stream, and a caller piping this into a parser gets the spinner too.
|
|
115
|
+
skills = fetch_skills() if json_output else run_progress_task(fetch_skills)
|
|
116
|
+
|
|
117
|
+
if json_output:
|
|
118
|
+
_emit_skills_json(skills)
|
|
119
|
+
return
|
|
92
120
|
|
|
93
121
|
console = Console()
|
|
94
122
|
|
|
@@ -128,8 +156,12 @@ def skills_list(
|
|
|
128
156
|
def skills_search(
|
|
129
157
|
query: str = typer.Argument(..., help="Search query"),
|
|
130
158
|
limit: int = typer.Option(10, "--limit", "-l", help="Maximum number of results"),
|
|
159
|
+
json_output: bool = typer.Option(False, "--json", help="Output as JSON array (for programmatic use)"),
|
|
131
160
|
) -> None:
|
|
132
|
-
"""Search for qBraid skills.
|
|
161
|
+
"""Search for qBraid skills.
|
|
162
|
+
|
|
163
|
+
Pass --json for the full, untruncated records.
|
|
164
|
+
"""
|
|
133
165
|
|
|
134
166
|
def fetch_skills():
|
|
135
167
|
from qbraid_core.services.skills import SkillsClient
|
|
@@ -138,7 +170,11 @@ def skills_search(
|
|
|
138
170
|
return client.list_skills(query=query, limit=limit)
|
|
139
171
|
|
|
140
172
|
try:
|
|
141
|
-
skills = run_progress_task(fetch_skills)
|
|
173
|
+
skills = fetch_skills() if json_output else run_progress_task(fetch_skills)
|
|
174
|
+
|
|
175
|
+
if json_output:
|
|
176
|
+
_emit_skills_json(skills)
|
|
177
|
+
return
|
|
142
178
|
|
|
143
179
|
console = Console()
|
|
144
180
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qbraid-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.0
|
|
4
4
|
Summary: Command Line Interface for interacting with all parts of the qBraid platform.
|
|
5
5
|
Author-email: qBraid Development Team <contact@qbraid.com>
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|