License Management
License Management
Section titled “License Management”LeanJ offers Free and Pro tiers. Manage your license through the CLI.
License Tiers
Section titled “License Tiers”Free Tier
Section titled “Free Tier”Features:
- Basic profiling
- IntelliJ integration
- CLI commands
- Docker support
Limitations:
- Standard features only
Pro Tier
Section titled “Pro Tier”Features:
- All Free features
- Advanced analytics
- Priority support
- Additional insights
Purchasing a License
Section titled “Purchasing a License”Step 1: Open Purchase Page
Section titled “Step 1: Open Purchase Page”leanj license purchaseThis opens the Lemon Squeezy checkout page in your browser.
Step 2: Complete Purchase
Section titled “Step 2: Complete Purchase”- Select Pro license
- Complete payment
- Receive license key via email
Step 3: Activate License
Section titled “Step 3: Activate License”leanj license login <your-license-key>Example:
leanj license login abc123-def456-ghi789Checking License Status
Section titled “Checking License Status”Human-Readable Format
Section titled “Human-Readable Format”leanj license statusOutput:
License: ProStatus: ActiveExpires: 2025-12-31Features: All Pro features enabledJSON Format
Section titled “JSON Format”leanj license status --jsonOutput:
{ "tier": "pro", "status": "active", "expiresAt": "2025-12-31T23:59:59Z", "features": ["all"]}Validating License
Section titled “Validating License”Manual Validation
Section titled “Manual Validation”leanj license validateNote: License validation is cached for 24 hours to reduce API calls.
Automatic Validation
Section titled “Automatic Validation”- Validates on login
- Re-validates after cache expires (24 hours)
- Uses cached data when offline
License Information
Section titled “License Information”Detailed Info
Section titled “Detailed Info”leanj license infoShows:
- License tier
- Status
- Expiration date
- Features enabled
- Machine ID
Logging Out
Section titled “Logging Out”Return to Free Tier
Section titled “Return to Free Tier”leanj license logoutNote: This removes the license key from local storage. You can log in again with the same key.
License Storage
Section titled “License Storage”Location
Section titled “Location”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
Configuration
Section titled “Configuration”API URL
Section titled “API URL”Environment Variable:
export LEANJ_LICENSE_API_URL=https://license-api.leanj.com/v1Default: Cloudflare Worker endpoint
Machine ID
Section titled “Machine ID”Auto-Generated:
- Created automatically on first use
- Stored in license file
- Used for license validation
Manual Override:
export LEANJ_MACHINE_ID=abc123Development Mode
Section titled “Development Mode”For Testing:
export LEANJ_DEV_MODE=trueWarning: Only for testing. Do not use in production.
Troubleshooting
Section titled “Troubleshooting”License Validation Failed
Section titled “License Validation Failed”Error: License validation failed or Network error
Solutions:
-
Check internet connection:
Terminal window ping license-api.leanj.com -
Verify license key:
Terminal window leanj license status -
Retry validation:
Terminal window leanj license validate -
Check API URL:
Terminal window echo $LEANJ_LICENSE_API_URL
Rate Limit Exceeded
Section titled “Rate Limit Exceeded”Error: Rate limit exceeded
Solutions:
-
Wait before retrying:
- License validation is cached for 24 hours
- Wait a few minutes before retrying
-
Use cached license:
- Offline mode uses cached data
- Check
~/.leanj/license.json
License Expired
Section titled “License Expired”Error: License expired
Solutions:
-
Check expiration date:
Terminal window leanj license info -
Renew license:
- Purchase new license
- Or contact support
Invalid License Key
Section titled “Invalid License Key”Error: Invalid license key
Solutions:
-
Verify key format:
- Check for typos
- Ensure complete key
-
Re-enter key:
Terminal window leanj license login <correct-key>
Best Practices
Section titled “Best Practices”-
Keep license key secure:
- Don’t share license keys
- Store securely
-
Monitor expiration:
- Check status regularly
- Renew before expiration
-
Use validation cache:
- Avoid frequent validation calls
- Let 24-hour cache work
-
Backup license file:
- Copy
~/.leanj/license.json - Restore if needed
- Copy
Next Steps
Section titled “Next Steps”- Learn about CLI commands
- Read Configuration Guide
- See Troubleshooting Guide