qbraid-cli 0.14.0__tar.gz → 0.15.1__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.14.0/qbraid_cli.egg-info → qbraid_cli-0.15.1}/PKG-INFO +1 -1
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/pyproject.toml +1 -1
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/agents/app.py +70 -3
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/skills/app.py +113 -16
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1/qbraid_cli.egg-info}/PKG-INFO +1 -1
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/LICENSE +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/README.md +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/_build_info.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/_version.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/account/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/account/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/admin/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/admin/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/admin/headers.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/admin/validation.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/agents/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/ai/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/ai/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/ai/token.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/compute/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/compute/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/compute/instances.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/compute/profiles.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/compute/server.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/compute/ssh.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/configure/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/configure/actions.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/configure/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/devices/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/devices/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/devices/validation.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/envs/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/envs/activate.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/envs/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/envs/create.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/envs/data_handling.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/envs/groups.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/envs/publish.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/envs/registry.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/envs/share.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/exceptions.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/handlers.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/jobs/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/jobs/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/jobs/groups.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/kernels/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/kernels/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/lab/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/lab/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/main.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/pip/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/pip/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/pip/hooks.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/projects/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/projects/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/py.typed +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/skills/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/troubleshoot/__init__.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli/troubleshoot/app.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli.egg-info/SOURCES.txt +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli.egg-info/dependency_links.txt +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli.egg-info/entry_points.txt +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli.egg-info/requires.txt +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/qbraid_cli.egg-info/top_level.txt +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/setup.cfg +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/tests/test_cli_e2e.py +0 -0
- {qbraid_cli-0.14.0 → qbraid_cli-0.15.1}/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.15.1
|
|
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.15.1"
|
|
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" }]
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
"""Agents CLI - Monitor and manage AI coding agent sessions."""
|
|
5
5
|
|
|
6
|
+
import inspect
|
|
6
7
|
import os
|
|
7
8
|
import re
|
|
8
9
|
import signal
|
|
9
10
|
import time
|
|
10
11
|
from datetime import datetime
|
|
12
|
+
from enum import Enum
|
|
11
13
|
from pathlib import Path
|
|
12
|
-
from typing import List, Optional
|
|
14
|
+
from typing import Any, Callable, Dict, List, Optional
|
|
13
15
|
|
|
14
16
|
import click
|
|
15
17
|
import typer
|
|
@@ -1096,10 +1098,59 @@ def _interactive_attach(console_: Console) -> str:
|
|
|
1096
1098
|
return selected
|
|
1097
1099
|
|
|
1098
1100
|
|
|
1101
|
+
class ApprovalMode(str, Enum):
|
|
1102
|
+
"""How much the agent asks before acting.
|
|
1103
|
+
|
|
1104
|
+
A launched agent is detached, so a confirmation prompt has nobody to
|
|
1105
|
+
answer it — ``auto`` is the mode for anything you intend to leave running.
|
|
1106
|
+
"""
|
|
1107
|
+
|
|
1108
|
+
ASK = "ask"
|
|
1109
|
+
AUTO = "auto"
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
def _approval_kwargs(method: Callable[..., Any], approval: Optional[str]) -> Dict[str, Any]:
|
|
1113
|
+
"""Forward ``approval`` only to a qbraid-core new enough to accept it.
|
|
1114
|
+
|
|
1115
|
+
The CLI's floor is qbraid-core>=0.5.0, which predates the parameter. Passing
|
|
1116
|
+
it unconditionally would raise TypeError on EVERY launch there, not only
|
|
1117
|
+
when --approval was used — so detect support and, when the user actually
|
|
1118
|
+
asked for a mode we cannot honour, say so plainly instead of forwarding it.
|
|
1119
|
+
|
|
1120
|
+
A Mock reports ``(*args, **kwargs)``; VAR_KEYWORD therefore counts as
|
|
1121
|
+
support, which is both correct in general and keeps test doubles working.
|
|
1122
|
+
"""
|
|
1123
|
+
try:
|
|
1124
|
+
params = inspect.signature(method).parameters
|
|
1125
|
+
supported = "approval" in params or any(
|
|
1126
|
+
param.kind is inspect.Parameter.VAR_KEYWORD for param in params.values()
|
|
1127
|
+
)
|
|
1128
|
+
except (TypeError, ValueError): # pragma: no cover - non-introspectable callable
|
|
1129
|
+
supported = True
|
|
1130
|
+
|
|
1131
|
+
if supported:
|
|
1132
|
+
return {"approval": approval}
|
|
1133
|
+
|
|
1134
|
+
if approval is not None:
|
|
1135
|
+
try:
|
|
1136
|
+
from qbraid_core import __version__ as core_version
|
|
1137
|
+
except ImportError: # pragma: no cover
|
|
1138
|
+
core_version = "unknown"
|
|
1139
|
+
handle_error(
|
|
1140
|
+
error_type="UnsupportedOptionError",
|
|
1141
|
+
message=(
|
|
1142
|
+
f"--approval requires a newer qbraid-core (installed: {core_version}). "
|
|
1143
|
+
"Upgrade with: pip install -U qbraid-core"
|
|
1144
|
+
),
|
|
1145
|
+
include_traceback=False,
|
|
1146
|
+
)
|
|
1147
|
+
return {}
|
|
1148
|
+
|
|
1149
|
+
|
|
1099
1150
|
@agents_app.command("launch")
|
|
1100
1151
|
def agents_launch(
|
|
1101
1152
|
tool: Optional[str] = typer.Option(
|
|
1102
|
-
None, "--tool", "-t", help="Agent tool (claude, claude-auto
|
|
1153
|
+
None, "--tool", "-t", help="Agent tool (claude, codeq, codex; claude-auto = claude --approval auto)"
|
|
1103
1154
|
),
|
|
1104
1155
|
cwd: Optional[str] = typer.Option(None, "--cwd", help="Working directory"),
|
|
1105
1156
|
name: Optional[str] = typer.Option(None, "--name", "-n", help="Agent name"),
|
|
@@ -1116,10 +1167,21 @@ def agents_launch(
|
|
|
1116
1167
|
compute: Optional[str] = typer.Option(
|
|
1117
1168
|
None, "--compute", "-c", help="SSH alias for remote compute server"
|
|
1118
1169
|
),
|
|
1170
|
+
approval: Optional[ApprovalMode] = typer.Option(
|
|
1171
|
+
None,
|
|
1172
|
+
"--approval",
|
|
1173
|
+
help="ask: the agent confirms before acting. auto: it acts without asking.",
|
|
1174
|
+
),
|
|
1119
1175
|
):
|
|
1120
1176
|
"""Launch an AI coding agent.
|
|
1121
1177
|
|
|
1122
1178
|
Starts the agent in a managed tmux session.
|
|
1179
|
+
|
|
1180
|
+
The agent runs detached, so nothing is watching its confirmation prompts.
|
|
1181
|
+
Pass --approval auto for an agent you intend to leave running: it starts
|
|
1182
|
+
the tool in its own non-interactive mode instead of parking on a prompt
|
|
1183
|
+
until you come back. Approval mode is remembered, so `qbraid agents
|
|
1184
|
+
resume` restores it.
|
|
1123
1185
|
"""
|
|
1124
1186
|
try:
|
|
1125
1187
|
from qbraid_core.services.agents import AgentLauncher, AgentLauncherError
|
|
@@ -1148,6 +1210,7 @@ def agents_launch(
|
|
|
1148
1210
|
instructions=instructions,
|
|
1149
1211
|
agent_type=agent_type,
|
|
1150
1212
|
tags=tag,
|
|
1213
|
+
**_approval_kwargs(launcher.remote_launch, approval.value if approval else None),
|
|
1151
1214
|
)
|
|
1152
1215
|
else:
|
|
1153
1216
|
|
|
@@ -1164,6 +1227,7 @@ def agents_launch(
|
|
|
1164
1227
|
parent_session_id=parent,
|
|
1165
1228
|
team_id=team,
|
|
1166
1229
|
tags=tag,
|
|
1230
|
+
**_approval_kwargs(launcher.launch, approval.value if approval else None),
|
|
1167
1231
|
progress_callback=_clone_progress if repo else None,
|
|
1168
1232
|
)
|
|
1169
1233
|
|
|
@@ -1334,12 +1398,15 @@ def agents_resume(
|
|
|
1334
1398
|
if original:
|
|
1335
1399
|
tool_value = original.tool.value if original.tool else "claude"
|
|
1336
1400
|
fork_name = name or f"{tmux_win}-fork"
|
|
1337
|
-
# Launch fresh with same tool and cwd
|
|
1401
|
+
# Launch fresh with same tool and cwd.
|
|
1338
1402
|
session = launcher.launch(
|
|
1339
1403
|
tool=tool_value,
|
|
1340
1404
|
cwd=original.cwd,
|
|
1341
1405
|
name=fork_name,
|
|
1342
1406
|
instructions=None,
|
|
1407
|
+
# A fork of a detached agent must not quietly
|
|
1408
|
+
# become one that waits for a human.
|
|
1409
|
+
**_approval_kwargs(launcher.launch, getattr(original, "approval", None)),
|
|
1343
1410
|
)
|
|
1344
1411
|
else:
|
|
1345
1412
|
console.print("[red]Could not find original session to fork.[/red]")
|
|
@@ -40,11 +40,21 @@ class SkillTargetOption(str, Enum):
|
|
|
40
40
|
|
|
41
41
|
CLAUDE_CODE = "claude-code"
|
|
42
42
|
CODEX = "codex"
|
|
43
|
+
PI = "pi"
|
|
43
44
|
CURSOR = "cursor"
|
|
44
45
|
COPILOT = "copilot"
|
|
45
46
|
ALL = "all"
|
|
46
47
|
|
|
47
48
|
|
|
49
|
+
_ACTION_STYLE = {
|
|
50
|
+
"installed": "[green]installed[/green]",
|
|
51
|
+
"updated": "[green]updated[/green]",
|
|
52
|
+
"unchanged": "[dim]unchanged[/dim]",
|
|
53
|
+
"failed": "[red]failed[/red]",
|
|
54
|
+
"unknown": "[dim]done (older qbraid-core)[/dim]",
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
48
58
|
class VisibilityOption(str, Enum):
|
|
49
59
|
"""Skill visibility level."""
|
|
50
60
|
|
|
@@ -213,39 +223,106 @@ def skills_install(
|
|
|
213
223
|
"-t",
|
|
214
224
|
help="Target AI coding tool(s) to install for",
|
|
215
225
|
),
|
|
226
|
+
path: Optional[str] = typer.Option(
|
|
227
|
+
None,
|
|
228
|
+
"--path",
|
|
229
|
+
"-p",
|
|
230
|
+
help="Install into this directory instead of a tool's skills directory",
|
|
231
|
+
),
|
|
232
|
+
force: bool = typer.Option(
|
|
233
|
+
False,
|
|
234
|
+
"--force",
|
|
235
|
+
"-f",
|
|
236
|
+
help="Replace the installed copy even if it is unchanged or was not installed by qbraid",
|
|
237
|
+
),
|
|
216
238
|
) -> None:
|
|
217
239
|
"""Install a skill for AI coding tools.
|
|
218
240
|
|
|
219
|
-
By default, installs to Claude Code (~/.claude/skills/).
|
|
220
|
-
|
|
241
|
+
By default, installs to Claude Code (~/.claude/skills/). Use --target all
|
|
242
|
+
for every supported tool; --target codex or --target pi both land in
|
|
243
|
+
~/.agents/skills/, which Codex and CodeQ (pi) read.
|
|
244
|
+
|
|
245
|
+
In a tool's skills directory the skill is placed under its own name (not
|
|
246
|
+
its slug); with --path it is placed under its slug at that path. The
|
|
247
|
+
download is checked against the registry's checksum, and installing an
|
|
248
|
+
unchanged skill again is a no-op.
|
|
221
249
|
"""
|
|
250
|
+
from pathlib import Path
|
|
251
|
+
|
|
252
|
+
install_path = Path(path).expanduser() if path else None
|
|
253
|
+
console = Console()
|
|
254
|
+
legacy_core = False
|
|
222
255
|
|
|
223
256
|
def install_skill():
|
|
257
|
+
nonlocal legacy_core
|
|
224
258
|
from qbraid_core.services.skills import SkillsClient
|
|
225
259
|
|
|
226
260
|
client = SkillsClient()
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
261
|
+
if hasattr(client, "install_skill_ex"):
|
|
262
|
+
return client.install_skill_ex(slug, target=target.value, install_path=install_path, force=force)
|
|
263
|
+
# older qbraid-core: slug-named directories, no checksum or manifest, no --force
|
|
264
|
+
legacy_core = True
|
|
265
|
+
return {
|
|
266
|
+
name: _LegacyInstall(slug, installed_path)
|
|
267
|
+
for name, installed_path in client.install_skill(
|
|
268
|
+
slug, target=target.value, install_path=install_path
|
|
269
|
+
).items()
|
|
270
|
+
}
|
|
230
271
|
|
|
231
272
|
try:
|
|
232
273
|
console.print(f"[dim]Installing skill '{slug}'...[/dim]")
|
|
233
|
-
|
|
274
|
+
results = run_progress_task(install_skill)
|
|
234
275
|
|
|
235
|
-
|
|
276
|
+
if legacy_core and force:
|
|
277
|
+
console.print(
|
|
278
|
+
"[yellow]Note:[/yellow] the installed qbraid-core does not support --force; "
|
|
279
|
+
"the flag was ignored. Upgrade qbraid-core for --force, checksum "
|
|
280
|
+
"verification and name-based skill directories."
|
|
281
|
+
)
|
|
236
282
|
|
|
237
|
-
for
|
|
238
|
-
|
|
283
|
+
failed = [name for name, result in results.items() if result.action == "failed"]
|
|
284
|
+
mark = "[yellow]![/yellow]" if failed else "[green]✓[/green]"
|
|
285
|
+
console.print(f"\n{mark} Skill '{slug}':\n")
|
|
286
|
+
for target_name, result in results.items():
|
|
287
|
+
version = f" v{result.version}" if result.version else ""
|
|
288
|
+
line = (
|
|
289
|
+
f" [cyan]{target_name}[/cyan]: "
|
|
290
|
+
f"{_ACTION_STYLE.get(result.action, result.action)} "
|
|
291
|
+
f"[bold]{result.name}[/bold]{version} → {result.path}"
|
|
292
|
+
)
|
|
293
|
+
if result.action == "failed" and getattr(result, "error", None):
|
|
294
|
+
line += f"\n [red]{result.error}[/red]"
|
|
295
|
+
console.print(line)
|
|
239
296
|
|
|
297
|
+
if failed:
|
|
298
|
+
handle_error(message=f"Skill '{slug}' failed for: {', '.join(failed)}")
|
|
240
299
|
console.print("\n[dim]The skill is now available in your AI coding tool(s).[/dim]")
|
|
241
300
|
|
|
301
|
+
except typer.Exit:
|
|
302
|
+
raise
|
|
242
303
|
except Exception as err: # pylint: disable=broad-exception-caught
|
|
243
304
|
handle_error(message=f"Failed to install skill: {err}")
|
|
244
305
|
|
|
245
306
|
|
|
307
|
+
class _LegacyInstall: # pylint: disable=too-few-public-methods
|
|
308
|
+
"""Install result shape for a qbraid-core without install_skill_ex.
|
|
309
|
+
|
|
310
|
+
That core cannot tell whether anything changed, so the action is reported
|
|
311
|
+
as ``unknown`` rather than claiming ``installed``.
|
|
312
|
+
"""
|
|
313
|
+
|
|
314
|
+
def __init__(self, slug: str, path) -> None:
|
|
315
|
+
self.slug = slug
|
|
316
|
+
self.name = slug
|
|
317
|
+
self.path = path
|
|
318
|
+
self.version = None
|
|
319
|
+
self.action = "unknown"
|
|
320
|
+
self.error = None
|
|
321
|
+
|
|
322
|
+
|
|
246
323
|
@skills_app.command(name="uninstall")
|
|
247
324
|
def skills_uninstall(
|
|
248
|
-
slug: str = typer.Argument(..., help="The skill slug to uninstall"),
|
|
325
|
+
slug: str = typer.Argument(..., help="The skill slug (or installed name) to uninstall"),
|
|
249
326
|
target: SkillTargetOption = typer.Option(
|
|
250
327
|
SkillTargetOption.ALL,
|
|
251
328
|
"--target",
|
|
@@ -255,7 +332,8 @@ def skills_uninstall(
|
|
|
255
332
|
) -> None:
|
|
256
333
|
"""Uninstall a skill from AI coding tools.
|
|
257
334
|
|
|
258
|
-
By default, uninstalls from all supported tools.
|
|
335
|
+
By default, uninstalls from all supported tools. Accepts the registry slug
|
|
336
|
+
or the installed directory name.
|
|
259
337
|
"""
|
|
260
338
|
|
|
261
339
|
def uninstall_skill():
|
|
@@ -294,15 +372,28 @@ def skills_installed(
|
|
|
294
372
|
help="Show skills for specific tool only",
|
|
295
373
|
),
|
|
296
374
|
) -> None:
|
|
297
|
-
"""List locally installed skills.
|
|
375
|
+
"""List locally installed skills.
|
|
376
|
+
|
|
377
|
+
Shows each skill's name, registry slug and version per tool.
|
|
378
|
+
"""
|
|
298
379
|
|
|
299
380
|
def list_installed():
|
|
300
381
|
from qbraid_core.services.skills import SkillsClient
|
|
301
382
|
|
|
302
383
|
client = SkillsClient()
|
|
384
|
+
if hasattr(client, "list_all_installed_skills_detailed"):
|
|
385
|
+
if target:
|
|
386
|
+
return {target.value: client.list_installed_skills_detailed(target=target.value)}
|
|
387
|
+
return client.list_all_installed_skills_detailed()
|
|
388
|
+
# older qbraid-core: directory names only
|
|
303
389
|
if target:
|
|
304
|
-
|
|
305
|
-
|
|
390
|
+
listed = {target.value: client.list_installed_skills(target=target.value)}
|
|
391
|
+
else:
|
|
392
|
+
listed = client.list_all_installed_skills()
|
|
393
|
+
return {
|
|
394
|
+
name: [{"name": skill, "slug": skill, "version": None} for skill in skills]
|
|
395
|
+
for name, skills in listed.items()
|
|
396
|
+
}
|
|
306
397
|
|
|
307
398
|
console = Console()
|
|
308
399
|
|
|
@@ -320,8 +411,14 @@ def skills_installed(
|
|
|
320
411
|
for target_name, skills in results.items():
|
|
321
412
|
if skills:
|
|
322
413
|
console.print(f"[cyan]{target_name}[/cyan]:")
|
|
323
|
-
for
|
|
324
|
-
|
|
414
|
+
for entry in skills:
|
|
415
|
+
slug_note = (
|
|
416
|
+
f" [dim]({entry['slug']})[/dim]"
|
|
417
|
+
if entry.get("slug") and entry["slug"] != entry["name"]
|
|
418
|
+
else ""
|
|
419
|
+
)
|
|
420
|
+
version = f" v{entry['version']}" if entry.get("version") else ""
|
|
421
|
+
console.print(f" • {entry['name']}{slug_note}{version}")
|
|
325
422
|
else:
|
|
326
423
|
console.print(f"[dim]{target_name}: (none)[/dim]")
|
|
327
424
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qbraid-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.15.1
|
|
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
|