Mcops Keygen <2025>
"kid": "key_1", "alg": "HS256", "secret": "7d9f3c8a2b4e1f6d8a9c3b5e7f1d4a2b", "created_at": "2026-04-16T10:00:00Z"
1. Purpose Generate cryptographically secure keys, tokens, or license keys for use in MCOPS (e.g., API authentication, software licensing, service-to-service mTLS). 2. Command Syntax mcops keygen [type] [options] 3. Key Types & Defaults | Type | Description | Default Format | Default Length | |------|-------------|----------------|----------------| | license | Software license key | XXXX-XXXX-XXXX | 16 chars (4x4) | | api | API secret key | Base64 URL-safe | 32 bytes | | jwt | JWT signing secret | Hex | 256 bits | | rsa | RSA key pair (private + public) | PEM | 2048 bits | | ed25519 | Ed25519 key pair | PEM | 256 bits | 4. Core Options | Option | Description | Example | |--------|-------------|---------| | --output, -o | Output file (otherwise stdout) | -o license.txt | | --format | Output format (text, json, pem, env) | --format json | | --length, -l | Key length (bytes or bits) | -l 64 | | --prefix | Human-readable prefix | --prefix MCOPS- | | --expiry | Expiration timestamp (for license tokens) | --expiry 2026-12-31 | | --metadata | JSON metadata to embed in license | --metadata '"tier":"pro"' | | --passphrase | Encrypt private keys | --passphrase env:KEY_PASS | | --quiet, -q | Suppress extra output | -q | 5. Examples 5.1 Generate simple API key mcops keygen api --length 32 --format env Output: mcops keygen
MCOPS-LIC-8F3A-9D2E-1B7C-4E6F mcops keygen rsa --length 4096 -o private.pem --output-pub public.pem 5.4 Generate JWT secret as JSON mcops keygen jwt --length 256 --format json Output: Command Syntax mcops keygen [type] [options] 3
MCOPS_API_KEY=K8s7XpQ2mR9vL3nF5hT1yW6eJ4dA8bC0 mcops keygen license --prefix MCOPS-LIC --metadata '"customer":"acme","seats":10' Output: Examples 5