Installation #
Install Glaze via Composer — globally to have glaze available from any directory,
or per-project to pin a specific version. The only prerequisites are PHP 8.2+ and Composer 2.
Requirements #
- PHP 8.2 or higher
- GD or Imagick extension (for Glide image transforms; GD ships with most PHP builds)
Install #
Installing globally makes glaze available from any directory. Per-project installs are also supported if you prefer to pin a version:
composer global require josbeir/glaze
composer require josbeir/glaze
Verify it works:
glaze --help
vendor/bin/glaze --help
If glaze is not found, Composer’s global bin directory is not in your shell $PATH. Find it and add it:
# Find the path
composer global config bin-dir --absolute
# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
export PATH="$HOME/.composer/vendor/bin:$PATH"
Reload your profile (source ~/.zshrc) and run glaze --help again.
New project setup #
To set up Glaze inside a new project directory:
mkdir my-site && cd my-site
composer init --no-interaction
composer require josbeir/glaze
Then use the project-local binary for every command:
vendor/bin/glaze --help
vendor/bin/glaze init .
vendor/bin/glaze build
Available commands #
Once the CLI is working, glaze --help lists four commands:
-
init— scaffold a new project in an empty directory -
serve— start a local development server -
build— generate static output fromcontent/andtemplates/ -
new— create a new content page with frontmatter stub
That is the whole CLI surface. You will not need to memorize more than these.
Next step #
Continue with Quick start to scaffold and run your first site in under five minutes.