Skip to main content

CLI

Command-line interface for PolarGrid.

Installation

npm install -g @polargrid/cli

Quick Start

# Login to PolarGrid (opens browser)
polargrid login

# Check who you're logged in as
polargrid whoami

# List your organizations
polargrid orgs list

# Create an API key
polargrid keys create my-app-key

# Test inference
polargrid test inference --region montreal --prompt "Hello world"

Authentication

Browser Login (Interactive)

polargrid login
Opens your browser for OAuth authentication. Your credentials are stored securely in ~/.polargrid/credentials.json.

API Key (CI/CD)

For CI/CD pipelines, no login is needed. Just set the environment variable:
export POLARGRID_API_KEY="pg_your_api_key"

# Now you can run commands
polargrid test inference --region montreal --prompt "Hello"

Check Current Session

polargrid whoami
Shows your email, user ID, and current organization.

Logout

polargrid logout

Quick Test

# Check all regions are healthy
polargrid test health

# Run a quick inference test
polargrid test inference --region montreal --prompt "What is 2+2?"

Next Steps

All Commands

Complete command reference