Skip to content

Commit 91999a8

Browse files
authored
mention prime login cmd in docs (#39)
* mention prime login cmd in docs
1 parent 5ebb23f commit 91999a8

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Command line interface for managing Prime Intellect GPU resources, enabling seam
1515
# Install from PyPI
1616
pip install prime-cli
1717

18-
# Set up your API key
19-
prime config set-api-key
18+
# Authenticate
19+
prime login
2020

2121
# List available GPU resources
2222
prime availability list

src/prime_cli/api/client.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ def __init__(self, api_key: Optional[str] = None):
3232
self.api_key = api_key or self.config.api_key
3333
if not self.api_key:
3434
raise APIError(
35-
"No API key configured. ",
36-
"Run 'prime config set-api-key' or set PRIME_API_KEY",
35+
"No API key configured. Use command 'prime login' to configure your API key.",
3736
)
3837

3938
# Setup client
@@ -73,9 +72,9 @@ def request(
7372
if e.response.status_code == 401:
7473
raise UnauthorizedError(
7574
"API key unauthorized. ",
76-
"Please check that your API key has the correct permissions "
77-
"or generate a new one at ",
78-
"https://app.primeintellect.ai/dashboard/tokens",
75+
"Please check that your API key has the correct permissions, "
76+
"generate a new one at https://app.primeintellect.ai/dashboard/tokens, "
77+
"or run 'prime login' to configure a new API key.",
7978
)
8079
if e.response.status_code == 402:
8180
raise PaymentRequiredError(

src/prime_cli/commands/pods.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ def select_provider_from_configs(
469469
gpu_name = selected_gpu.gpu_type.lower().split("_")[0]
470470
default_name = f"{gpu_name}-{selected_gpu.gpu_count}"
471471
name = typer.prompt(
472-
"Pod name (alphanumeric and dashes only, must contain at least " "1 letter)",
472+
"Pod name (alphanumeric and dashes only, must contain at least 1 letter)",
473473
default=default_name,
474474
)
475475
if (
@@ -519,7 +519,7 @@ def select_provider_from_configs(
519519
)
520520
if vcpus is None or vcpus < min_vcpus or vcpus > max_vcpus:
521521
console.print(
522-
f"[red]vCPU count must be between {min_vcpus} and " f"{max_vcpus}[/red]"
522+
f"[red]vCPU count must be between {min_vcpus} and {max_vcpus}[/red]"
523523
)
524524
raise typer.Exit(1)
525525

@@ -538,7 +538,7 @@ def select_provider_from_configs(
538538
)
539539
if memory is None or memory < min_memory or memory > max_memory:
540540
console.print(
541-
f"[red]Memory must be between {min_memory}GB and " f"{max_memory}GB[/red]"
541+
f"[red]Memory must be between {min_memory}GB and {max_memory}GB[/red]"
542542
)
543543
raise typer.Exit(1)
544544

@@ -641,11 +641,11 @@ def select_provider_from_configs(
641641

642642
console.print(f"\n[green]Successfully created pod {pod.id}[/green]")
643643
console.print(
644-
f"\n[blue]Use 'prime pods status {pod.id}' to check the pod " "status[/blue]"
644+
f"\n[blue]Use 'prime pods status {pod.id}' to check the pod status[/blue]"
645645
)
646646
except AttributeError:
647647
console.print(
648-
"[red]Error: Failed to create pod - invalid API client " "configuration[/red]"
648+
"[red]Error: Failed to create pod - invalid API client configuration[/red]"
649649
)
650650
raise typer.Exit(1)
651651
else:

0 commit comments

Comments
 (0)