Skip to content

Installation

The pageflare CLI is a single self-contained binary. Pick the installation method that fits your environment.

The npm package wraps the native binary and works on macOS, Linux, and Windows. Node.js 20 or later is required.

Terminal window
npm install -g @pageflare/cli

Install once globally and the pageflare command is available everywhere. This is the recommended method for JavaScript/Node.js projects that already use npm.

Terminal window
brew install pageflare

Homebrew keeps the binary up to date via brew upgrade. This is the simplest path on macOS.

The install script detects your OS and architecture, downloads the correct binary, and places it in /usr/local/bin.

Terminal window
curl -fsSL https://get.appz.dev/pageflare/install.sh | sh

This is the preferred method for Linux servers and CI runners where you want a fast, dependency-free install.

To install to a custom directory, set PAGEFLARE_INSTALL_DIR:

Terminal window
PAGEFLARE_INSTALL_DIR=$HOME/.local/bin curl -fsSL https://get.appz.dev/pageflare/install.sh | sh

The official Docker image is available on Docker Hub. Useful for CI pipelines and containerized workflows.

Terminal window
docker run --rm -v $(pwd)/dist:/site pageflare/cli /site --in-place

Or use it as a base in a multi-stage build:

FROM pageflare/cli AS optimizer
COPY dist/ /site/
RUN pageflare /site --in-place
brew install pageflare
# or: npm install -g @pageflare/cli

macOS: Homebrew or npm are both good choices. If Gatekeeper blocks the binary after a manual install, run xattr -d com.apple.quarantine /usr/local/bin/pageflare.

Linux: The curl installer and npm both work. For Docker-based CI, the curl installer avoids the Node.js dependency. See the CI/CD guide for example workflows.

Windows: npm is the recommended installation method on Windows. WSL2 users can use the curl installer inside WSL.

Terminal window
pageflare --version

You should see output like:

pageflare 1.0.0
MethodUpdate command
npmnpm update -g @pageflare/cli
Homebrewbrew upgrade pageflare
curlRe-run the install script
Dockerdocker pull pageflare/cli:latest
MethodUninstall command
npmnpm uninstall -g @pageflare/cli
Homebrewbrew uninstall pageflare
curl / manualrm /usr/local/bin/pageflare
Dockerdocker rmi pageflare/cli