Skip to main content

QuantumLockβ„’ CLI Reference

Complete reference for the QuantumLockβ„’ command-line tool.

Version: 2.1.3


Installation​

pip install quantumlock-cli

Via pip with private repository​

pip install quantumlock-cli --index-url https://pypi.softquantus.com/simple/

Dependencies​

The CLI requires Python >= 3.8 and automatically installs:

  • requests β‰₯ 2.31.0
  • tabulate β‰₯ 0.9.0
  • rich β‰₯ 13.0.0

Verify installation​

quantumlock --version

Expected output:

QuantumLock CLI 2.1.3

Initial Configuration​

Before using the CLI, configure your credentials:

quantumlock configure

The command will prompt for:

  1. API URL β€” API URL (default: https://quantumlock.softquantus.com)
  2. API Key β€” Your API key (qlk_...)

Credentials are saved at:

~/.quantumlock/config.json

Configuration file format:

{
"api_url": "https://quantumlock.softquantus.com",
"api_key": "qlk_your_api_key"
}

The CLI automatically tests the connection after configuration, showing:

βœ“ Connected as: admin@company.com
Plan: startup
Monthly limit: 10000

Step-by-Step Guide​

Step 1: Configure credentials​

quantumlock configure
QuantumLockβ„’ CLI Configuration

Current API URL: https://quantumlock.softquantus.com
API URL [https://quantumlock.softquantus.com]: ↡
No API key configured
API Key: qlk_your_api_key

βœ“ Configuration saved!
Config file: /Users/you/.quantumlock/config.json

Testing connection...
βœ“ Connected as: admin@company.com
Plan: startup
Monthly limit: 10000

Step 2: Generate your first license​

quantumlock generate \
--customer "customer@company.com" \
--features "premium,api_access" \
--days 365
Generating license...
Customer: customer@company.com
Features: premium, api_access
Expires in: 365 days

βœ“ License generated successfully!

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Field β”‚ Value β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ License Key β”‚ QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320β”‚
β”‚ Customer ID β”‚ customer@company.com β”‚
β”‚ Features β”‚ premium, api_access β”‚
β”‚ Issued At β”‚ 2025-06-15T10:30:00 β”‚
β”‚ Expires At β”‚ 2026-06-15T10:30:00 β”‚
β”‚ Quantum Fidelityβ”‚ 0.9847 β”‚
β”‚ Generation Time β”‚ 45ms β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Step 3: Validate a license​

quantumlock validate QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320
Validating license...
License: QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320

βœ“ License is VALID

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Field β”‚ Value β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Customer ID β”‚ acme_corp β”‚
β”‚ End Customer β”‚ customer@company.com β”‚
β”‚ Features β”‚ premium, api_access β”‚
β”‚ Issued At β”‚ 2025-06-15T10:30:00 β”‚
β”‚ Expires At β”‚ 2026-06-15T10:30:00 β”‚
β”‚ Days Remaining β”‚ 364 β”‚
β”‚ Quantum Verified β”‚ βœ“ Yes β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Step 4: View statistics​

quantumlock stats
Account: admin@company.com
Plan: STARTUP

License Statistics
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Metric β”‚ Value β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Total Licenses β”‚ 42 β”‚
β”‚ Active Licenses β”‚ 38 β”‚
β”‚ Expired Licenses β”‚ 4 β”‚
β”‚ This Month β”‚ 12/10000β”‚
β”‚ Usage β”‚ 0.1% β”‚
β”‚ β”‚ β”‚
β”‚ Avg Quantum Fidelityβ”‚ 0.9847 β”‚
β”‚ Avg Generation Time β”‚ 45ms β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Command Reference​

quantumlock configure​

Configures the CLI credentials.

quantumlock configure

Interactive β€” prompts for API URL and API Key. Saves to ~/.quantumlock/config.json.


quantumlock generate​

Generates a new quantum license.

quantumlock generate --customer <ID> --features <FEATURES> [options]

Required arguments:

ArgumentoAliasDescription
--customer-cEnd customer ID (e.g., email)
--features-fComma-separated features

Optional arguments:

ArgumentoAliasDefaultDescription
--days-d365Days until expiration
--metadata-mβ€”Metadata (format key=value, can repeat)
--output-oβ€”Save result to JSON file

Examples:

# Basic license
quantumlock generate -c "user@company.com" -f "basic"

# License with multiple features and metadata
quantumlock generate \
--customer "user@company.com" \
--features "premium,api_access,analytics" \
--days 730 \
--metadata company="Acme Corp" \
--metadata tier="enterprise"

# Save result to file
quantumlock generate -c "user@company.com" -f "premium" -o license.json

quantumlock validate​

Validates an existing license.

quantumlock validate <license_key>

Positional argument:

ArgumentoDescription
license_keyLicense key to validate

Exemplo:

quantumlock validate QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320

Note: The validation endpoint does not require authentication in the CLI.


quantumlock list​

Lists all licenses with pagination and filters.

quantumlock list [options]

Optional arguments:

ArgumentoAliasDefaultDescription
--page-p1Page number
--limit-l20Items per page
--status-sβ€”Filter: active, expired, revoked
--customer-cβ€”Filter by end customer ID

Examples:

# List all
quantumlock list

# Active licenses only
quantumlock list --status active

# Filter by customer, page 2
quantumlock list --customer "user@company.com" --page 2 --limit 50

# Revoked licenses
quantumlock list -s revoked

quantumlock show​

Shows complete details of a specific license.

quantumlock show <license_key> [options]

Positional argument:

ArgumentoDescription
license_keyLicense key

Optional arguments:

ArgumentoAliasDescription
--output-oSave details to JSON file

Exemplo:

# View details
quantumlock show QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320

# Save to file
quantumlock show QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320 -o license-details.json

quantumlock revoke​

Permanently revokes a license. Cannot be undone.

quantumlock revoke <license_key> [options]

Positional argument:

ArgumentoDescription
license_keyLicense key a revogar

Optional arguments:

ArgumentoAliasDescription
--reason-rReason for revocation
--force-fSkip interactive confirmation

Examples:

# With interactive confirmation
quantumlock revoke QCOS-41FB-639F-C30B-14E3-6342-7B3E-6426-9320

# With reason
quantumlock revoke QCOS-41FB-639F-... --reason "Customer cancelled"

# Without confirmation (scripts/CI)
quantumlock revoke QCOS-41FB-639F-... --reason "Automated cleanup" --force

quantumlock stats​

Shows account usage statistics.

quantumlock stats

Displays: total licenses, active, expired, monthly usage, average quantum fidelity, average generation time.


quantumlock info​

Shows account information.

quantumlock info

Displays: customer ID, email, company, plan, monthly limit, monthly usage, creation date.


quantumlock version​

Shows version information.

quantumlock version
QuantumLockβ„’ CLI
Version: 2.1.3
API URL: https://quantumlock.softquantus.com
Config: /Users/you/.quantumlock/config.json
API Key: configured

Environment Variables​

The CLI also accepts configuration via environment variables:

VariableDescription
β€”The CLI exclusively uses the ~/.quantumlock/config.json file

Note: Currently the CLI only reads from the configuration file. Use quantumlock configure to change.


Usage in Scripts and CI/CD​

Generate license and capture the key​

quantumlock generate \
-c "deploy@company.com" \
-f "production" \
-d 365 \
-o /tmp/license.json

# Extrair license key do JSON
LICENSE_KEY=$(jq -r '.license_key' /tmp/license.json)
echo "Generated: $LICENSE_KEY"

Revoke without interactive confirmation​

quantumlock revoke "$LICENSE_KEY" --reason "Automated cleanup" --force

Check if a license is valid​

if quantumlock validate "$LICENSE_KEY" > /dev/null 2>&1; then
echo "License is valid"
else
echo "License is invalid"
exit 1
fi

Troubleshooting​

"No API key configured"​

Run quantumlock configure to set up your API Key.

"Connection failed"​

  1. Verify the API URL is correct (https://quantumlock.softquantus.com)
  2. Check your internet connection
  3. Verify the API Key is valid at the Portal

"Monthly limit reached"​

Your plan has reached the monthly limit. Upgrade at portal.softquantus.com/billing.

Corrupted configuration file​

Remove and reconfigure:

rm -rf ~/.quantumlock
quantumlock configure