Skip to content

License Management

A pageflare Pro license is a signed JWT that tells the CLI which tier you are on and when the license expires. This page covers everything you need to know about activating and managing it.

Run the login command and follow the browser prompt:

Terminal window
pageflare --login
pageflare --login
  Opening browser for authentication…
Waiting for license token…
License activated  tier=pro  expires=2026-04-11
Saved to ~/.config/pageflare/license.json

The command opens your default browser to the pageflare account portal. After you authenticate and confirm, the CLI receives a signed token and saves it automatically. You do not need to copy or paste anything.

The token is written to:

~/.config/pageflare/license.json

The file contains a single JSON object:

{ "token": "<signed-jwt>" }

The JWT payload includes your tier (free or pro), an exp (expiry timestamp 30 days out), and a refresh_by timestamp (7 days before expiry). You do not need to parse this manually — the CLI handles it.

Do not commit this file to version control. Add it to your .gitignore:

~/.config/pageflare/license.json

Or project-locally if you store config inside the repo:

.gitignore
pageflare-license.json

For automated pipelines where a home directory or interactive browser flow is not available, pass the token via the PAGEFLARE_LICENSE environment variable:

Terminal window
PAGEFLARE_LICENSE="<your-token>" pageflare dist/

Retrieve your token value from the account portal at pageflare.dev/account. Store it as a secret in your CI provider:

ProviderSecret type
GitHub ActionsRepository / org secret
GitLab CICI/CD Variable (masked)
NetlifyEnvironment variable (sensitive)
Cloudflare PagesEncrypted environment variable
VercelEnvironment variable

Example GitHub Actions step:

- name: Optimize with pageflare
run: pageflare dist/ --output dist/
env:
PAGEFLARE_LICENSE: ${{ secrets.PAGEFLARE_LICENSE }}

When the CLI starts it looks for a license in this order:

  1. PAGEFLARE_LICENSE environment variable
  2. ~/.config/pageflare/license.json file
  3. Free tier (no license)

The first valid token found is used. Environment variable always wins.

A Pro license can be activated on any number of machines under your account. There is no device limit. Each machine runs pageflare --login independently or uses the same PAGEFLARE_LICENSE token value in its CI environment.

For teams, the recommended approach is to store the token as a shared CI secret rather than individual machine activations. This ensures the license works in ephemeral build environments and avoids each team member needing their own activation.

FieldValue
Token lifetime30 days from issue
refresh_by window7 days before expiry
Grace periodYes — expired tokens continue to work for a short window after exp to avoid hard CI failures during renewal

When your token is within the refresh_by window, pageflare automatically attempts a silent refresh in the background. If a refresh succeeds the new token is written back to ~/.config/pageflare/license.json.

In CI environments where the file system is ephemeral, set a reminder to rotate the PAGEFLARE_LICENSE secret in your provider’s settings before the token expires. The expiry date is shown in the CLI output whenever Pro features run.

To check your current license status at any time:

Terminal window
pageflare --license
pageflare --license
  License  pro
Expires  2026-04-11 (18 days)
Source   ~/.config/pageflare/license.json

To deactivate pageflare on a machine, delete the license file:

Terminal window
rm ~/.config/pageflare/license.json

The CLI will fall back to Free tier on the next run. You can re-activate at any time with pageflare --login.