hypercli-cli 0.9.1__tar.gz → 0.9.2__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.9.1 → hypercli_cli-0.9.2}/PKG-INFO +1 -1
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/agents.py +43 -4
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/pyproject.toml +1 -1
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/.gitignore +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/README.md +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/__init__.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/billing.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/claw.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/cli.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/comfyui.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/flow.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/instances.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/jobs.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/keys.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/onboard.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/output.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/renders.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/tui/__init__.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/tui/job_monitor.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/user.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/voice.py +0 -0
- {hypercli_cli-0.9.1 → hypercli_cli-0.9.2}/hypercli_cli/wallet.py +0 -0
|
@@ -107,8 +107,41 @@ def _get_pod_with_token(agent_id: str) -> ReefPod:
|
|
|
107
107
|
return pod
|
|
108
108
|
|
|
109
109
|
|
|
110
|
+
@app.command("budget")
|
|
111
|
+
def budget():
|
|
112
|
+
"""Show your agent resource budget and usage."""
|
|
113
|
+
agents = _get_agents_client()
|
|
114
|
+
|
|
115
|
+
try:
|
|
116
|
+
data = agents.budget()
|
|
117
|
+
except Exception as e:
|
|
118
|
+
console.print(f"[red]❌ Failed to get budget: {e}[/red]")
|
|
119
|
+
raise typer.Exit(1)
|
|
120
|
+
|
|
121
|
+
b = data.get("budget", {})
|
|
122
|
+
u = data.get("used", {})
|
|
123
|
+
a = data.get("available", {})
|
|
124
|
+
|
|
125
|
+
console.print(f"\n[bold]Agent Resource Budget[/bold] ({data.get('plan_id', '')})")
|
|
126
|
+
console.print(f" Agents: {u.get('agents', 0)}/{b.get('max_agents', 0)} ({a.get('agents', 0)} available)")
|
|
127
|
+
console.print(f" CPU: {u.get('cpu', 0)}/{b.get('total_cpu', 0)} cores ({a.get('cpu', 0)} available)")
|
|
128
|
+
console.print(f" Memory: {u.get('memory', 0)}/{b.get('total_memory', 0)} GB ({a.get('memory', 0)} available)")
|
|
129
|
+
|
|
130
|
+
presets = data.get("size_presets", {})
|
|
131
|
+
if presets:
|
|
132
|
+
console.print("\n[bold]Size Presets:[/bold]")
|
|
133
|
+
for name, spec in presets.items():
|
|
134
|
+
console.print(f" {name:8s} — {spec['cpu']} CPU, {spec['memory']} GB")
|
|
135
|
+
console.print()
|
|
136
|
+
|
|
137
|
+
|
|
110
138
|
@app.command("create")
|
|
111
139
|
def create(
|
|
140
|
+
name: str = typer.Option("agent", "--name", "-n", help="Agent name"),
|
|
141
|
+
size: str = typer.Option(None, "--size", "-s", help="Size preset: small, medium, large"),
|
|
142
|
+
cpu: int = typer.Option(None, "--cpu", help="Custom CPU in cores"),
|
|
143
|
+
memory: int = typer.Option(None, "--memory", help="Custom memory in GB"),
|
|
144
|
+
no_start: bool = typer.Option(False, "--no-start", help="Create without starting"),
|
|
112
145
|
wait: bool = typer.Option(True, "--wait/--no-wait", help="Wait for pod to be running"),
|
|
113
146
|
):
|
|
114
147
|
"""Create a new OpenClaw agent pod."""
|
|
@@ -117,7 +150,7 @@ def create(
|
|
|
117
150
|
console.print("\n[bold]Creating agent pod...[/bold]")
|
|
118
151
|
|
|
119
152
|
try:
|
|
120
|
-
pod = agents.create()
|
|
153
|
+
pod = agents.create(name=name, size=size, cpu=cpu, memory=memory, start=not no_start)
|
|
121
154
|
except Exception as e:
|
|
122
155
|
console.print(f"[red]❌ Create failed: {e}[/red]")
|
|
123
156
|
raise typer.Exit(1)
|
|
@@ -125,7 +158,8 @@ def create(
|
|
|
125
158
|
_save_pod_state(pod)
|
|
126
159
|
|
|
127
160
|
console.print(f"[green]✓[/green] Agent created: [bold]{pod.id[:12]}[/bold]")
|
|
128
|
-
console.print(f"
|
|
161
|
+
console.print(f" Name: {pod.name or pod.pod_name}")
|
|
162
|
+
console.print(f" Size: {pod.cpu} CPU, {pod.memory} GB")
|
|
129
163
|
console.print(f" State: {pod.state}")
|
|
130
164
|
console.print(f" Desktop: {pod.vnc_url}")
|
|
131
165
|
console.print(f" Shell: {pod.shell_url}")
|
|
@@ -186,7 +220,8 @@ def list_agents(
|
|
|
186
220
|
|
|
187
221
|
table = Table(title="Agents")
|
|
188
222
|
table.add_column("ID", style="cyan", no_wrap=True)
|
|
189
|
-
table.add_column("
|
|
223
|
+
table.add_column("Name", style="blue")
|
|
224
|
+
table.add_column("Size")
|
|
190
225
|
table.add_column("State")
|
|
191
226
|
table.add_column("Desktop URL")
|
|
192
227
|
table.add_column("Created")
|
|
@@ -194,9 +229,11 @@ def list_agents(
|
|
|
194
229
|
for pod in pods:
|
|
195
230
|
style = {"running": "green", "pending": "yellow", "starting": "yellow"}.get(pod.state, "red")
|
|
196
231
|
created = pod.created_at.strftime("%Y-%m-%d %H:%M") if pod.created_at else ""
|
|
232
|
+
size_str = f"{pod.cpu}c/{pod.memory}G" if pod.cpu else ""
|
|
197
233
|
table.add_row(
|
|
198
234
|
pod.id[:12],
|
|
199
|
-
pod.pod_name or "",
|
|
235
|
+
pod.name or pod.pod_name or "",
|
|
236
|
+
size_str,
|
|
200
237
|
f"[{style}]{pod.state}[/{style}]",
|
|
201
238
|
pod.vnc_url or "",
|
|
202
239
|
created,
|
|
@@ -225,7 +262,9 @@ def status(
|
|
|
225
262
|
_save_pod_state(pod)
|
|
226
263
|
|
|
227
264
|
console.print(f"\n[bold]Agent {pod.id[:12]}[/bold]")
|
|
265
|
+
console.print(f" Name: {pod.name or pod.pod_name}")
|
|
228
266
|
console.print(f" Pod: {pod.pod_name}")
|
|
267
|
+
console.print(f" Size: {pod.cpu} CPU, {pod.memory} GB")
|
|
229
268
|
console.print(f" State: {pod.state}")
|
|
230
269
|
console.print(f" Desktop: {pod.vnc_url}")
|
|
231
270
|
console.print(f" Shell: {pod.shell_url}")
|
|
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
|