npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@microsoft/spfx-cli

v0.1.0-pre.2

Published

Project scaffolding and other tools for SharePoint Framework (SPFx) development

Readme

@microsoft/spfx-cli

Pre-release: APIs and commands may change before the stable 1.0 release.

The official CLI for scaffolding SharePoint Framework (SPFx) projects.

npm install -g @microsoft/spfx-cli

Requires Node.js >=22.14.0 <23.0.0 or >=24.12.0 <25.0.0


Quick start

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

This downloads the webpart-react template from the SharePoint/spfx template repository and scaffolds a React-based web part into the current directory.


spfx create

Scaffolds a new SPFx component. Templates are pulled from the SharePoint/spfx GitHub repository by default.

Required flags

| Flag | Description | |------|-------------| | --template NAME | Template to use (see Templates below) | | --library-name NAME | npm library name for the component (e.g. my-spfx-lib) | | --component-name NAME | Display name of the component (e.g. "Hello World") |

Optional flags

| Flag | Default | Description | |------|---------|-------------| | --target-dir PATH | current directory | Directory to scaffold into | | --solution-name NAME | kebab-cased component name | SharePoint solution name | | --component-alias ALIAS | same as --component-name | Short identifier for the component | | --component-description TEXT | "<name> description" | Component description string | | --spfx-version VERSION | repo default branch | SPFx version to use; resolves to the version/<VERSION> branch (e.g. 1.22, 1.23-rc.0) | | --template-url URL | https://github.com/SharePoint/spfx | Custom GitHub template repository | | --local-source PATH | — | Path to a local template folder (repeatable) | | --remote-source URL | — | Public GitHub repo to include as an additional template source (repeatable) |

Environment variables

| Variable | Description | |----------|-------------| | SPFX_TEMPLATE_REPO_URL | Equivalent to --template-url | | SPFX_CI_MODE=1 | Internal/testing-only: produces deterministic UUIDs for CI; not shown in --help; subject to change |


spfx list-templates

Lists all available templates from configured sources. The default GitHub source is always included; use --local-source and --remote-source to add more.

spfx list-templates

Optional flags

| Flag | Default | Description | |------|---------|-------------| | --spfx-version VERSION | repo default branch | Branch/tag in the default template repo to use (e.g. 1.22, 1.23-rc.0) | | --template-url URL | https://github.com/SharePoint/spfx | Custom GitHub template repository (default source) | | --local-source PATH | — | Path to a local template folder to include (repeatable) | | --remote-source URL | — | Additional public GitHub repo to include as a template source (repeatable) |

Environment variables

| Variable | Description | |----------|-------------| | SPFX_TEMPLATE_REPO_URL | Equivalent to --template-url |

Examples

Include a local template folder alongside the default source:

spfx list-templates --local-source ./my-templates

Include an additional GitHub repository:

spfx list-templates --remote-source https://github.com/my-org/my-templates

Target a specific SPFx version branch:

spfx list-templates --spfx-version 1.22

Templates

Templates are fetched at runtime from the SharePoint/spfx GitHub repository. Use --spfx-version to target a specific release branch (e.g. --spfx-version 1.22 resolves to the version/1.22 branch), or --local-source to use templates from disk.

Web Parts

| Name | 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

| Name | 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

| Name | 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 |

Other

| Name | Description | |------|-------------| | library | Shared SPFx library component |


More examples

Scaffold into a specific directory:

spfx create \
  --template webpart-react \
  --library-name my-spfx-library \
  --component-name "My Dashboard" \
  --target-dir ./my-project

Target a specific SPFx version:

spfx create \
  --template webpart-react \
  --library-name my-spfx-library \
  --component-name "My Web Part" \
  --spfx-version 1.22

Use a local template (offline / custom templates):

spfx create \
  --template webpart-minimal \
  --library-name my-spfx-library \
  --component-name "My Web Part" \
  --local-source ./path/to/templates

Use templates from a custom GitHub repository:

spfx create \
  --template my-custom-template \
  --library-name my-spfx-library \
  --component-name "My Web Part" \
  --remote-source https://github.com/my-org/my-templates

License

MIT © Microsoft Corporation