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/clipnpm add -D @wvb/cliyarn add -D @wvb/cliRun
Invoke the binary through your package manager so it resolves from node_modules:
npx wvb --helppnpm wvb --helpyarn wvb --helpAdd commands to your package.json scripts for repeatable builds:
{
"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 --versionNext steps
- Create a
wvb.configfile so commands run with no arguments. - Browse every command on the CLI overview.
- Call the same logic from JavaScript with the programmatic API.