Dokumentasi

Getting Started with GetWebP CLI

GetWebP CLI batch-converts JPG, PNG, BMP, and WebP images to optimized WebP format from the command line.

Getting Started with GetWebP CLI

GetWebP CLI batch-converts JPG, PNG, BMP, and WebP images to optimized WebP format from the command line. Reduce image file sizes by 30--70% with a single command -- no cloud uploads, no subscriptions required for basic use.

This guide walks you through installation, your first conversion, and optional license activation.

Looking for the full feature overview? See the README. Need the complete command reference? See Commands Reference.


Table of Contents#


System Requirements#

RequirementDetails
Operating SystemmacOS (Apple Silicon or Intel), Linux x64, Windows x64
Node.jsNot required -- GetWebP ships as a standalone binary
Disk Space~50 MB for the binary
NetworkRequired only for license activation and status checks; conversion is fully offline

Installation#

Download the prebuilt binary for your platform from the Releases page.

PlatformBinary Filename
macOS Apple Silicon (M1/M2/M3/M4)getwebp-macos-arm64
macOS Intelgetwebp-macos-x64
Linux x64getwebp-linux-x64
Windows x64getwebp-windows-x64.exe

macOS#

# 1. Rename the binary
mv getwebp-macos-arm64 getwebp    # use getwebp-macos-x64 on Intel Macs
 
# 2. Make it executable
chmod +x getwebp
 
# 3. Move it to a directory on your PATH
sudo mv getwebp /usr/local/bin/

Handling macOS Gatekeeper#

macOS blocks unsigned binaries by default. If you see a "cannot be opened because the developer cannot be verified" warning, remove the quarantine attribute:

xattr -cr /usr/local/bin/getwebp

Run this before your first getwebp command. You only need to do it once.

Linux#

# 1. Rename the binary
mv getwebp-linux-x64 getwebp
 
# 2. Make it executable
chmod +x getwebp
 
# 3. Move it to a directory on your PATH
sudo mv getwebp /usr/local/bin/

Windows#

  1. Rename getwebp-windows-x64.exe to getwebp.exe.
  2. Move getwebp.exe to a directory on your PATH (e.g., C:\Tools\).
  3. If the directory is not already on your PATH, add it:
    • Open Settings > System > About > Advanced system settings > Environment Variables.
    • Under System variables, select Path, click Edit, and add the directory (e.g., C:\Tools\).
  4. Open a new terminal window for the change to take effect.

Verify Download Integrity (Optional)#

Each release includes a .sha256 checksum file. Verify it to confirm the download was not corrupted or tampered with:

# macOS / Linux
shasum -a 256 -c getwebp-macos-arm64.sha256
# Expected output: getwebp-macos-arm64: OK
# Windows (PowerShell)
$expected = (Get-Content getwebp.exe.sha256).Split(' ')[0]
$actual   = (Get-FileHash getwebp.exe -Algorithm SHA256).Hash.ToLower()
if ($expected -eq $actual) { Write-Host "Verified OK" } else { Write-Host "MISMATCH" }

Verify Your Installation#

getwebp --version

Expected output:

getwebp/1.0.1

If you see the version number, the installation succeeded. If you get "command not found", confirm the binary is in a directory listed in your PATH.


Convert Your First Image#

Convert a single image to WebP:

getwebp convert photo.jpg

Output:

✓ photo.jpg
Done: 1 succeeded, 0 failed
Avg saved: 34.2%

The converted file (photo.webp) is saved in the same directory as the original. Original files are never modified or deleted.

Specify an Output Directory#

getwebp convert photo.jpg -o ./output

The converted file is written to ./output/photo.webp.

Adjust Quality#

The default quality is 80 (range: 1--100). Lower values produce smaller files with more compression artifacts:

getwebp convert photo.jpg -q 95

Convert a Directory of Images#

Pass a directory path to convert all supported images inside it:

getwebp convert ./images -o ./webp-images

Output:

✓ images/hero.jpg
✓ images/banner.png
✓ images/icon.bmp
Done: 3 succeeded, 0 failed
Avg saved: 41.5%

Include Subdirectories#

Add -r to scan subdirectories recursively:

getwebp convert ./images -r -o ./webp-images

Preview Without Converting#

Use --dry-run to list which files would be converted without writing any output:

getwebp convert ./images --dry-run

Skip Already-Converted Files#

Use --skip-existing to avoid re-converting files that already have a .webp counterpart:

getwebp convert ./images --skip-existing

Free Tier Limits#

GetWebP works without a license key, with these restrictions:

LimitValue
Files per run10
Processing delay3 seconds per file
Parallel workers1 (serial processing)

These limits are removed when you activate a Starter or Pro license.


Activate a Starter or Pro License#

  1. Purchase a license at getwebp.com/pricing.
  2. Run the auth command with your license key:
getwebp auth XXXX-XXXX-XXXX-XXXX

Output:

Verifying license...
✓ Activated! Starter plan unlocked.

Activation requires a one-time network connection. After activation, conversions run fully offline. The license is bound to your device -- to move it to another machine, run getwebp logout first to free the device slot.


Check Your License Status#

getwebp status

Output:

Version    : 1.0.1
Mode       : Starter
License    : xxxx-xxxx-xxxx-A1B2
Expires    : 2027-04-01
Devices    : 1 / 3 used

If you have not activated a license, the output shows Mode : Free.

For machine-readable output (useful in CI/CD pipelines):

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
  }
}

Next Steps#

TopicLink
Full command referenceCommands Reference
Exit codes and retry guidanceExit Codes
Feature comparison (Free vs Starter vs Pro)README -- Plan Comparison
Pricing and upgradegetwebp.com/pricing
Manage devices and licensesgetwebp.com/dashboard