jarvislabs
CLI and Python SDK for managing GPU instances on JarvisLabs.ai.
See the docs on Jarvislabs Docs
Installation
As a CLI tool (recommended)
uv tool install jarvislabs
To upgrade:
uv tool upgrade jarvislabs
As a library
pip install jarvislabs
Or with uv:
uv pip install jarvislabs
Requires Python 3.10+.
Authentication
Get your API key at jarvislabs.ai/settings/api-keys.
jl setup
Or set an environment variable:
export JL_API_KEY="your_api_key"
CLI Quick Start
# See available GPUs and pricing
jl gpus
# See available CPU VM sizes and pricing
jl cpus
# Create a container instance (pre-configured with PyTorch, Jupyter, IDE)
jl create --gpu A100 --name "my-instance"
# Create a VM instance (bare-metal SSH access)
jl create --gpu A100-80GB --vm --name "my-vm"
# Create an instance and expose a custom HTTP port
jl create --gpu L4 --http-ports 7860
# SSH into it
jl ssh <machine_id>
# Pause when done (stops compute billing, data persists)
jl pause <machine_id>
# Resume later — optionally with different hardware
jl resume <machine_id> --gpu H100
# Destroy when no longer needed
jl destroy <machine_id>
Managed Runs
Run scripts on GPU instances without manual setup. Code is uploaded, a virtual environment is created (with template packages like torch visible by default), and logs are tracked automatically.
For humans, the default mode stays attached to the run, streams logs, and can auto-pause or auto-destroy the instance after the run finishes. For agents, --json is meant for detached workflows and returns immediately, so use --keep and have the agent pause or destroy the instance after the run.
# Run a training script on a fresh GPU (instance auto-pauses when done)
jl run train.py --gpu L4
# Start a long-running web app on a fresh GPU and expose port 8000
jl run app.py --gpu L4 --http-ports 8000 --keep --no-follow
# Pass script arguments
jl run train.py --gpu L4 -- --epochs 50 --lr 0.001
# Sync a project directory and run a script inside it
jl run . --script train.py --gpu A100 --requirements requirements.txt
# Run on an existing instance
jl run train.py --on <machine_id>
# Check on a run
jl run logs <run_id> --follow
jl run status <run_id>
jl run stop <run_id>
More Commands
jl status # Account info and balance
jl cpus # CPU VM availability and pricing
jl templates # Available framework templates
jl list # List all instances
jl exec <id> -- nvidia-smi # Run a command remotely
jl upload <id> ./data # Upload files
jl download <id> /home/results.csv # Download files
jl ssh-key add ~/.ssh/id_ed25519.pub --name "my-key"
jl scripts add ./setup.sh --name "install-deps"
jl filesystem create --name "datasets" --storage 200
jl vpc create my-net --cidr 10.50.0.0/24 --region IN1
jl get <id> # Shows Jupyter + exposed port URLs
Every command supports --help, --json (machine-readable output), and --yes (skip confirmations).
Python SDK
from jarvislabs import Client
with Client() as client:
# Create a GPU instance (blocks until running)
inst = client.instances.create(gpu_type="A100", name="my-run")
print(f"SSH: {inst.ssh_command}")
print(f"URL: {inst.url}")
# When done
client.instances.pause(inst.machine_id)
from jarvislabs import Client
with Client() as client:
# List and filter instances
running = [i for i in client.instances.list() if i.status == "Running"]
# Check GPU availability and pricing
for gpu in client.account.gpu_availability():
print(f"{gpu.gpu_type}: {gpu.num_free_devices} free, ${gpu.price_per_hour}/hr")
# Manage filesystems
fs_id = client.filesystems.create(fs_name="data", storage=100)
# Manage startup scripts
client.scripts.add(script="#!/bin/bash\npip install wandb", name="setup")
VPCs (private networking for VMs)
VMs in supported regions get a private IP inside a VPC, so they can talk to each other privately. A VM and its VPC must be in the same region. Containers do not support VPCs.
jl vpc list # All your VPCs (every region)
jl vpc create my-net --cidr 10.50.0.0/24 --region IN1
jl vpc ips <vpc-id> # Private IPs and the machines holding them
jl create --gpu A100-80GB --vm --vpc-id <vpc-id> # Launch a VM into a VPC
jl resume <machine-id> --vpc-id <vpc-id> # Move a paused VM into another VPC
jl vpc delete <vpc-id> # Delete an empty VPC
from jarvislabs import Client
with Client() as client:
vpc = client.vpcs.create(name="my-net", cidr="10.50.0.0/24", region="IN1")
vm = client.instances.create(gpu_type="A100-80GB", template="vm", vpc_id=vpc.vpc_id)
print(vm.private_ip)
for ip in client.vpcs.ips(vpc.vpc_id):
print(ip.private_ip, ip.machine_id)
Development
uv pip install -e ".[dev]"
uv run ruff format . && uv run ruff check --fix .
uv run pytest
License
Metadata
Release files for jarvislabs 0.2.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jarvislabs-0.2.17.tar.gz | 71.2 kB | Without provenance | Details for jarvislabs-0.2.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jarvislabs-0.2.17-py3-none-any.whl | Python 3 | none | any | Details for jarvislabs-0.2.17-py3-none-any.whl |
Total release size: 155.5 kB
Release files / jarvislabs-0.2.17.tar.gz
| Download URL | jarvislabs-0.2.17.tar.gz |
|---|---|
| Size | 71.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d70a4ffac13c02ba5919bb6eaba0dda206d8a3cb1d6914d6538bd008d18d100d
|
|
BLAKE2b-256 checksum How to use checksums |
ab3d7499a6978431c4dca2c0ea32cc002b9ee2f31c7994972cfd836ca76df35c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Release files / jarvislabs-0.2.17-py3-none-any.whl
| Download URL | jarvislabs-0.2.17-py3-none-any.whl |
|---|---|
| Size | 84.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7a826a4b2dc9f4f71dcf641e408cc88b4cac6493bab3de1d6f93e308535b6b9
|
|
BLAKE2b-256 checksum How to use checksums |
b852407525a16eaa25f119fb5c089afc133405259ef7dc3d35c9df9ba2172497
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Security for jarvislabs 0.2.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.