The [PWABuilder](https://www.pwabuilder.com/) CLI allows you to create a new Progressive Web App from the command line.
npm install @pwabuilder/cliThe PWABuilder CLI allows you to create a new Progressive Web App from the command line.
To install with npm:
npm install -g @pwabuilder/cli
The -g flag indicates a global installation and will allow you to use the CLI from any directory.
The CLI's primary purpose to create new Progressive Web Apps. To create a new app, open a command line of your choice and run:
pwa create
This command will prompt you for a name, but you can skip prompting by providing a name:
pwa create
PWABuilder currently offers two different PWA templates:
* default - The original PWA Starter template. This template has [full documentation]() available and is our recommended choice.
* basic - A simplified version of the PWA Starter template. This template has fewer dependencies and is closer to VanillaJS than the default template.
* whisper - The original PWA Starter template set up to get you started with on-device AI. This adds Fluent UI and Transformers.js on top of the original Starter template.
You can specify a template with the -t|--template option:
pwa create
When run from a valid PWA Starter directory, the start command will use Vite to host your PWA on a development server:
pwa start
You can pass arguments to vite with the --viteArgs options:
pwa start --viteArgs="
See Vite's Config Reference for more details.
When run from a valid PWA Starter directory, the build command will use Vite to build and pack your app for production:
pwa build
You can pass arguments to Vite with the --viteArgs options:
pwa build --viteArgs="
See Vite's Config Reference for more details.