CLI Reference
A license server that manages customers and software licenses, validates license requests via gRPC API, and delivers decryption keys for protected modules.
Global Flags
Section titled “Global Flags”| Flag | Default | Description |
|---|---|---|
--config | ./config.yaml | Config file path |
--log-format | console | Log format (json, console) |
--log-level | info | Log level (debug, info, warn, error) |
serve — Start the server
Section titled “serve — Start the server”Start the license server with both gRPC and HTTP APIs.
license-server serve [flags]| Flag | Default | Description |
|---|---|---|
--host | 0.0.0.0 | Bind address |
--http-port | 8080 | HTTP port |
--grpc-port | 9090 | gRPC port |
Example:
# Start with default portslicense-server serve
# Start with custom ports and debug logginglicense-server serve --http-port 5656 --grpc-port 50090 --log-level debugadmin — Manage admin users
Section titled “admin — Manage admin users”admin create
Section titled “admin create”Create a new admin user. Supports interactive and non-interactive mode.
license-server admin create [flags]| Flag | Short | Description |
|---|---|---|
--username | -u | Username |
--email | -e | Email address |
--password | -p | Password (prompts if not provided) |
--role | -r | Role: super_admin, admin, viewer |
--display-name | -d | Display name |
Examples:
# Interactive mode (prompts for all fields)license-server admin create
# Non-interactive modelicense-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.comadmin list
Section titled “admin list”List all admin users in the system.
license-server admin listadmin delete
Section titled “admin delete”Delete an admin user by username.
license-server admin delete [username]admin reset-password
Section titled “admin reset-password”Reset the password for an admin user.
license-server admin reset-password [username] [flags]| Flag | Short | Description |
|---|---|---|
--password | -p | New password (prompts if not provided) |
Examples:
# Interactive (secure)license-server admin reset-password admin
# Non-interactivelicense-server admin reset-password admin -p NewSecurePass123!license — License management
Section titled “license — License management”license generate-keys
Section titled “license generate-keys”Generate a new Ed25519 key pair for license signing.
license-server license generate-keys [flags]| Flag | Default | Description |
|---|---|---|
--private-key | license.key | Output file for private key |
--public-key | license.pub | Output file for public key |
license create
Section titled “license create”Create a new Ed25519-signed server license.
license-server license create [flags]| Flag | Default | Description |
|---|---|---|
--licensee | — | Licensee name/company (required) |
--valid-days | 365 | License validity in days |
--max-customers | 0 | Max customers (0 = unlimited) |
--max-licenses | 0 | Max licenses (0 = unlimited) |
--features | — | Feature flags (comma-separated) |
--private-key | license.key | Private key file |
--output | server.license | Output license file |
Example:
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.keylicense verify
Section titled “license verify”Verify the signature and validity of a server license.
license-server license verify [flags]| Flag | Default | Description |
|---|---|---|
--license | server.license | License file to verify |
--public-key | license.pub | Public key file |
license info
Section titled “license info”Display information about a license file without verification.
license-server license info [flags]| Flag | Default | Description |
|---|---|---|
--license | server.license | License file to inspect |
migrate — Database migrations
Section titled “migrate — Database migrations”Shared flags for all migrate subcommands:
| Flag | Short | Description |
|---|---|---|
--dry-run | -n | Show migration SQL without executing |
--verbose | -v | Show detailed output |
migrate up
Section titled “migrate up”Apply all pending database schema migrations.
license-server migrate upmigrate down
Section titled “migrate down”Rollback migrations.
license-server migrate down [flags]| Flag | Default | Description |
|---|---|---|
--steps | 1 | Number of migrations to rollback |
--force | false | Force rollback even if data loss may occur |
migrate status
Section titled “migrate status”Display current migration status.
license-server migrate statusbackup — Backup management
Section titled “backup — Backup management”backup create
Section titled “backup create”Create a new database backup immediately.
license-server backup createbackup list
Section titled “backup list”List all available database backups.
license-server backup listbackup restore
Section titled “backup restore”Restore the database from a specific backup.
license-server backup restore [backup-id] [flags]| Flag | Description |
|---|---|
--force | Force restore without confirmation |
backup status
Section titled “backup status”Show backup status and configuration.
license-server backup statusconfig — Configuration management
Section titled “config — Configuration management”config init
Section titled “config init”Create a new configuration file with default values.
license-server config init [flags]| Flag | Default | Description |
|---|---|---|
--output | config.yaml | Output file path |
--force | false | Overwrite existing file |
config show
Section titled “config show”Display the current configuration (sensitive values are masked).
license-server config show [flags]| Flag | Default | Description |
|---|---|---|
--format | yaml | Output format (yaml, json) |
--show-secrets | false | Show sensitive values |
config get
Section titled “config get”Get a specific configuration value.
license-server config get [key]config validate
Section titled “config validate”Validate the configuration file and check for errors.
license-server config validateseed — Seed initial data
Section titled “seed — Seed initial data”Seed the database with initial data including the default admin user.
license-server seed [flags]| Flag | Default | Description |
|---|---|---|
--admin-username | admin | Username for initial admin |
--admin-password | Password1234! | Password for initial admin |
--admin-email | admin@example.com | Email for initial admin |
--admin-display-name | Administrator | Display name |
--force | false | Force seed even if admin exists |
--full | false | Seed full test data (development mode only) |
Example:
# Create default adminlicense-server seed
# Create custom adminlicense-server seed --admin-username myuser --admin-email me@example.com
# Seed test data (dev only)license-server seed --fullagent — Start client agent
Section titled “agent — Start client agent”Start a client agent that demonstrates the license validation flow. Connects to the server, validates the license, and logs connection status.
license-server agent [flags]| Flag | Default | Description |
|---|---|---|
--server | http://localhost:9199 | License server address (gRPC) |
--license-key | — | License key to validate |
--hardware-id | auto-generated | Hardware ID |
--heartbeat-interval | 30s | Heartbeat interval |
--insecure | true | Skip TLS verification |
--version | 1.0.0 | Client version |
version — Version information
Section titled “version — Version information”Print version, commit hash, and build date.
license-server version [flags]| Flag | Description |
|---|---|
--short | Print only the version number |
--json | Print as JSON |