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/cliOr install it globally:
npm install -g @leaperone/cliAuthentication
Log in to connect the CLI to your LEAPERone account:
npx @leaperone/cli auth loginThis opens your browser for authentication. If you are on a headless server or remote machine, use Device Flow:
npx @leaperone/cli auth login --deviceCheck your current auth status:
npx @leaperone/cli auth statusLog out and remove stored credentials:
npx @leaperone/cli auth logoutCommands
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 50Documentation
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 quickstartJSON Output
All commands support a --json flag for machine-readable output, useful for scripting and CI pipelines:
npx @leaperone/cli credit balance --json{
"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