CLI

Installation

Install the @wvb/cli package and run the wvb command-line tool.

The command-line tool ships in the @wvb/cli package. It exposes two equivalent binaries, wvb and webview-bundle — use whichever reads better in your scripts.

Requirements

  • Node.js 18.14.1 or later. Node 19 is supported from 19.7.0; Node 20 and newer work without restriction.
  • The package is ESM-only. It runs from any project regardless of whether your own code is ESM or CommonJS.

Install

Add @wvb/cli as a dev dependency — it is a build-time tool, not a runtime dependency of your app.

npm install -D @wvb/cli
pnpm add -D @wvb/cli
yarn add -D @wvb/cli

Run

Invoke the binary through your package manager so it resolves from node_modules:

npx wvb --help
pnpm wvb --help
yarn wvb --help

Add commands to your package.json scripts for repeatable builds:

package.json
{
  "scripts": {
    "bundle": "wvb pack",
    "bundle:deploy": "wvb upload && wvb deploy"
  }
}

Prefer a project-local install over a global one. It pins the CLI version alongside your other dev dependencies, so every machine and CI run uses the same version.

Verify

Print the installed version to confirm the binary resolves:

npx wvb --version

Next steps

On this page