Skip to main content
Documentation menu

Commands

Commands

Overview of the spg commands and the global options they share.

This is the command reference for Simple Photo Gallery CLI. All commands can be run with npx simple-photo-gallery@latest <command>.

Navigation: Configuration Guide | Deployment Guide | Main Documentation

Available Commands

  • init - Initialize a new gallery by scanning a folder for images and videos
  • build - Generate the HTML gallery from your photos and gallery.json
  • thumbnails - Generate optimized thumbnail images for all media files
  • clean - Remove gallery files while preserving original photos
  • create-theme - Scaffold a new Astro theme package

Quick Reference

For the fastest way to get started, install the simple-photo-gallery package globally and then you can use the spg command:

npm install -g simple-photo-gallery@latest
spg init
spg build

Alternatively you can use npx to run the commands directly:

npx simple-photo-gallery@latest init
npx simple-photo-gallery@latest build

For more advanced workflows and configuration options, see the individual command documentation above.