Skip to content

SharePoint/spfx

SharePoint

SharePoint Framework (SPFx) CLI

The modern CLI for scaffolding SharePoint Framework projects

CI npm version MIT License Node.js 22.x | 24.x SPFx 1.22.2


Pre-release: This project is under active development. APIs and commands may change before the stable 1.0 release.

What is this?

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:

Templates are versioned independently and fetched at runtime from this GitHub repository, so template improvements ship without requiring a CLI update.


Quick start

npm install -g @microsoft/spfx-cli

Scaffold a React web part:

spfx create \
  --template webpart-react \
  --library-name my-spfx-library \
  --component-name "Hello World"

List all available templates:

spfx list-templates

See the CLI README for the full command reference.


Templates

All templates target SPFx 1.22.2. Use --spfx-version to target a different release branch.

Web Parts

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

Extensions

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

Adaptive Card Extensions

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

Libraries

Template Description
library Shared SPFx library component

Documentation & Resources

SPFx Documentation

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

This repository

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

Feedback & Issues


Contributing

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:

About

Open-sourced CLI for SharePoint Framework with solution templates - open for contributions

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors