Skip to content

The Prime Intellect CLI provides a powerful command-line interface for managing GPU resources across various providers

License

Notifications You must be signed in to change notification settings

PrimeIntellect-ai/prime-cli

Repository files navigation

Prime Intellect


Prime Intellect CLI & SDKs


PyPI version Python versions Downloads

Command line interface and SDKs for managing Prime Intellect GPU resources, sandboxes, and environments.

Quick Start

# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install prime
uv tool install prime

# Authenticate
prime login

# Browse verified environments
prime env list

# List available GPU resources
prime availability list

Features

  • Environments - Access hundreds of verified environments on our community hub
  • GPU Resource Management - Query and filter available GPU resources
  • Pod Management - Create, monitor, and terminate compute pods
  • Sandboxes - Easily run AI-generated code in the cloud
  • SSH Access - Direct SSH access to running pods
  • Team Support - Manage resources across team environments

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

Sandboxes SDK Only

If you only need the sandboxes SDK (lightweight, ~50KB):

uv pip install prime-sandboxes

See prime-sandboxes documentation for SDK usage.

Usage

Configuration

API Key Setup

# Interactive mode (recommended - hides input)
prime config set-api-key

# Non-interactive mode (for automation)
prime config set-api-key YOUR_API_KEY

# Environment variable (most secure for scripts)
export PRIME_API_KEY="your-api-key-here"

Other Configuration

# Configure SSH key for pod access
prime config set-ssh-key-path

# View current configuration
prime config view

Security Note: When using non-interactive mode, the API key may be visible in your shell history. For enhanced security, use interactive mode or environment variables.

Environments Hub

Access hundreds of verified 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

GPU Resources

# List all available GPUs
prime availability list

# Filter by GPU type
prime availability list --gpu-type H100_80GB

# Show available GPU types
prime availability gpu-types

Pod Management

# List your pods
prime pods list

# Create a pod
prime pods create
prime pods create --id <ID>     # With specific GPU config
prime pods create --name my-pod # With custom name

# Monitor and manage pods
prime pods status <pod-id>
prime pods terminate <pod-id>
prime pods ssh <pod-id>

Team Management

# List teams
prime teams list

# Set team context
prime config set-team-id

Development

# Clone the repository
git clone https://github.com/PrimeIntellect-ai/prime-cli
cd prime-cli

# Set up workspace (installs all packages in editable mode)
uv sync

# Install CLI globally in editable mode
uv tool install -e packages/prime

# Now you can use the CLI directly
prime --help

# Run tests
uv run pytest packages/prime/tests
uv run pytest packages/prime-sandboxes/tests

All packages (prime-core, prime-sandboxes, prime) are installed in editable mode. Changes to code are immediately reflected.

Releasing

This monorepo contains two independently versioned packages: prime (CLI + full SDK) and prime-sandboxes (lightweight SDK).

Versions are single-sourced from each package's __init__.py file:

  • prime: packages/prime/src/prime_cli/__init__.py
  • prime-sandboxes: packages/prime-sandboxes/src/prime_sandboxes/__init__.py

To release a new version:

  1. Update the __version__ string in the appropriate __init__.py file
  2. Commit and push the change

Tagging and publishing to PyPI is handled automatically by CI.

Version sync considerations:

When releasing prime, consider whether prime-sandboxes should also be bumped, as prime depends on prime-sandboxes. The packages can be released independently or together depending on what changed.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Links

About

The Prime Intellect CLI provides a powerful command-line interface for managing GPU resources across various providers

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 15

Languages