Skip to content

License Management

LeanJ offers Free and Pro tiers. Manage your license through the CLI.

Features:

  • Basic profiling
  • IntelliJ integration
  • CLI commands
  • Docker support

Limitations:

  • Standard features only

Features:

  • All Free features
  • Advanced analytics
  • Priority support
  • Additional insights
Terminal window
leanj license purchase

This opens the Lemon Squeezy checkout page in your browser.

  1. Select Pro license
  2. Complete payment
  3. Receive license key via email
Terminal window
leanj license login <your-license-key>

Example:

Terminal window
leanj license login abc123-def456-ghi789
Terminal window
leanj license status

Output:

License: Pro
Status: Active
Expires: 2025-12-31
Features: All Pro features enabled
Terminal window
leanj license status --json

Output:

{
"tier": "pro",
"status": "active",
"expiresAt": "2025-12-31T23:59:59Z",
"features": ["all"]
}
Terminal window
leanj license validate

Note: License validation is cached for 24 hours to reduce API calls.

  • Validates on login
  • Re-validates after cache expires (24 hours)
  • Uses cached data when offline
Terminal window
leanj license info

Shows:

  • License tier
  • Status
  • Expiration date
  • Features enabled
  • Machine ID
Terminal window
leanj license logout

Note: This removes the license key from local storage. You can log in again with the same key.

File: ~/.leanj/license.json

Format:

{
"licenseKey": "abc123-def456",
"tier": "pro",
"expiresAt": "2025-12-31T23:59:59Z",
"machineId": "xyz789",
"validatedAt": "2025-01-01T00:00:00Z"
}

Security:

  • Stored locally
  • Not transmitted unnecessarily
  • 24-hour validation cache

Environment Variable:

Terminal window
export LEANJ_LICENSE_API_URL=https://license-api.leanj.com/v1

Default: Cloudflare Worker endpoint

Auto-Generated:

  • Created automatically on first use
  • Stored in license file
  • Used for license validation

Manual Override:

Terminal window
export LEANJ_MACHINE_ID=abc123

For Testing:

Terminal window
export LEANJ_DEV_MODE=true

Warning: Only for testing. Do not use in production.

Error: License validation failed or Network error

Solutions:

  1. Check internet connection:

    Terminal window
    ping license-api.leanj.com
  2. Verify license key:

    Terminal window
    leanj license status
  3. Retry validation:

    Terminal window
    leanj license validate
  4. Check API URL:

    Terminal window
    echo $LEANJ_LICENSE_API_URL

Error: Rate limit exceeded

Solutions:

  1. Wait before retrying:

    • License validation is cached for 24 hours
    • Wait a few minutes before retrying
  2. Use cached license:

    • Offline mode uses cached data
    • Check ~/.leanj/license.json

Error: License expired

Solutions:

  1. Check expiration date:

    Terminal window
    leanj license info
  2. Renew license:

    • Purchase new license
    • Or contact support

Error: Invalid license key

Solutions:

  1. Verify key format:

    • Check for typos
    • Ensure complete key
  2. Re-enter key:

    Terminal window
    leanj license login <correct-key>
  1. Keep license key secure:

    • Don’t share license keys
    • Store securely
  2. Monitor expiration:

    • Check status regularly
    • Renew before expiration
  3. Use validation cache:

    • Avoid frequent validation calls
    • Let 24-hour cache work
  4. Backup license file:

    • Copy ~/.leanj/license.json
    • Restore if needed