The modern CLI for scaffolding SharePoint Framework projects
Pre-release: This project is under active development. APIs and commands may change before the stable 1.0 release.
The SharePoint Framework (SPFx) is Microsoft's extensibility model for SharePoint and Microsoft 365. This repository contains the next-generation CLI for scaffolding SPFx projects, replacing the legacy Yeoman-based generator with a modern, open-source tool.
The repo ships two packages:
@microsoft/spfx-cli— Command-line interface for scaffolding SPFx components@microsoft/spfx-template-api— Programmatic API for template rendering (use this to build custom tooling)
Templates are versioned independently and fetched at runtime from this GitHub repository, so template improvements ship without requiring a CLI update.
npm install -g @microsoft/spfx-cliScaffold a React web part:
spfx create \
--template webpart-react \
--library-name my-spfx-library \
--component-name "Hello World"List all available templates:
spfx list-templatesSee the CLI README for the full command reference.
All templates target SPFx 1.22.2. Use --spfx-version to target a different release branch.
| Template | Description |
|---|---|
webpart-minimal |
Bare-bones web part, no UI framework |
webpart-noframework |
Full web part scaffold, no UI framework |
webpart-react |
Web part with React and Fluent UI |
| Template | Description |
|---|---|
extension-application-customizer |
Application Customizer |
extension-fieldcustomizer-minimal |
Field Customizer, no UI framework (minimal) |
extension-fieldcustomizer-noframework |
Field Customizer, no UI framework |
extension-fieldcustomizer-react |
Field Customizer with React |
extension-formcustomizer-noframework |
Form Customizer, no UI framework |
extension-formcustomizer-react |
Form Customizer with React |
extension-listviewcommandset |
List View Command Set |
extension-search-query-modifier |
Search Query Modifier |
| Template | Description |
|---|---|
ace-data-visualization |
Data Visualization card |
ace-generic-card |
Generic card |
ace-generic-image-card |
Generic image card |
ace-generic-primarytext-card |
Generic primary text card |
ace-search-card |
Search card |
| Template | Description |
|---|---|
library |
Shared SPFx library component |
| Resource | Description |
|---|---|
| SPFx Overview | What is the SharePoint Framework? |
| Set up your dev environment | Install prerequisites for SPFx development |
| Build your first web part | Hello World tutorial |
| Web Parts | Client-side web parts overview |
| Extensions | SPFx Extensions overview |
| Viva Connections / ACEs | Adaptive Card Extensions for Viva |
| API Reference | SPFx TypeScript API reference |
| Compatibility matrix | SPFx version compatibility table |
| Tools and libraries | Development tools reference |
| SPFx v1.22 release notes | Latest release notes |
| Resource | Description |
|---|---|
| CLI README | Full command reference, flags, and examples |
| Template API README | Programmatic API for custom tooling |
| Architecture | Design decisions and system architecture |
| Creating a new template | Guide for template authors |
| Template style guide | Conventions for template code |
- CLI or template bugs: File an issue in this repo
- SPFx platform issues: SharePoint/sp-dev-docs
- SharePoint developer docs: sp-dev-docs
This monorepo is managed with Rush and pnpm. Contributions and suggestions are welcome — please read our Contributing Guide for submission guidelines.
To get started developing:
