hypercli-cli 0.8.12__tar.gz → 0.8.13__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.
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/PKG-INFO +1 -1
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/jobs.py +23 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/output.py +1 -1
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/pyproject.toml +1 -1
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/.gitignore +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/README.md +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/__init__.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/billing.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/claw.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/cli.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/comfyui.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/flow.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/instances.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/keys.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/onboard.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/renders.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/tui/__init__.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/tui/job_monitor.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/user.py +0 -0
- {hypercli_cli-0.8.12 → hypercli_cli-0.8.13}/hypercli_cli/wallet.py +0 -0
|
@@ -11,6 +11,24 @@ def get_client() -> HyperCLI:
|
|
|
11
11
|
return HyperCLI()
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
def _resolve_job_id(client: HyperCLI, job_id: str) -> str:
|
|
15
|
+
"""Resolve a partial job ID prefix to a full UUID."""
|
|
16
|
+
if len(job_id) == 36:
|
|
17
|
+
return job_id
|
|
18
|
+
jobs = client.jobs.list()
|
|
19
|
+
matches = [j.job_id for j in jobs if j.job_id.startswith(job_id)]
|
|
20
|
+
if len(matches) == 1:
|
|
21
|
+
return matches[0]
|
|
22
|
+
elif len(matches) == 0:
|
|
23
|
+
console.print(f"[red]Error:[/red] No job matching '{job_id}' in recent jobs. Try the full UUID.")
|
|
24
|
+
raise typer.Exit(1)
|
|
25
|
+
else:
|
|
26
|
+
console.print(f"[red]Error:[/red] Ambiguous prefix '{job_id}' — {len(matches)} matches:")
|
|
27
|
+
for m in matches[:5]:
|
|
28
|
+
console.print(f" {m}")
|
|
29
|
+
raise typer.Exit(1)
|
|
30
|
+
|
|
31
|
+
|
|
14
32
|
@app.command("list")
|
|
15
33
|
def list_jobs(
|
|
16
34
|
state: Optional[str] = typer.Option(None, "--state", "-s", help="Filter by state"),
|
|
@@ -37,6 +55,7 @@ def get_job(
|
|
|
37
55
|
):
|
|
38
56
|
"""Get job details"""
|
|
39
57
|
client = get_client()
|
|
58
|
+
job_id = _resolve_job_id(client, job_id)
|
|
40
59
|
with spinner("Fetching job..."):
|
|
41
60
|
job = client.jobs.get(job_id)
|
|
42
61
|
output(job, fmt)
|
|
@@ -52,6 +71,7 @@ def logs(
|
|
|
52
71
|
):
|
|
53
72
|
"""Get job logs"""
|
|
54
73
|
client = get_client()
|
|
74
|
+
job_id = _resolve_job_id(client, job_id)
|
|
55
75
|
|
|
56
76
|
if tui:
|
|
57
77
|
_follow_job(job_id, cancel_on_exit=cancel_on_exit)
|
|
@@ -77,6 +97,7 @@ def metrics(
|
|
|
77
97
|
):
|
|
78
98
|
"""Get job GPU metrics"""
|
|
79
99
|
client = get_client()
|
|
100
|
+
job_id = _resolve_job_id(client, job_id)
|
|
80
101
|
|
|
81
102
|
if watch:
|
|
82
103
|
_watch_metrics(job_id)
|
|
@@ -95,6 +116,7 @@ def cancel(
|
|
|
95
116
|
):
|
|
96
117
|
"""Cancel a running job"""
|
|
97
118
|
client = get_client()
|
|
119
|
+
job_id = _resolve_job_id(client, job_id)
|
|
98
120
|
with spinner("Cancelling job..."):
|
|
99
121
|
client.jobs.cancel(job_id)
|
|
100
122
|
success(f"Job {job_id} cancelled")
|
|
@@ -108,6 +130,7 @@ def extend(
|
|
|
108
130
|
):
|
|
109
131
|
"""Extend job runtime"""
|
|
110
132
|
client = get_client()
|
|
133
|
+
job_id = _resolve_job_id(client, job_id)
|
|
111
134
|
with spinner("Extending runtime..."):
|
|
112
135
|
job = client.jobs.extend(job_id, runtime)
|
|
113
136
|
if fmt == "json":
|
|
@@ -42,7 +42,7 @@ def table_list(items: list, columns: list[str] = None):
|
|
|
42
42
|
table = Table(show_header=True, header_style="bold cyan")
|
|
43
43
|
|
|
44
44
|
for col in cols:
|
|
45
|
-
table.add_column(col)
|
|
45
|
+
table.add_column(col, no_wrap=True if col.endswith("_id") else False)
|
|
46
46
|
|
|
47
47
|
for item in items:
|
|
48
48
|
row = [str(item.get(col, "")) for col in cols]
|
|
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
|