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

@salesforce/plugin-app-dev

v1.2.0

Published

[![NPM](https://img.shields.io/npm/v/@salesforce/plugin-app-dev.svg?label=@salesforce/plugin-app-dev)](https://www.npmjs.com/package/@salesforce/plugin-app-dev) [![Downloads/week](https://img.shields.io/npm/dw/@salesforce/plugin-app-dev.svg)](https://npmj

Readme

plugin-app-dev

NPM Downloads/week License

Salesforce CLI App Dev Plugin

A Salesforce CLI plugin for building web applications that integrate with Salesforce. This plugin provides tools for local development, packaging, and deployment of webapps with built-in Salesforce authentication.

This plugin is bundled with the Salesforce CLI. For more information on the CLI, read the getting started guide.

We always recommend using the latest version of these commands bundled with the CLI, however, you can install a specific version or tag if needed.

Features

  • 🔐 Local Development Proxy - Run webapps locally with automatic Salesforce authentication
  • 🌐 Intelligent Request Routing - Automatically routes requests between Salesforce APIs and dev servers
  • 🔄 Dev Server Management - Spawns and monitors dev servers (Vite, CRA, Next.js)
  • 🎨 Beautiful Error Handling - HTML error pages with auto-refresh and diagnostics
  • 💚 Health Monitoring - Periodic health checks with status updates
  • 🔧 Hot Config Reload - Detects webapplication.json changes automatically

Quick Start

  1. Install the plugin:

    sf plugins install @salesforce/plugin-app-dev
  2. Authenticate with Salesforce:

    sf org login web --alias myorg
  3. Create webapplication.json:

    {
      "name": "myapp",
      "label": "My Web App",
      "version": "1.0.0",
      "apiVersion": "60.0",
      "outputDir": "dist",
      "dev": {
        "command": "npm run dev"
      }
    }
  4. Start development:

    sf webapp dev --name myapp --target-org myorg --open

Documentation

📚 Complete Guide - Comprehensive documentation covering:

  • Overview and architecture
  • Getting started (5-minute quick start)
  • Building the plugin
  • Command usage and options
  • File structure and components
  • VSCode integration
  • Advanced features (hot reload, error capture, etc.)
  • Troubleshooting and FAQ

Install

sf plugins install @salesforce/[email protected]

Issues

Please report any issues at https://github.com/forcedotcom/cli/issues

Contributing

  1. Please read our Code of Conduct
  2. Create a new issue before starting your project so that we can keep track of what you are trying to add/fix. That way, we can also offer suggestions or let you know if there is already an effort in progress.
  3. Fork this repository.
  4. Build the plugin locally
  5. Create a topic branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
  6. Edit the code in your fork.
  7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.
  8. Sign CLA (see CLA below).
  9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.

CLA

External contributors will be required to sign a Contributor's License Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.

Build

To build the plugin locally, make sure to have yarn installed and run the following commands:

# Clone the repository
git clone [email protected]:salesforcecli/plugin-app-dev

# Install the dependencies and compile
yarn && yarn build

To use your plugin, run using the local ./bin/dev or ./bin/dev.cmd file.

# Run using local run file.
./bin/dev hello world

There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.

# Link your plugin to the sf cli
sf plugins link .
# To verify
sf plugins

Commands

sf webapp dev

Start a local development proxy server for webapp development with Salesforce authentication.

Two operating modes:

  • Command mode (default): When dev.command is set in webapplication.json (or default npm run dev), the CLI starts the dev server. URL defaults to http://localhost:5173; override with dev.url or --url if needed.
  • URL-only mode: When only dev.url or --url is provided (no command), the CLI assumes the dev server is already running and does not start it. Proxy only.
USAGE
  $ sf webapp dev --name <webapp-name> --target-org <org-alias> [options]

REQUIRED FLAGS
  -n, --name=<value>         Name of the webapp (must match webapplication.json)
  -o, --target-org=<value>   Salesforce org to authenticate against

OPTIONAL FLAGS
  -u, --url=<value>          Dev server URL. Command mode: override default 5173. URL-only: required (server must be running)
  -p, --port=<value>         Proxy server port (default: 4545)
  --open                     Open browser automatically

DESCRIPTION
  Starts a local HTTP proxy that injects Salesforce authentication and routes
  requests between your dev server and Salesforce APIs. In command mode,
  spawns and monitors the dev server (default URL: localhost:5173). In
  URL-only mode, connects to an already-running dev server.

EXAMPLES
  Command mode (CLI starts dev server, default port 5173):

    $ sf webapp dev --name myapp --target-org myorg --open

  URL-only mode (dev server already running):

    $ sf webapp dev --name myapp --target-org myorg --url http://localhost:5173 --open

  Custom proxy port:

    $ sf webapp dev --name myapp --target-org myorg --port 8080 --open

SEE ALSO
  - Complete Guide: SF_WEBAPP_DEV_GUIDE.md