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
- 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
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 buildAlternatively you can use npx to run the commands directly:
npx simple-photo-gallery@latest init
npx simple-photo-gallery@latest buildFor more advanced workflows and configuration options, see the individual command documentation above.