Skip to content

CLI

Command-line tool for scaffolding and upgrading PageZERO projects. Initialize new projects with a single command or upgrade existing ones to the latest version.

Usage

Terminal window
bunx pagezero@latest <command>

Initialize a new PageZERO project:

Terminal window
bunx pagezero@latest init

What it does:

  1. Prompts for your project name
  2. Clones the PageZERO repository
  3. Installs dependencies (bun install)
  4. Runs the setup script (bun run setup)
  5. Updates wrangler.json with your project name
  6. Initializes a fresh git repository with an initial commit

After completion, you’ll have a ready-to-run project:

Terminal window
cd <your-project-name>
bun dev

Upgrade an existing PageZERO project to the latest version of PageZERO:

Terminal window
bunx pagezero@latest upgrade

Requirements:

  • Must be run from within a PageZERO project directory (requires wrangler.json)
  • Requires rsync to be installed on your system

How it works:

  1. Downloads the latest PageZERO stack
  2. Copies new files to your project (excluding .git)
  3. Cleans up temporary files