Prime Intellect CLI + SDK
Project description
Prime Intellect CLI & SDKs
Command line interface and SDKs for managing Prime Intellect GPU resources, sandboxes, and environments.
Overview
Prime is the official CLI and Python SDK for Prime Intellect, providing seamless access to GPU compute infrastructure, remote code execution environments (sandboxes), and AI inference capabilities.
What can you do with Prime?
- Deploy GPU pods with H100, A100, and other high-performance GPUs
- Create and manage isolated sandbox environments for running code
- Access hundreds of pre-configured development environments
- SSH directly into your compute instances
- Manage team resources and permissions
- Run OpenAI-compatible inference requests
Installation
Using uv (recommended)
First, install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
Then install prime:
uv tool install prime
Using pip
pip install prime
Quick Start
Authentication
# Interactive login (recommended)
prime login
# Or set API key directly
prime config set-api-key
# Or use environment variable
export PRIME_API_KEY="your-api-key-here"
Get your API key from the Prime Intellect Dashboard.
Basic Usage
# Browse environments on the hub
prime env list
# List available GPUs
prime availability list
# Create a GPU pod
prime pods create --gpu A100 --count 1
# SSH into a pod
prime pods ssh <pod-id>
# Create a sandbox
prime sandbox create python:3.11
Features
Environments Hub
Access hundreds of RL environments on our community hub with deep integrations with sandboxes, training, and evaluation stack.
# Browse available environments
prime env list
# View environment details
prime env info <environment-name>
# Install an environment locally
prime env install <environment-name>
# Create and push your own environment
prime env init my-environment
prime env push my-environment
Environments provide pre-configured setups for machine learning, data science, and development workflows, tested and verified by the Prime Intellect community.
GPU Pod Management
Deploy and manage GPU compute instances:
# Browse available configurations
prime availability list --gpu-type H100_80GB
# Create a pod with specific configuration
prime pods create --id <config-id> --name my-training-pod
# Monitor pod status
prime pods status <pod-id>
# SSH access
prime pods ssh <pod-id>
# Terminate when done
prime pods terminate <pod-id>
Sandboxes
Isolated environments for running code remotely:
# Create a sandbox
prime sandbox create python:3.11
# List sandboxes
prime sandbox list
# Execute commands
prime sandbox exec <sandbox-id> "python script.py"
# Upload/download files
prime sandbox upload <sandbox-id> local_file.py /remote/path/
prime sandbox download <sandbox-id> /remote/file.txt ./local/
# Clean up
prime sandbox delete <sandbox-id>
Team Management
Manage resources across team contexts:
# List your teams
prime teams list
# Set team context
prime config set-team-id <team-id>
# All subsequent commands use team context
prime pods list # Shows team's pods
Configuration
API Key
Multiple ways to configure your API key:
# Option 1: Interactive (hides input)
prime config set-api-key
# Option 2: Direct
prime config set-api-key YOUR_API_KEY
# Option 3: Environment variable
export PRIME_API_KEY="your-api-key"
Configuration priority: CLI config > Environment variable
SSH Key
Configure SSH key for pod access:
prime config set-ssh-key-path ~/.ssh/id_rsa.pub
View Configuration
prime config view
Python SDK
Prime also provides a Python SDK for programmatic access:
from prime_sandboxes import APIClient, SandboxClient, CreateSandboxRequest
# Initialize client
client = APIClient(api_key="your-api-key")
sandbox_client = SandboxClient(client)
# Create a sandbox
sandbox = sandbox_client.create(CreateSandboxRequest(
name="my-sandbox",
docker_image="python:3.11-slim",
cpu_cores=2,
memory_gb=4,
))
# Wait for creation
sandbox_client.wait_for_creation(sandbox.id)
# Execute commands
result = sandbox_client.execute_command(sandbox.id, "python --version")
print(result.stdout)
# Clean up
sandbox_client.delete(sandbox.id)
Async SDK
import asyncio
from prime_sandboxes import AsyncSandboxClient, CreateSandboxRequest
async def main():
async with AsyncSandboxClient(api_key="your-api-key") as client:
sandbox = await client.create(CreateSandboxRequest(
name="async-sandbox",
docker_image="python:3.11-slim",
))
await client.wait_for_creation(sandbox.id)
result = await client.execute_command(sandbox.id, "echo 'Hello'")
print(result.stdout)
await client.delete(sandbox.id)
asyncio.run(main())
Use Cases
Machine Learning Training
# Deploy a pod with 8x H100 GPUs
prime pods create --gpu H100 --count 8 --name ml-training
# SSH and start training
prime pods ssh <pod-id>
Support & Resources
- Documentation: github.com/PrimeIntellect-ai/prime-cli
- Dashboard: app.primeintellect.ai
- API Docs: api.primeintellect.ai/docs
- Discord: discord.gg/primeintellect
- Website: primeintellect.ai
Related Packages
- prime-sandboxes - Lightweight SDK for sandboxes only (if you don't need the full CLI)
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prime-0.5.29.tar.gz.
File metadata
- Download URL: prime-0.5.29.tar.gz
- Upload date:
- Size: 268.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ff874e0f5cb5db4ee12915df9abfebbc0383918d5a871748f05ec4cbbb526c3
|
|
| MD5 |
8fa230916cd9e920ca602c48bd43a569
|
|
| BLAKE2b-256 |
a485eea6f26b5b318c8c0a3d02c6e1574fc4284879da8d1fa9031cd8065c1abd
|
File details
Details for the file prime-0.5.29-py3-none-any.whl.
File metadata
- Download URL: prime-0.5.29-py3-none-any.whl
- Upload date:
- Size: 122.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41934c80b7c6350ae462f6a3599a03c0c9f84b1c4e77dcbb2a8515f2903a1d55
|
|
| MD5 |
7b078b28099387a63bca11a166d7a48a
|
|
| BLAKE2b-256 |
f3b9db0291e22f432017efbd22daa54707d1dd40a118a33a2d39eddf4b7ac924
|