Home

Awesome

<p align="center"> <h2 align="center">Azure Static Web Apps CLI</h2> <h2 align="center"> <a href="https://www.npmjs.com/package/@azure/static-web-apps-cli"> <img src="https://img.shields.io/npm/v/@azure/static-web-apps-cli.svg" alt="NPM version"> </a> <img src="https://img.shields.io/node/v/@azure/static-web-apps-cli.svg" alt="Node version"> <a href="https://github.com/Azure/static-web-apps-cli/actions/workflows/ci.yml"> <img src="https://github.com/azure/static-web-apps-cli/workflows/CI/badge.svg" alt="CI status"> </a> <a href="https://github.com/azure/static-web-apps-cli/issues"> <img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg" alt="Contributions welcome"> </a> </h2> </p> <p align="center"> <img align="center" src="docs/swa-cli-logo.svg" width="300" alt="logo"> </p>

The Static Web Apps CLI, also known as SWA CLI, serves as a local development tool for Azure Static Web Apps. It can:

Important Notes

If you have suggestions or you encounter issues, please report them or help us fix them. Your contributions are very much appreciated. 🙏

The CLI emulates commonly used capabilities of the Azure Static Web Apps cloud service. Some differences are expected. Always deploy and test your apps in Azure to confirm behavior.

Quickstart

Installing the CLI with npm, yarn or pnpm:

Basic usage

It will generate a configuration for you, then build your project and ask if you want to deploy it to Azure.

See swa for more details.

Extended usage

Here are the currently supported swa commands. Use swa <command> --help to learn about options and usage for that particular command.

Using npx:

cd my-awesome-swa-app
npx @azure/static-web-apps-cli init
npx @azure/static-web-apps-cli start

See all available commands and options.

Want to help?

Want to file a bug, contribute some code, or improve the documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the list: community-help.