Skip to content

CLI Commands

The pageflare binary processes a static site output directory and writes optimized files to the specified output location.

Terminal window
pageflare [INPUT] [OPTIONS]

INPUT defaults to . (the current directory) if omitted.

Path to the SSG output directory to process.

Terminal window
pageflare dist/
pageflare _site/
pageflare public/

Defaults to . when not specified, which is useful when running from within your build output directory.

Output directory for optimized files. When omitted, pageflare writes to <input>/.appz.

Terminal window
# Write optimized files to dist/ (update in place)
pageflare dist/ --output dist/
# Write to a separate directory
pageflare dist/ --output optimized/

If you want to overwrite the input directory without specifying --output, use --in-place instead.


Overwrite files in the input directory instead of writing to a separate output directory.

Terminal window
pageflare dist/ --in-place

This is a convenience flag equivalent to --output <input>. It avoids having to type the same path twice.


Output the processing manifest as JSON instead of the default human-readable summary table.

Terminal window
pageflare dist/ --json

Useful for parsing results in scripts or CI pipelines. The JSON output includes per-file details and aggregate statistics.

See the CI/CD guide for an example of consuming JSON output in a pipeline.


Force reprocessing of all files even if no files have changed since the last run.

Terminal window
pageflare dist/ --force

By default, pageflare skips files that have not changed (based on content hashing). Use --force when you need a clean rebuild — for example, after updating the pageflare binary or changing config options that affect previously processed files.


Path to the configuration file. Defaults to <input>/pageflare.jsonc.

Terminal window
pageflare dist/ --config ./config/pageflare.jsonc

The config file uses JSONC format (JSON with comments). See the Configuration reference for all available options.


Generate a pageflare.jsonc config file in the input directory with all options set to their defaults.

Terminal window
pageflare dist/ --init

Run this once to get a fully-commented config file you can then customize. Does not process any files — exits after writing the config.


Log in to activate your Pro license. Opens a browser-based authentication flow and saves a license token to ~/.config/pageflare/license.json.

Terminal window
pageflare --login

After login, Pro features are automatically unlocked in all subsequent runs. See the License Setup guide for details.


Disable progress spinners and live output.

Terminal window
pageflare dist/ --no-progress

Progress display is auto-detected: if stdout is not a terminal (i.e., piped or redirected output), spinners are suppressed automatically. Use this flag to force the same behavior in interactive terminals — for example, when writing to a log file.


Set the log verbosity level. Accepts: off, error, warn, info, debug, trace.

Default: warn

Terminal window
# Show informational messages
pageflare dist/ --log info
# Verbose debug output
pageflare dist/ --log debug
# Silence all output
pageflare dist/ --log off

Log messages are written to stderr; the summary table and --json output go to stdout, so they can be separated with standard shell redirection.


Print the help message and exit.

Terminal window
pageflare --help

Print the pageflare version and exit.

Terminal window
pageflare --version

Optimize and write back to the same directory

Section titled “Optimize and write back to the same directory”
Terminal window
pageflare dist/ --output dist/
Terminal window
pageflare dist/ --output /tmp/pf-preview --log info
Terminal window
pageflare dist/ --init
# Edit dist/pageflare.jsonc to your needs, then:
pageflare dist/ --output dist/
Terminal window
pageflare dist/ --output dist/ --force
Terminal window
pageflare dist/ --output dist/ --config ./ci/pageflare.jsonc
Terminal window
pageflare dist/ --output dist/ --no-progress --json > pageflare-report.json
CodeMeaning
0Success — all files processed without errors
1One or more files encountered errors during processing