prime


Nameprime JSON
Version 0.3.20 PyPI version JSON
download
home_pageNone
SummaryPrime Intellect CLI + SDK
upload_time2025-08-24 12:12:54
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.11
licenseNone
keywords cli cloud compute gpu
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <picture>
    <source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/40c36e38-c5bd-4c5a-9cb3-f7b902cd155d">
    <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/6414bc9b-126b-41ca-9307-9e982430cde8">
    <img alt="Prime Intellect" src="https://github.com/user-attachments/assets/6414bc9b-126b-41ca-9307-9e982430cde8" width="312" style="max-width: 100%;">
  </picture>
</p>

---

<h3 align="center">
Prime Intellect CLI
</h3>

---

<div align="center">

[![PyPI version](https://img.shields.io/pypi/v/prime?cacheSeconds=60)](https://pypi.org/project/prime/)
[![Python versions](https://img.shields.io/pypi/pyversions/prime?cacheSeconds=60)](https://pypi.org/project/prime/)
[![Downloads](https://img.shields.io/pypi/dm/prime)](https://pypi.org/project/prime/)

Command line interface for managing Prime Intellect resources and environments.
</div>

## 🚀 Quick Start

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

# Install prime with uv
uv tool install prime

# Authenticate 
prime login 

# List available GPU resources
prime availability list
```

## 🔧 Features

- **GPU Resource Management**: Query and filter available GPU resources
- **Pod Management**: Create, monitor, and terminate compute pods
- **SSH Access**: Direct SSH access to running pods
- **Team Support**: Manage resources across team environments

## 📦 Installation

### Recommended: Using uv
```bash
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install prime
uv tool install prime
```

### Alternative: Using pip
```bash
# If you prefer traditional pip
pip install prime
```

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

# Create virtual environment with uv
uv venv

# Install in development mode with all dependencies
uv pip install -e ".[dev]"

# Set up pre-commit hooks
pre-commit install
```

## 🛠️ Usage

### Configuration

#### API Key Setup (Multiple Options)

```bash
# Option 1: Interactive mode (recommended - hides input)
prime config set-api-key

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

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

#### Other Configuration
```bash
# Configure SSH key for pod access
prime config set-ssh-key-path

# Set base URL (interactive or non-interactive)
prime config set-base-url
prime config set-base-url https://api.primeintellect.ai

# Set frontend URL (interactive or non-interactive)  
prime config set-frontend-url
prime config set-frontend-url https://app.primeintellect.ai

# View current configuration
prime config view
```

**Security Note**: When using the non-interactive mode, be aware that the API key may be visible in your shell history. For enhanced security:
- Use the interactive mode (no arguments) which hides your input
- Use environment variables (`PRIME_API_KEY`) as fallback if no CLI config is set
- Clear your shell history after setting sensitive values

**Configuration Priority**: CLI config takes precedence over environment variables. If you set an API key via `prime auth login`, it will override any `PRIME_API_KEY` environment variable.

### Environment Management
```bash
# Save current config as an environment (includes API key)
prime config save develop

# Switch between environments
prime config use production
prime config use develop

# List available environments
prime config envs
```

### GPU Resources
```bash
# 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
```bash
# 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
```bash
# Set team context
prime config set-team-id
```

### Working Without uv

While we recommend using uv for the best experience, all commands work with standard pip:

```bash
# Install without uv
pip install prime

# Development setup without uv
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
```

Note: Without uv, operations will be slower and you'll need to manage virtual environments manually.

## 🔐 Security Best Practices

### API Key Management
1. **Never commit API keys to version control**
2. **Use environment variables for automation**:
   ```bash
   export PRIME_API_KEY="your-api-key-here"
   prime pods list  # Will use the environment variable
   ```
3. **Use interactive mode for one-time setup**:
   ```bash
   prime config set-api-key  # Prompts securely without showing input
   ```
4. **For CI/CD pipelines**, use secrets management:
   - GitHub Actions: Use repository secrets
   - GitLab CI: Use CI/CD variables
   - Jenkins: Use credentials plugin

### Secure Storage
- API keys are stored in `~/.prime/config.json` with user-only permissions
- Environment variables take precedence over stored configuration
- Consider using a password manager for long-term API key storage

## 💻 Development

### Prerequisites
- Python 3.11+
- uv (recommended): `curl -LsSf https://astral.sh/uv/install.sh | sh`

### Setup
```bash
# Clone and setup with uv
git clone https://github.com/PrimeIntellect-ai/prime-cli
cd prime-cli
uv venv
uv pip install -e ".[dev]"

# Run code quality checks
uv run ruff format src/prime_cli
uv run ruff check src/prime_cli
uv run mypy src/prime_cli
uv run pytest
```

### Code Quality
```bash
# Format code
uv run ruff format src/prime_cli

# Run linter
uv run ruff check src/prime_cli

# Run tests
uv run pytest

# Or if you have the venv activated:
ruff format src/prime_cli
ruff check src/prime_cli
pytest
```

### Release Process
We use semantic versioning. Releases are automatically created when changes are merged to main.

## 🤝 Contributing

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Set up development environment with uv:
   ```bash
   uv venv
   uv pip install -e ".[dev]"
   pre-commit install
   ```
4. Set up your development environment:
   ```bash
   # Save your local development config
   prime config set-base-url http://localhost:8000
   prime config set-frontend-url http://localhost:3000
   prime config save local
   
   # Switch between environments as needed
   prime config use local       # For development
   prime config use production  # For testing against prod
   ```
5. Run code quality checks:
   ```bash
   uv run ruff format .
   uv run ruff check .
   uv run pytest
   ```
6. Commit your changes (`git commit -m 'Add amazing feature'`)
7. Push to the branch (`git push origin feature/amazing-feature`)
8. Open a Pull Request

## 📝 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🔗 Links

- [Documentation](https://docs.primeintellect.ai)
- [PyPI Package](https://pypi.org/project/prime/)
- [Issue Tracker](https://github.com/PrimeIntellect-ai/prime-cli/issues)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "prime",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.11",
    "maintainer_email": null,
    "keywords": "cli, cloud, compute, gpu",
    "author": null,
    "author_email": "Prime Intellect <contact@primeintellect.ai>",
    "download_url": "https://files.pythonhosted.org/packages/34/13/37f3a5498256c6131c60ae88b5c332bc66a8af923c6edd23842dd8397124/prime-0.3.20.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/user-attachments/assets/40c36e38-c5bd-4c5a-9cb3-f7b902cd155d\">\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/user-attachments/assets/6414bc9b-126b-41ca-9307-9e982430cde8\">\n    <img alt=\"Prime Intellect\" src=\"https://github.com/user-attachments/assets/6414bc9b-126b-41ca-9307-9e982430cde8\" width=\"312\" style=\"max-width: 100%;\">\n  </picture>\n</p>\n\n---\n\n<h3 align=\"center\">\nPrime Intellect CLI\n</h3>\n\n---\n\n<div align=\"center\">\n\n[![PyPI version](https://img.shields.io/pypi/v/prime?cacheSeconds=60)](https://pypi.org/project/prime/)\n[![Python versions](https://img.shields.io/pypi/pyversions/prime?cacheSeconds=60)](https://pypi.org/project/prime/)\n[![Downloads](https://img.shields.io/pypi/dm/prime)](https://pypi.org/project/prime/)\n\nCommand line interface for managing Prime Intellect resources and environments.\n</div>\n\n## \ud83d\ude80 Quick Start\n\n```bash\n# Install uv (if not already installed)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Install prime with uv\nuv tool install prime\n\n# Authenticate \nprime login \n\n# List available GPU resources\nprime availability list\n```\n\n## \ud83d\udd27 Features\n\n- **GPU Resource Management**: Query and filter available GPU resources\n- **Pod Management**: Create, monitor, and terminate compute pods\n- **SSH Access**: Direct SSH access to running pods\n- **Team Support**: Manage resources across team environments\n\n## \ud83d\udce6 Installation\n\n### Recommended: Using uv\n```bash\n# Install uv if you haven't already\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n\n# Install prime\nuv tool install prime\n```\n\n### Alternative: Using pip\n```bash\n# If you prefer traditional pip\npip install prime\n```\n\n### For Development\n```bash\n# Clone the repository\ngit clone https://github.com/PrimeIntellect-ai/prime-cli\ncd prime-cli\n\n# Create virtual environment with uv\nuv venv\n\n# Install in development mode with all dependencies\nuv pip install -e \".[dev]\"\n\n# Set up pre-commit hooks\npre-commit install\n```\n\n## \ud83d\udee0\ufe0f Usage\n\n### Configuration\n\n#### API Key Setup (Multiple Options)\n\n```bash\n# Option 1: Interactive mode (recommended - hides input)\nprime config set-api-key\n\n# Option 2: Non-interactive mode (for automation)\nprime config set-api-key YOUR_API_KEY\n\n# Option 3: Environment variable (most secure for scripts)\nexport PRIME_API_KEY=\"your-api-key-here\"\n```\n\n#### Other Configuration\n```bash\n# Configure SSH key for pod access\nprime config set-ssh-key-path\n\n# Set base URL (interactive or non-interactive)\nprime config set-base-url\nprime config set-base-url https://api.primeintellect.ai\n\n# Set frontend URL (interactive or non-interactive)  \nprime config set-frontend-url\nprime config set-frontend-url https://app.primeintellect.ai\n\n# View current configuration\nprime config view\n```\n\n**Security Note**: When using the non-interactive mode, be aware that the API key may be visible in your shell history. For enhanced security:\n- Use the interactive mode (no arguments) which hides your input\n- Use environment variables (`PRIME_API_KEY`) as fallback if no CLI config is set\n- Clear your shell history after setting sensitive values\n\n**Configuration Priority**: CLI config takes precedence over environment variables. If you set an API key via `prime auth login`, it will override any `PRIME_API_KEY` environment variable.\n\n### Environment Management\n```bash\n# Save current config as an environment (includes API key)\nprime config save develop\n\n# Switch between environments\nprime config use production\nprime config use develop\n\n# List available environments\nprime config envs\n```\n\n### GPU Resources\n```bash\n# List all available GPUs\nprime availability list\n\n# Filter by GPU type\nprime availability list --gpu-type H100_80GB\n\n# Show available GPU types\nprime availability gpu-types\n```\n\n### Pod Management\n```bash\n# List your pods\nprime pods list\n\n# Create a pod\nprime pods create\nprime pods create --id <ID>     # With specific GPU config\nprime pods create --name my-pod # With custom name\n\n# Monitor and manage pods\nprime pods status <pod-id>\nprime pods terminate <pod-id>\nprime pods ssh <pod-id>\n```\n\n### Team Management\n```bash\n# Set team context\nprime config set-team-id\n```\n\n### Working Without uv\n\nWhile we recommend using uv for the best experience, all commands work with standard pip:\n\n```bash\n# Install without uv\npip install prime\n\n# Development setup without uv\npython -m venv .venv\nsource .venv/bin/activate\npip install -e \".[dev]\"\n```\n\nNote: Without uv, operations will be slower and you'll need to manage virtual environments manually.\n\n## \ud83d\udd10 Security Best Practices\n\n### API Key Management\n1. **Never commit API keys to version control**\n2. **Use environment variables for automation**:\n   ```bash\n   export PRIME_API_KEY=\"your-api-key-here\"\n   prime pods list  # Will use the environment variable\n   ```\n3. **Use interactive mode for one-time setup**:\n   ```bash\n   prime config set-api-key  # Prompts securely without showing input\n   ```\n4. **For CI/CD pipelines**, use secrets management:\n   - GitHub Actions: Use repository secrets\n   - GitLab CI: Use CI/CD variables\n   - Jenkins: Use credentials plugin\n\n### Secure Storage\n- API keys are stored in `~/.prime/config.json` with user-only permissions\n- Environment variables take precedence over stored configuration\n- Consider using a password manager for long-term API key storage\n\n## \ud83d\udcbb Development\n\n### Prerequisites\n- Python 3.11+\n- uv (recommended): `curl -LsSf https://astral.sh/uv/install.sh | sh`\n\n### Setup\n```bash\n# Clone and setup with uv\ngit clone https://github.com/PrimeIntellect-ai/prime-cli\ncd prime-cli\nuv venv\nuv pip install -e \".[dev]\"\n\n# Run code quality checks\nuv run ruff format src/prime_cli\nuv run ruff check src/prime_cli\nuv run mypy src/prime_cli\nuv run pytest\n```\n\n### Code Quality\n```bash\n# Format code\nuv run ruff format src/prime_cli\n\n# Run linter\nuv run ruff check src/prime_cli\n\n# Run tests\nuv run pytest\n\n# Or if you have the venv activated:\nruff format src/prime_cli\nruff check src/prime_cli\npytest\n```\n\n### Release Process\nWe use semantic versioning. Releases are automatically created when changes are merged to main.\n\n## \ud83e\udd1d Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Set up development environment with uv:\n   ```bash\n   uv venv\n   uv pip install -e \".[dev]\"\n   pre-commit install\n   ```\n4. Set up your development environment:\n   ```bash\n   # Save your local development config\n   prime config set-base-url http://localhost:8000\n   prime config set-frontend-url http://localhost:3000\n   prime config save local\n   \n   # Switch between environments as needed\n   prime config use local       # For development\n   prime config use production  # For testing against prod\n   ```\n5. Run code quality checks:\n   ```bash\n   uv run ruff format .\n   uv run ruff check .\n   uv run pytest\n   ```\n6. Commit your changes (`git commit -m 'Add amazing feature'`)\n7. Push to the branch (`git push origin feature/amazing-feature`)\n8. Open a Pull Request\n\n## \ud83d\udcdd License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udd17 Links\n\n- [Documentation](https://docs.primeintellect.ai)\n- [PyPI Package](https://pypi.org/project/prime/)\n- [Issue Tracker](https://github.com/PrimeIntellect-ai/prime-cli/issues)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Prime Intellect CLI + SDK",
    "version": "0.3.20",
    "project_urls": {
        "Changelog": "https://github.com/PrimeIntellect-ai/prime-cli/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/PrimeIntellect-ai/prime-cli#readme",
        "Homepage": "https://github.com/PrimeIntellect-ai/prime-cli",
        "Repository": "https://github.com/PrimeIntellect-ai/prime-cli.git"
    },
    "split_keywords": [
        "cli",
        " cloud",
        " compute",
        " gpu"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "383d797216804f32129aca36c90fe64cddd386eba80b7ed904b03f02a6e4146e",
                "md5": "68045252eb93e1014010678b3bf4d54c",
                "sha256": "8f71195fe2f59c86617c5d355f02449480ca9c937b7778e14a176575219e75ae"
            },
            "downloads": -1,
            "filename": "prime-0.3.20-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "68045252eb93e1014010678b3bf4d54c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.11",
            "size": 43157,
            "upload_time": "2025-08-24T12:12:53",
            "upload_time_iso_8601": "2025-08-24T12:12:53.697425Z",
            "url": "https://files.pythonhosted.org/packages/38/3d/797216804f32129aca36c90fe64cddd386eba80b7ed904b03f02a6e4146e/prime-0.3.20-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "341337f3a5498256c6131c60ae88b5c332bc66a8af923c6edd23842dd8397124",
                "md5": "a49076cd686b761b6c74d95f9f11a0f7",
                "sha256": "d8525cd123e1c8eb2ad42fe14f44079e2182bc4be80bf5e79433a8112d79369c"
            },
            "downloads": -1,
            "filename": "prime-0.3.20.tar.gz",
            "has_sig": false,
            "md5_digest": "a49076cd686b761b6c74d95f9f11a0f7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.11",
            "size": 110908,
            "upload_time": "2025-08-24T12:12:54",
            "upload_time_iso_8601": "2025-08-24T12:12:54.908995Z",
            "url": "https://files.pythonhosted.org/packages/34/13/37f3a5498256c6131c60ae88b5c332bc66a8af923c6edd23842dd8397124/prime-0.3.20.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-24 12:12:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PrimeIntellect-ai",
    "github_project": "prime-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "prime"
}
        
Elapsed time: 1.09709s