CLI
A small Java tool for testing your setup from a terminal. Build it from the repository with make cli (it creates sdk-java/target/sunlicense-cli.jar; Java 17+).
bash
export SUNLICENSE_URL=https://api.sunlicense.com
export SUNLICENSE_API_KEY=slk_...
alias sunlicense='java -jar sunlicense-cli.jar'| Command | What it does |
|---|---|
sunlicense validate --key KEY [--fingerprint ID] | Validates (and activates the machine). Prints ✅ VALID or ❌ and the reason |
sunlicense deactivate --key KEY [--fingerprint ID] | Frees this machine's slot |
sunlicense verify-offline --file license.lic --public-key FILE | Verifies an offline license with no network |
sunlicense public-key | Prints your organization's public key |
sunlicense fingerprint | Prints this machine's fingerprint |
Exit codes: 0 valid, 1 not valid, 2 error or SunLicense unreachable.
