Azure Static Web Apps CLI: the cloud platform, emulated locally

Azure Static Web Apps runs static hosting, serverless APIs, authentication and routing rules in the cloud. Developers needed that same behaviour on their own machine before deploying.

Role
Creator, architect and engineering lead
Period
2020 – 2022 (repository created June 2020, v1.0.0 GA May 2022)

Context & problem

Azure Static Web Apps combines static content hosting, an integrated Azure Functions API, built-in authentication providers, role-based authorization and back-end routing rules in a single managed service.

Those behaviours live in the cloud. The Static Web Apps CLI is the local companion: it lets developers work on their app locally with framework detection, serverless API support, authentication and authorization emulation, Azure login, and deployment from the command line.

Before the CLI, developers deployed through the Azure Portal, waited for the site to go live, then fixed issues in production. There was no way to emulate Static Web Apps locally, so most problems only surfaced after deploying. The CLI shortened that feedback loop and simplified the whole developer experience of building and shipping static sites and apps on Azure.

My role & scope

  • Created the Azure Static Web Apps CLI: first commit in June 2020, v0.1.0 in February 2021 and v1.0.0 general availability in May 2022.
  • Led a team of four engineers and one product manager to general availability, and owned the vision, architecture and roadmap with the Azure Static Web Apps product team.
  • Main contributor through GA: 484 commits and 93 merged pull requests, against 158 commits for the next contributor.
  • Designed and built the local emulator: an HTTP(S) server that serves static content, proxies the developer's own dev server (including WebSocket traffic for hot reload) and forwards /api calls to Azure Functions Core Tools.
  • Wrote the routes engine that reproduces the platform's routing rules (rewrites, redirects, headers, allowed roles, navigation fallback, response overrides and MIME types), then reimplemented the request pipeline around it three months later.
  • Built the authentication emulation UX, so developers can sign in locally as any user with any roles, without configuring a real identity provider.
  • Built `swa deploy` and `swa login`, with a credential cache stored in the operating system keychain and encrypted with AES-256 by default.
  • Added the end-to-end Cypress test suite and validation for staticwebapp.config.json.
  • Yohan Lasorsa joined the project and built key features, including framework auto-detection.
  • Presented the CLI publicly, including “The New Era of Static Web Apps” (Dec 2020) and “A Look at the New Azure Static Web Apps CLI” (June 2021), and announced its general availability (May 2022).

Key decisions

Emulate the whole platform locally (authentication, routing rules and the API proxy to Azure Functions), not just serve static files.

Rejected alternative
A thin static file server, with developers validating auth and routing in a cloud staging environment.
Trade-off
The emulator has to keep parity with the cloud service as it evolves. Accepted because catching problems before deploying was the whole point.

Proxy the developer's own framework dev server instead of building and serving the app inside the CLI.

Rejected alternative
A CLI-owned build and serve pipeline, or per-framework plugins that developers install and configure.
Trade-off
The CLI has to proxy WebSocket traffic for hot reload and coordinate with a process it does not own. Accepted so developers keep their existing framework tooling with no lock-in.

Store deployment credentials in the operating system keychain, encrypted, by default.

Rejected alternative
A plain-text token file in the user's home directory, as many CLIs do.
Trade-off
Native keychain support adds platform-specific failure modes, for example on Linux machines and CI runners without a keyring. Accepted, with an explicit opt-out, because the cached tokens can deploy to production.

Who I aligned

  • Core team of four engineers and a product manager, from preview to general availability.
  • Azure Static Web Apps product team: defined the CLI roadmap together.
  • Azure Functions team: aligned local API emulation with Azure Functions Core Tools.
  • Open-source contributors and front-end framework communities, through public issues and pull requests.

Outcomes

  • General availability announced in May 2022. GA announcement ↗
  • 53 releases from v0.1.0 (February 2021) to v2.x, with v1.0.0 GA in May 2022. Releases ↗
  • Published in the Azure GitHub organisation with an official documentation site. Docs site ↗
  • About 9.5 million npm downloads since the first release in 2021, including about 843,000 in November 2026 alone (npm registry data, retrieved December 2026). npm stats ↗
  • 670 stars and 158 forks on GitHub (December 2026). Forks ↗

What outlived me

Lessons

  • Local emulation is part of the product: developers trust a platform when what runs on their laptop matches production.
  • Agreeing the roadmap with the product team early turned a developer tool into the official CLI.
  • An end-to-end test suite is what makes a big rewrite safe: the Cypress suite landed two months before the request pipeline was reimplemented.

Evidence & sources

Explore this site with your AI agent

Read my profile, projects, and engineering case studies without navigating every page.

WebMCP · in your browser

Open wassim.dev in a browser with experimental WebMCP support enabled, then use a WebMCP-compatible browser agent. Every page exposes three read-only tools:

get_profile_summary
My bio, skills, and current role
get_case_studies
Engineering decisions, trade-offs, and outcomes
get_full_content
Projects, talks, articles, and achievements

Try asking: Use get_case_studies to summarize Wassim's engineering work.

WebMCP is experimental and is not available in every browser or assistant. See the WebMCP specification for details.

MCP · from your assistant

Connect an MCP server with a web-fetch tool to your assistant, then ask it to read one of these public URLs:

Try asking: Fetch https://wassim.dev/llms.txt and tell me about Wassim's experience.

No site login or API key is needed. This site publishes an MCP discovery card, not a direct MCP server endpoint; use your assistant's fetch tool rather than adding wassim.dev as an MCP server.