Metadata-Version: 2.4
Name: terradev-cli
Version: 1.2.0
Summary: Real multi-cloud GPU arbitrage — provision across 9 clouds in parallel
Home-page: https://github.com/terradev/terradev-cli
Author: Terradev Team
Author-email: Terradev Team <team@terradev.com>
Maintainer-email: Terradev Team <team@terradev.com>
License: MIT
Project-URL: Homepage, https://terradev.com
Project-URL: Documentation, https://docs.terradev.com
Project-URL: Repository, https://github.com/terradev/terradev
Project-URL: Bug Tracker, https://github.com/terradev/terradev/issues
Project-URL: Changelog, https://github.com/terradev/terradev/blob/main/CHANGELOG.md
Keywords: cloud,provisioning,gpu,compute,multi-cloud,aws,gcp,azure,kubernetes,devops,infrastructure,automation,cost-optimization,parallel,egress,rate-limiting,arbitrage
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Natural Language :: English
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0.0
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: aws
Requires-Dist: boto3>=1.34.0; extra == "aws"
Provides-Extra: gcp
Requires-Dist: google-cloud-compute>=1.8.0; extra == "gcp"
Provides-Extra: azure
Requires-Dist: azure-mgmt-compute>=29.0.0; extra == "azure"
Requires-Dist: azure-identity>=1.12.0; extra == "azure"
Provides-Extra: all
Requires-Dist: boto3>=1.34.0; extra == "all"
Requires-Dist: google-cloud-compute>=1.8.0; extra == "all"
Requires-Dist: azure-mgmt-compute>=29.0.0; extra == "all"
Requires-Dist: azure-identity>=1.12.0; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: flake8>=5.0.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Terradev

**Terradev** provides real-time GPU price arbitrage across multiple cloud providers, saving developers 30%+ through automatic deployment to the cheapest available GPU instances.

## Overview

Terradev is a cross-cloud GPU arbitrage platform that automatically finds and deploys to the cheapest GPU instances across AWS, GCP, Azure, RunPod, Lambda, and CoreWeave. By leveraging real-time price comparison and spot instance optimization, Terradev helps developers save 30-90% on GPU compute costs while providing seamless integration with popular ML frameworks and datasets.

## Key Features

- **Real-time GPU Arbitrage**: Automatic price comparison across 6 major cloud providers
- **Cost Optimization**: 30-90% savings through spot instance arbitrage
- **Freemium & Paid Tiers**: Flexible pricing for individuals and teams
- **Hugging Face Integration**: Seamless dataset access and preprocessing
- **Multi-Model Support**: LLaMA, GPT-2, BERT, Stable Diffusion, Mistral, and more
- **Usage Tracking**: Comprehensive cost monitoring and budget alerts
- **Auto-Scaling**: Intelligent scaling based on workload demands (paid tier)
- **Data Provenance**: Complete tracking of data lineage and model training (paid tier)

## Pricing Tiers

### Freemium Tier
- ✅ Full cross-cloud arbitrage across 6 providers
- ✅ Single-GPU training instances
- ✅ Supported models: LLaMA, GPT-2, BERT, Stable Diffusion, Mistral
- ✅ Hugging Face dataset access
- ✅ 10 GPU hours per month
- ✅ Cost tracking and budget alerts
- ❌ Multi-GPU deployments
- ❌ Custom model imports
- ❌ Custom dataset imports
- ❌ Auto-scaling
- ❌ Data provenance tracking

### Paid Tier
- ✅ Everything in Freemium, plus:
- ✅ Unlimited GPU hours
- ✅ Multi-GPU and cluster deployments
- ✅ Custom model imports
- ✅ Custom dataset imports (any source)
- ✅ Auto-scaling and load balancing
- ✅ Instance optimization algorithms
- ✅ Data and model provenance tracking
- ✅ Priority support and SLA

## Quick Start

### 1. Basic Arbitrage Setup

```hcl
# Real-time GPU arbitrage across all providers
data "terradev_gpu_price" "global" {
  providers = ["aws", "gcp", "azure", "runpod", "lambda", "coreweave"]
  gpu_types = ["a100", "h100", "a10g"]
  spot_only = true
}

# Deploy to cheapest available GPU
module "spot_cluster" {
  source  = "terradev/arbitrage"
  gpu_type = data.terradev_gpu_price.global.cheapest.type
  provider = data.terradev_gpu_price.global.cheapest.cloud
  spot_only = true  # 70-90% savings
}

# Hugging Face dataset integration
module "hf_dataset" {
  source = "huggingface/datasets"
  dataset = "coco"  # Auto-import
}
```

### 2. CLI Usage

```bash
# Find cheapest GPU for your requirements
python scripts/arbitrage-engine.py --user-id user123 --tier freemium --gpu-type a100 --hours 2

# Track costs and usage
python scripts/cost-tracker.py --user-id user123 --action usage

# Check budget alerts
python scripts/cost-tracker.py --user-id user123 --action alerts
```

### 3. Installation

```bash
# Clone repository
git clone https://github.com/terradev/terradev.git
cd terradev

# Install dependencies
pip install -r requirements.txt

# Configure cloud credentials
aws configure
gcloud auth login
az login

# Initialize Terraform
terraform init
terraform plan
terraform apply
```

## Project Structure

```
terradev/
├── modules/
│   ├── arbitrage/           # GPU price arbitrage engine
│   ├── tier-management/     # Freemium/paid tier controls
│   ├── huggingface/         # Hugging Face dataset integration
│   ├── gpu-compute/         # GPU instance provisioning
│   ├── data-feeds/          # Custom data source integration
│   ├── storage/             # Storage configurations
│   └── cost-tracking/       # Usage monitoring and alerts
├── scripts/
│   ├── arbitrage-engine.py  # Real-time arbitrage engine
│   ├── cost-tracker.py      # Cost tracking and monitoring
│   ├── query-gpu.py         # GPU instance management
│   └── data-manager.py      # Data feed management
├── examples/
│   ├── arbitrage-example.tf # Complete arbitrage deployment
│   ├── ml-training/         # ML training workloads
│   ├── data-processing/     # Data processing pipelines
│   └── research/            # Scientific computing
└── docs/
    ├── providers/           # Cloud provider guides
    ├── pricing/             # Pricing and arbitrage info
    └── data-feeds/          # Data feed documentation
```

## Supported Cloud Providers

| Provider | GPU Types | Spot Savings | Regions |
|----------|-----------|-------------|---------|
| **AWS** | A100, H100, A10G, RTX 4090 | 70-90% | Global |
| **Google Cloud** | A100, H100, L4, T4 | 60-80% | Global |
| **Azure** | A100, H100, ND A100 v4 | 65-85% | Global |
| **RunPod** | A100, H100, RTX 4090 | 50-70% | Global |
| **Lambda Labs** | A100, H100, RTX 3090 | 40-60% | US/EU |
| **CoreWeave** | A100, H100, RTX 4090 | 45-65% | US/EU |

## Supported Models

### Freemium Tier
- **LLaMA**: 7B, 13B, 70B variants
- **GPT-2**: Small, Medium, Large, XL
- **BERT**: Base, Large variants
- **Stable Diffusion**: v1.5, v2.1
- **Mistral**: 7B, 7B-Instruct

### Paid Tier
- All Freemium models plus:
- Custom model imports
- Fine-tuned variants
- Proprietary models
- Custom architectures

## Supported Datasets

### Hugging Face (Freemium)
- **Computer Vision**: COCO, ImageNet-1K, CIFAR-10/100
- **NLP**: SQuAD, GLUE, WikiText, IMDB
- **Multimodal**: LAION, Conceptual Captions

### Custom Sources (Paid)
- AWS S3 buckets
- Google Cloud Storage
- Azure Blob Storage
- Private data lakes
- Custom APIs and databases

## Cost Savings Examples

| GPU Type | On-Demand | Spot (AWS) | Spot (RunPod) | **Best Price** | **Savings** |
|----------|-----------|------------|---------------|----------------|-------------|
| A100 | $4.06/hr | $1.22/hr | $0.89/hr | **$0.84/hr** | **79%** |
| H100 | $7.20/hr | $2.16/hr | $1.59/hr | **$1.50/hr** | **79%** |
| A10G | $1.21/hr | $0.36/hr | $0.27/hr | **$0.25/hr** | **79%** |

*Prices are illustrative and updated in real-time*

## Requirements

- Terraform >= 1.0
- Cloud provider CLI tools configured
- Python 3.8+ (for query interface)
- Docker (optional, for containerized workloads)

## License

MIT License - see LICENSE file for details
