LEAPERone Docs

CLI

Command-line tool for managing LEAPERone.

The LEAPERone CLI lets you manage API keys, check credits, and browse documentation directly from your terminal.

Installation

No installation required. Run it with npx:

npx @leaperone/cli

Or install it globally:

npm install -g @leaperone/cli

Authentication

Log in to connect the CLI to your LEAPERone account:

npx @leaperone/cli auth login

This opens your browser for authentication. If you are on a headless server or remote machine, use Device Flow:

npx @leaperone/cli auth login --device

Check your current auth status:

npx @leaperone/cli auth status

Log out and remove stored credentials:

npx @leaperone/cli auth logout

Commands

API Keys

# List all API keys
npx @leaperone/cli apikey list

# Create a new API key
npx @leaperone/cli apikey create -n "my-app-key"

# Revoke an API key by name
npx @leaperone/cli apikey revoke -n "my-app-key"

When you create a new API key, it is displayed only once. Save it immediately.

Credits

# Check your current credit balance
npx @leaperone/cli credit balance

# View recent usage history
npx @leaperone/cli credit usage

# Show last 50 records
npx @leaperone/cli credit usage -l 50

Documentation

Browse API endpoints, models, and pricing without leaving the terminal:

# List all API endpoints
npx @leaperone/cli docs endpoints

# List available models and pricing
npx @leaperone/cli docs models

# Show the quick start guide
npx @leaperone/cli docs quickstart

JSON Output

All commands support a --json flag for machine-readable output, useful for scripting and CI pipelines:

npx @leaperone/cli credit balance --json
Example JSON output
{
  "paid": 10.0,
  "gift": 5.0,
  "total": 15.0,
  "giftExpiresAt": "2026-04-01T00:00:00.000Z"
}

Environment Variables

You can also authenticate by setting an API key as an environment variable instead of using auth login:

export LEAPERONE_API_KEY=sk-your-api-key
npx @leaperone/cli credit balance