CLI Commands
The pageflare binary processes a static site output directory and writes optimized files to the specified output location.
Synopsis
Section titled “Synopsis”pageflare [INPUT] [OPTIONS]INPUT defaults to . (the current directory) if omitted.
Positional Arguments
Section titled “Positional Arguments”Path to the SSG output directory to process.
pageflare dist/pageflare _site/pageflare public/Defaults to . when not specified, which is useful when running from within your build output directory.
Options
Section titled “Options”-o, --output <DIR>
Section titled “-o, --output <DIR>”Output directory for optimized files. When omitted, pageflare writes to <input>/.appz.
# Write optimized files to dist/ (update in place)pageflare dist/ --output dist/
# Write to a separate directorypageflare dist/ --output optimized/If you want to overwrite the input directory without specifying --output, use --in-place instead.
--in-place
Section titled “--in-place”Overwrite files in the input directory instead of writing to a separate output directory.
pageflare dist/ --in-placeThis is a convenience flag equivalent to --output <input>. It avoids having to type the same path twice.
--json
Section titled “--json”Output the processing manifest as JSON instead of the default human-readable summary table.
pageflare dist/ --jsonUseful 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
Section titled “--force”Force reprocessing of all files even if no files have changed since the last run.
pageflare dist/ --forceBy 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.
-c, --config <PATH>
Section titled “-c, --config <PATH>”Path to the configuration file. Defaults to <input>/pageflare.jsonc.
pageflare dist/ --config ./config/pageflare.jsoncThe config file uses JSONC format (JSON with comments). See the Configuration reference for all available options.
--init
Section titled “--init”Generate a pageflare.jsonc config file in the input directory with all options set to their defaults.
pageflare dist/ --initRun this once to get a fully-commented config file you can then customize. Does not process any files — exits after writing the config.
--login
Section titled “--login”Log in to activate your Pro license. Opens a browser-based authentication flow and saves a license token to ~/.config/pageflare/license.json.
pageflare --loginAfter login, Pro features are automatically unlocked in all subsequent runs. See the License Setup guide for details.
--no-progress
Section titled “--no-progress”Disable progress spinners and live output.
pageflare dist/ --no-progressProgress 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.
--log <LEVEL>
Section titled “--log <LEVEL>”Set the log verbosity level. Accepts: off, error, warn, info, debug, trace.
Default: warn
# Show informational messagespageflare dist/ --log info
# Verbose debug outputpageflare dist/ --log debug
# Silence all outputpageflare dist/ --log offLog messages are written to stderr; the summary table and --json output go to stdout, so they can be separated with standard shell redirection.
-h, --help
Section titled “-h, --help”Print the help message and exit.
pageflare --help-V, --version
Section titled “-V, --version”Print the pageflare version and exit.
pageflare --versionCommon Usage Examples
Section titled “Common Usage Examples”Optimize and write back to the same directory
Section titled “Optimize and write back to the same directory”pageflare dist/ --output dist/Dry run with verbose logging
Section titled “Dry run with verbose logging”pageflare dist/ --output /tmp/pf-preview --log infoGenerate a config file and then process
Section titled “Generate a config file and then process”pageflare dist/ --init# Edit dist/pageflare.jsonc to your needs, then:pageflare dist/ --output dist/Force a clean rebuild
Section titled “Force a clean rebuild”pageflare dist/ --output dist/ --forceUse a custom config file path
Section titled “Use a custom config file path”pageflare dist/ --output dist/ --config ./ci/pageflare.jsoncMachine-readable output for CI
Section titled “Machine-readable output for CI”pageflare dist/ --output dist/ --no-progress --json > pageflare-report.jsonExit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 | Success — all files processed without errors |
1 | One or more files encountered errors during processing |