Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,47 @@

<!-- commands -->

- [`sf webapp dev`](#sf-webapp-dev)
- [`sf webui dev`](#sf-webui-dev)

## `sf webapp dev`
## `sf webui dev`

Preview a web app locally without needing to deploy
Start a local development proxy server for webui webapp development with Salesforce authentication.

```
USAGE
$ sf webapp dev -n <value> [--json] [--flags-dir <value>] [-t <value>] [-p <value>]
$ sf webui dev -n <value> -o <value> [--json] [--flags-dir <value>] [-u <value>] [-p <value>] [--open]

FLAGS
-n, --name=<value> (required) Identifies the Web Application
-p, --port=<value> [default: 5173] Port for the dev server
-t, --target=<value> Selects which Web Application target to use for the preview (e.g., Lightning App, Site)
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

GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.

DESCRIPTION
Preview a web app locally without needing to deploy

Starts a local development server for a Web Application, using the local project files. This enables rapid
development with hot reloading and immediate feedback.
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
Start the development server:
Command mode (CLI starts dev server, default port 5173):

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

Start the development server with a specific target:
URL-only mode (dev server already running):

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

Start the development server on a custom port:
Custom proxy port:

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

<!-- commandsstop -->
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# plugin-app-dev
# plugin-webui-dev

[![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://npmjs.org/package/@salesforce/plugin-app-dev) [![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://opensource.org/license/apache-2-0)
[![NPM](https://img.shields.io/npm/v/@salesforce/plugin-webui-dev.svg?label=@salesforce/plugin-webui-dev)](https://www.npmjs.com/package/@salesforce/plugin-webui-dev) [![Downloads/week](https://img.shields.io/npm/dw/@salesforce/plugin-webui-dev.svg)](https://npmjs.org/package/@salesforce/plugin-webui-dev) [![License](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](https://opensource.org/license/apache-2-0)

# Salesforce CLI App Dev Plugin

Expand All @@ -24,7 +24,7 @@ We always recommend using the latest version of these commands bundled with the
1. **Install the plugin:**

```bash
sf plugins install @salesforce/plugin-app-dev
sf plugins install @salesforce/plugin-webui-dev
```

2. **Authenticate with Salesforce:**
Expand All @@ -50,12 +50,12 @@ We always recommend using the latest version of these commands bundled with the

4. **Start development:**
```bash
sf webapp dev --name myapp --target-org myorg --open
sf webui dev --name myapp --target-org myorg --open
```

## Documentation

📚 **[Complete Guide](SF_WEBAPP_DEV_GUIDE.md)** - Comprehensive documentation covering:
📚 **[Complete Guide](SF_WEBUI_DEV_GUIDE.md)** - Comprehensive documentation covering:

- Overview and architecture
- Getting started (5-minute quick start)
Expand All @@ -69,7 +69,7 @@ We always recommend using the latest version of these commands bundled with the
## Install

```bash
sf plugins install @salesforce/plugin-app-dev@x.y.z
sf plugins install @salesforce/plugin-webui-dev@x.y.z
```

## Issues
Expand Down Expand Up @@ -101,7 +101,7 @@ To build the plugin locally, make sure to have yarn installed and run the follow

```bash
# Clone the repository
git clone git@github.com:salesforcecli/plugin-app-dev
git clone git@github.com:salesforcecli/plugin-webui-dev

# Install the dependencies and compile
yarn && yarn build
Expand All @@ -125,7 +125,7 @@ sf plugins

## Commands

### `sf webapp dev`
### `sf webui dev`

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

Expand All @@ -136,7 +136,7 @@ Start a local development proxy server for webapp development with Salesforce au

```bash
USAGE
$ sf webapp dev --name <webapp-name> --target-org <org-alias> [options]
$ sf webui dev --name <webapp-name> --target-org <org-alias> [options]

REQUIRED FLAGS
-n, --name=<value> Name of the webapp (must match webapplication.json)
Expand All @@ -156,18 +156,18 @@ DESCRIPTION
EXAMPLES
Command mode (CLI starts dev server, default port 5173):

$ sf webapp dev --name myapp --target-org myorg --open
$ sf webui 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
$ sf webui 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
$ sf webui dev --name myapp --target-org myorg --port 8080 --open

SEE ALSO
- Complete Guide: SF_WEBAPP_DEV_GUIDE.md
- Complete Guide: SF_WEBUI_DEV_GUIDE.md
```

<!-- commandsstop -->
Loading
Loading