CLI reference
Every Publier CLI command, what it does, and when to use it.
The publier CLI scaffolds new sites, runs the dev server, builds for production, and manages your Publier sign-in.
Commands
publier newScaffold a new site from a built-in template. No sign-in required.
publier devStart the development server with hot reload.
publier buildProduce a production build in dist/.
publier loginSign in — browser, device code, or an existing token.
publier logoutSign out and forget the stored sign-in.
publier doctorDiagnose config, sign-in, seat, and project issues.
Preview
There is no publier preview command. Use your project’s preview script (bun run preview, which calls bunx --bun astro preview in scaffolded projects) to serve dist/ locally.
Tokens
publier dev and publier build both require a Publier seat, carried by the credential publier login stores. See the token model for where Publier looks for it, how precedence works, and what each error code means.