CLI Reference
Complete reference for the ppe command-line tool. All commands, options, and usage examples.
Global Options
These options are available for all commands:
| Option | Description |
|---|---|
--help, -h |
Display help for the command |
--version, -V |
Display version information |
--quiet, -q |
Suppress non-essential output |
--verbose, -v |
Increase output verbosity |
license:generate
Generate a new license file for encrypting PHP applications.
Creates a cryptographically signed license file with specified constraints.
Examples
# Basic development license
ppe license:generate --licensee="Dev Team"
# Production license with hardware binding
ppe license:generate \
--licensee="Acme Corp" \
--hostname=app.acme.com \
--expires=+1y \
--output=acme-prod.ppe
# Trial license
ppe license:generate \
--licensee="Trial User" \
--expires=+14d \
--meta="trial:true" \
--output=trial.ppe
# Enterprise license with online validation
ppe license:generate \
--licensee="Enterprise Inc" \
--hostname=ent.example.com \
--validate-url=https://licenses.myapp.com/validate \
--validate-grace=24h \
--meta="plan:enterprise" \
--meta="seats:100" \
--output=enterprise.ppe
encrypt
Encrypt PHP files using a license file.
Encrypts all PHP files in the source directory and outputs to the destination directory.
Examples
# Basic encryption
ppe encrypt --license=prod.ppe src/ dist/
# Exclude test files and config
ppe encrypt \
--license=prod.ppe \
--exclude="tests/*" \
--exclude="config/*.php" \
src/ \
dist/
# Encrypt with compression
ppe encrypt \
--license=prod.ppe \
--compress \
--clean \
src/ \
dist/
# Preview without encrypting
ppe encrypt \
--license=prod.ppe \
--dry-run \
src/ \
dist/
verify
Verify a license file or encrypted files.
Validates license signatures, checks constraints, and optionally tests encrypted files.
Examples
# Verify a license file
ppe verify customer.ppe
# Verify with metadata display
ppe verify --show-meta customer.ppe
# Verify encrypted files with a license
ppe verify --license=customer.ppe --test-decrypt dist/
# Get JSON output for scripting
ppe verify --json customer.ppe
Output
$ ppe verify --show-meta customer.ppe
License: customer.ppe
Status: VALID
Details:
ID: lic_abc123def456
Licensee: Acme Corp
Created: 2025-01-15 10:30:00 UTC
Expires: 2026-01-15 00:00:00 UTC
Constraints:
Hostname: app.acme.com
IP: (not set)
MAC: (not set)
Metadata:
plan: professional
max_users: 50
Signature: VALID (ECDSA P-256)
license:info
Display detailed information about a license file.
Shows all license details without performing validation.
license:revoke
Generate a revocation record for online validation systems.
Creates a revocation entry that your validation server can use to reject a license.
Exit Codes
The CLI uses standard exit codes:
| Code | Meaning |
|---|---|
0 |
Success |
1 |
General error |
2 |
Invalid arguments or options |
3 |
License validation failed |
4 |
Encryption/decryption error |
5 |
File not found |