Skip to content

CLI Reference

A license server that manages customers and software licenses, validates license requests via gRPC API, and delivers decryption keys for protected modules.

FlagDefaultDescription
--config./config.yamlConfig file path
--log-formatconsoleLog format (json, console)
--log-levelinfoLog level (debug, info, warn, error)

Start the license server with both gRPC and HTTP APIs.

Terminal window
license-server serve [flags]
FlagDefaultDescription
--host0.0.0.0Bind address
--http-port8080HTTP port
--grpc-port9090gRPC port

Example:

Terminal window
# Start with default ports
license-server serve
# Start with custom ports and debug logging
license-server serve --http-port 5656 --grpc-port 50090 --log-level debug

Create a new admin user. Supports interactive and non-interactive mode.

Terminal window
license-server admin create [flags]
FlagShortDescription
--username-uUsername
--email-eEmail address
--password-pPassword (prompts if not provided)
--role-rRole: super_admin, admin, viewer
--display-name-dDisplay name

Examples:

Terminal window
# Interactive mode (prompts for all fields)
license-server admin create
# Non-interactive mode
license-server admin create -u admin -e admin@example.com -p MySecurePass123! -r super_admin
# Mixed mode (prompts for password)
license-server admin create -u admin -e admin@example.com

List all admin users in the system.

Terminal window
license-server admin list

Delete an admin user by username.

Terminal window
license-server admin delete [username]

Reset the password for an admin user.

Terminal window
license-server admin reset-password [username] [flags]
FlagShortDescription
--password-pNew password (prompts if not provided)

Examples:

Terminal window
# Interactive (secure)
license-server admin reset-password admin
# Non-interactive
license-server admin reset-password admin -p NewSecurePass123!

Generate a new Ed25519 key pair for license signing.

Terminal window
license-server license generate-keys [flags]
FlagDefaultDescription
--private-keylicense.keyOutput file for private key
--public-keylicense.pubOutput file for public key

Create a new Ed25519-signed server license.

Terminal window
license-server license create [flags]
FlagDefaultDescription
--licenseeLicensee name/company (required)
--valid-days365License validity in days
--max-customers0Max customers (0 = unlimited)
--max-licenses0Max licenses (0 = unlimited)
--featuresFeature flags (comma-separated)
--private-keylicense.keyPrivate key file
--outputserver.licenseOutput license file

Example:

Terminal window
license-server license create \
--licensee "ACME Corp" \
--valid-days 365 \
--max-customers 100 \
--max-licenses 500 \
--features api,premium,export \
--private-key data/keys/v1.0.0/license.key

Verify the signature and validity of a server license.

Terminal window
license-server license verify [flags]
FlagDefaultDescription
--licenseserver.licenseLicense file to verify
--public-keylicense.pubPublic key file

Display information about a license file without verification.

Terminal window
license-server license info [flags]
FlagDefaultDescription
--licenseserver.licenseLicense file to inspect

Shared flags for all migrate subcommands:

FlagShortDescription
--dry-run-nShow migration SQL without executing
--verbose-vShow detailed output

Apply all pending database schema migrations.

Terminal window
license-server migrate up

Rollback migrations.

Terminal window
license-server migrate down [flags]
FlagDefaultDescription
--steps1Number of migrations to rollback
--forcefalseForce rollback even if data loss may occur

Display current migration status.

Terminal window
license-server migrate status

Create a new database backup immediately.

Terminal window
license-server backup create

List all available database backups.

Terminal window
license-server backup list

Restore the database from a specific backup.

Terminal window
license-server backup restore [backup-id] [flags]
FlagDescription
--forceForce restore without confirmation

Show backup status and configuration.

Terminal window
license-server backup status

Create a new configuration file with default values.

Terminal window
license-server config init [flags]
FlagDefaultDescription
--outputconfig.yamlOutput file path
--forcefalseOverwrite existing file

Display the current configuration (sensitive values are masked).

Terminal window
license-server config show [flags]
FlagDefaultDescription
--formatyamlOutput format (yaml, json)
--show-secretsfalseShow sensitive values

Get a specific configuration value.

Terminal window
license-server config get [key]

Validate the configuration file and check for errors.

Terminal window
license-server config validate

Seed the database with initial data including the default admin user.

Terminal window
license-server seed [flags]
FlagDefaultDescription
--admin-usernameadminUsername for initial admin
--admin-passwordPassword1234!Password for initial admin
--admin-emailadmin@example.comEmail for initial admin
--admin-display-nameAdministratorDisplay name
--forcefalseForce seed even if admin exists
--fullfalseSeed full test data (development mode only)

Example:

Terminal window
# Create default admin
license-server seed
# Create custom admin
license-server seed --admin-username myuser --admin-email me@example.com
# Seed test data (dev only)
license-server seed --full

Start a client agent that demonstrates the license validation flow. Connects to the server, validates the license, and logs connection status.

Terminal window
license-server agent [flags]
FlagDefaultDescription
--serverhttp://localhost:9199License server address (gRPC)
--license-keyLicense key to validate
--hardware-idauto-generatedHardware ID
--heartbeat-interval30sHeartbeat interval
--insecuretrueSkip TLS verification
--version1.0.0Client version

Print version, commit hash, and build date.

Terminal window
license-server version [flags]
FlagDescription
--shortPrint only the version number
--jsonPrint as JSON