GetWebP CLI Commands Reference
Complete reference for all GetWebP CLI commands, flags, and output formats.
GetWebP CLI Commands Reference
Complete reference for all GetWebP CLI commands, flags, and output formats.
See also: README | Getting Started | Exit Codes | JSON Output
Quick Reference#
| Command | Description |
|---|---|
getwebp convert [path] | Convert images to WebP format |
getwebp auth <license-key> | Activate a license key |
getwebp status | Show license and version info |
getwebp logout | Unbind license from this device |
Global Flags#
These flags apply to all commands.
| Flag | Alias | Description | Default |
|---|---|---|---|
--version | -v | Print CLI version and exit | -- |
--help | -- | Show help text and exit | -- |
--json | -- | Structured JSON output on stdout (human messages go to stderr) | off |
--verbose | -- | Enable verbose output | off |
--debug | -- | Enable debug output (implies --verbose) | off |
# Print version
getwebp --version
# Output: getwebp/1.0.1
# Show help
getwebp --helpgetwebp convert#
Convert one or more images to WebP format. Original files are never modified or deleted.
Synopsis#
getwebp convert [path] [options]
getwebp convert -i <path> [options]
The positional [path] argument and the -i, --input flag are interchangeable. If both are provided, the positional argument takes precedence.
Flags#
| Flag | Alias | Description | Default | Tier |
|---|---|---|---|---|
<path> (positional) | -- | Input file or directory to convert | -- | All |
--input <path> | -i | Input file or directory (alternative to positional arg) | -- | All |
--output <path> | -o | Output directory for converted files | Same directory as source | All |
--quality <number> | -q | WebP quality, 1--100 | 80 | All |
--recursive | -r | Recursively process images in subdirectories | off | All |
--concurrency <number> | -- | Number of parallel workers, max 32 | CPU cores - 1 | Starter/Pro |
--dry-run | -- | Preview which files would be converted (no writes) | off | All |
--skip-existing | -- | Skip if a .webp file already exists at the output path | off | All |
--json | -- | JSON output for CI pipelines and AI agents | off | All |
Notes:
- On the Free plan,
--concurrencyis ignored. Processing is serial with a 3-second delay between files and a 10-file limit per run. - Quality is clamped to the range 1--100. Invalid values fall back to
80. - When
--outputis omitted,.webpfiles are written next to the source files.
Supported Input Formats#
| Input | Output |
|---|---|
| JPG / JPEG | WebP |
| PNG | WebP |
| BMP | WebP |
| WebP | WebP (re-encoded) |
Examples#
Convert a single image:
getwebp convert photo.png✓ photo.png
Done: 1 succeeded, 0 failed
Avg saved: 34.2%
Convert a directory with custom output:
getwebp convert ./images -o ./dist/imagesHigh quality, skip already-converted files:
getwebp convert ./images -q 95 --skip-existingRecursive scan of subdirectories:
getwebp convert ./images -rParallel processing with 8 workers (Starter/Pro):
getwebp convert ./images --concurrency 8Preview what would be converted (no writes):
getwebp convert ./images --dry-runJSON output for CI/CD pipelines:
getwebp convert ./images --json{
"success": true,
"status": "success",
"total": 3,
"successCount": 3,
"failedCount": 0,
"results": [
{
"file": "photo.jpg",
"status": "success",
"originalSize": 204800,
"newSize": 133120,
"savedRatio": 0.35,
"saved": "35.0%"
}
]
}Using the -i flag instead of a positional argument:
getwebp convert -i ./src/images -o ./dist/imagesFree Plan Behavior#
When no license is activated:
- Maximum 10 files per run. Remaining files are reported as skipped.
- 3-second delay between each file.
--concurrencyis ignored (serial processing only).
JSON output on Free plan when the file limit is reached:
{
"success": true,
"status": "partial",
"message": "Processed 10 images. Free plan limit reached (5 remaining). Upgrade at getwebp.com/pricing, then run: getwebp auth <your-key>",
"data": {
"processed": 10,
"skipped": 5
},
"upgrade": {
"url": "https://getwebp.com/pricing",
"activateCommand": "getwebp auth <your-key>"
}
}getwebp auth#
Activate a license key to unlock Starter or Pro features. Binds the license to the current device.
Synopsis#
getwebp auth <license-key>
Flags#
| Flag | Alias | Description | Default | Tier |
|---|---|---|---|---|
<license-key> (required) | -- | License key to activate | -- | -- |
--json | -- | JSON output | off | All |
Examples#
Activate a license:
getwebp auth XXXX-XXXX-XXXX-XXXXVerifying license...
✓ Activated! Starter plan unlocked.
Activate with JSON output:
getwebp auth XXXX-XXXX-XXXX-XXXX --json{
"success": true,
"data": {
"message": "Activated — Starter plan unlocked"
}
}Failed activation (JSON):
{
"success": false,
"status": "error",
"error": "unknown_error",
"message": "Invalid license key"
}Purchase a license at getwebp.com/pricing.
getwebp status#
Display current license info, plan tier, expiry date, and device usage.
Synopsis#
getwebp status
Flags#
| Flag | Alias | Description | Default | Tier |
|---|---|---|---|---|
--json | -- | JSON output | off | All |
Examples#
Free plan (no license activated):
getwebp statusVersion : 1.0.1
Mode : Free
Starter/Pro plan:
getwebp statusVersion : 1.0.1
Mode : Starter
License : xxxx-xxxx-xxxx-A1B2
Expires : 2027-04-01
Devices : 1 / 3 used
JSON output:
getwebp status --json{
"success": true,
"data": {
"version": "1.0.1",
"mode": "starter",
"licenseKeySuffix": "A1B2",
"expiresAt": "2027-04-01T00:00:00.000Z",
"devicesUsed": 1,
"devicesLimit": 3
}
}Free plan (JSON):
{
"success": true,
"data": {
"version": "1.0.1",
"mode": "free"
}
}Cached status (offline, network unreachable):
When the API is unreachable but a cached JWT exists, status is returned from local cache:
{
"success": true,
"data": {
"version": "1.0.1",
"mode": "pro",
"cached": true,
"expiresAt": "2027-04-01T00:00:00.000Z"
}
}getwebp logout#
Unbind the license from this device, freeing a device slot. Requires network access.
Synopsis#
getwebp logout [options]
Flags#
| Flag | Alias | Description | Default | Tier |
|---|---|---|---|---|
--force | -f | Skip the interactive confirmation prompt | off | All |
--json | -- | JSON output | off | All |
Note: In scripts and CI environments, use --force to skip the interactive confirmation prompt. When using --json, the confirmation prompt is also automatically skipped.
Examples#
Interactive logout:
getwebp logout? Confirm unbind license from this device? This cannot be undone. (y/N) y
✓ Successfully unbound. This device is now on the Free plan.
Skip confirmation (CI-safe):
getwebp logout --forceJSON output:
getwebp logout --force --json{
"success": true,
"data": {
"message": "Device unbound. Switched to Free plan."
}
}Failed logout (JSON):
{
"success": false,
"status": "error",
"error": "network_unreachable",
"message": "Cannot reach server. Retry later or unbind via dashboard."
}Exit Codes#
| Code | Meaning |
|---|---|
0 | All files processed successfully |
1 | General error |
2 | Partial failure (some files failed) |
3 | License / auth error |
4 | Network error |
See Exit Codes for detailed descriptions and retry guidance.
JSON Error Codes#
When --json is enabled, errors include a machine-readable error field:
| Code | Meaning | Retryable |
|---|---|---|
missing_input | No input path specified | No |
network_unreachable | Cannot reach API server | Yes |
not_activated | No active license on device | No |
device_not_found | Device already unbound | No |
invalid_token | Token expired or revoked | No |
unknown_error | Unclassified error | Yes |
See JSON Output for the full output schema.
Tier Comparison#
| Feature | Free | Starter | Pro |
|---|---|---|---|
| Files per run | 10 | Unlimited | Unlimited |
| Processing speed | 3s delay per file | Instant | Instant |
| Parallel workers | 1 (serial) | Auto (CPU cores - 1) | Auto (CPU cores - 1) |
Custom --concurrency | -- | Up to 32 | Up to 32 |
--recursive | Yes | Yes | Yes |
Custom --quality | Yes | Yes | Yes |
--json output | Yes | Yes | Yes |
--dry-run / --skip-existing | Yes | Yes | Yes |
Upgrade at getwebp.com/pricing.