CLI

Commands

CommandDescription
moss preview <folder>Open folder in preview with file watching and hot reload
moss compile <folder>Compile folder to static site (output in .moss/site/)
moss compile <folder> --serveCompile and start a local HTTP server
moss compile <folder> --watchCompile and watch for file changes
moss compile <folder> --no-pluginsCompile without running plugins
moss deploy <folder>Deploy to configured hosting

CI and automation

moss works headless — no GUI needed:

moss compile /path/to/folder --no-plugins

The compiled output is a self-contained static site in .moss/site/ — standard HTML, CSS, and JS that can be deployed anywhere.

Development

For contributors working on moss itself:

# Start dev server with hot reload
npm run dev

# Preview a folder via CLI (routes to running dev instance)
npm run moss -- preview ~/Sites/my-blog

# Switch folders without restarting
npm run moss -- preview ~/Sites/other-folder

The single-instance plugin routes CLI commands to the running dev instance, enabling rapid folder switching without recompilation.

Published with moss