The Thunder Compute CLI (tnr)

The Thunder Compute CLI enables you to manage Thunder Compute instances from your local machine.

Instance Operations

Create an Instance

Create a new Thunder Compute instance:

tnr create

This creates a new instance with default configuration and automatically assigns an instance ID.

CPU Configuration

Configure custom vCPU count:

tnr create --vcpus <vcpu_count>

We recommend using the default 4 vCPU configuration for most use cases. Additional vCPUs are billed proportionally, with RAM scaling at 4GB per vCPU.

GPU Configuration

Specify a GPU type:

tnr create --gpu <gpu_type>

Available GPU types:

  • t4 (default): NVIDIA T4 (16GB VRAM) - Best for most ML workloads
  • a100: NVIDIA A100 (40GB VRAM) - For large models and high-performance computing
  • a100xl : NVIDIA A100 (80GB VRAM) - For even larger models, the biggest and the best

Each instance includes one GPU by default. Contact support for multi-GPU configurations.

Template Configuration

Create an instance with a predefined environment:

tnr create --template <template_name>

Available templates:

  • ollama: Ollama server environment
  • comfy-ui: ComfyUI for AI image generation
  • webui-forge: WebUI Forge for Stable Diffusion

After instance creation, start the server using <template_name>-start when connected.

Start an Instance

tnr start <instance_ID>

Activates an existing inactive instance.

Stop an Instance

tnr stop <instance_ID>

Stops a running instance.

Delete an Instance

tnr delete <instance_ID>

This action permanently removes an instance and all associated data.

Remote Access and Transfer

Connect to an Instance

Basic connection:

tnr connect <instance_ID>

Connects to a running instance (default ID: 0). Functions as an SSH wrapper - you can also use standard SSH with the IP shown in tnr status.

Port Forwarding

Connect with port forwarding:

tnr connect <instance_ID> -t PORT1 -t PORT2

Features:

  • Forward multiple ports using repeated -t/—tunnel flags
  • Example: tnr connect 0 -t 8000 -t 8080 forwards both ports 8000 and 8080
  • Enables local access to remote web servers, APIs, and services

Copy Files

Transfer files between local and remote instances:

tnr scp <source_path> <destination_path>

Path format:

  • Remote: instance_id:path (e.g., 0:/home/user/data)
  • Local: Standard paths (e.g., ./data or /home/user/file.txt)
  • Must specify exactly one remote and one local path

Examples:

# Upload to instance
tnr scp ./local_file.txt 0:/remote/path/

# Download from instance
tnr scp 0:/remote/file.txt ./local_path/

File transfers have a 60-second connection timeout. SSH key setup, compression, and ~/ expansion are handled automatically.

System Management

Modify Instance

Modify the instance’s vCPU & GPU type or disk size:

tnr modify <instance_ID> \
  --disk-size-gb <new_size_GB> \
  --gpu <new_gpu_type> \
  --vcpus <new_vcpu_count>

All flags are optional, but at least one change must be provided.

You can only modify the vCPU & GPU type of the instance while it’s stopped. You can resize the disk size regardless of the instance’s state. These changes will effect the billing price of the instance.

Storage can only be increased, not decreased. For smaller storage needs, create a new instance.

View Instance Status

List all instances:

tnr status

Monitor status changes:

tnr status --wait

Account Management

Login

tnr login

Generates and saves an API token to ~/.thunder/token

Logout

tnr logout

Removes the stored API token.

API Token Management

  • Generate/manage tokens: console
  • Tokens never expire but can be revoked
  • Use unique tokens per device