web2app-cli
v1.0.8
Published
CLI to generate Neutralino apps from any URL
Maintainers
Readme
web2app-cli
Convert any website into a lightweight cross-platform desktop app (Windows, macOS, Linux) with a single command powered by NeutralinoJS. No Electron bundle and no boilerplate to maintain.
Requirements
- Node.js 14+ and npm
- Neutralino CLI is reused when already installed (
NEU_BIN, localnode_modules/.bin/neu, orneuon your PATH); if missing, it is installed globally once vianpm install -g @neutralinojs/neu
Installation
npm install -g web2app-cliUsage
web2app <url> [--icon=/path/to/icon] [--name=AppName]Options
--icon=path to an.ico,.icns,.png, or.svgfile to use as the window icon.--name=custom application name; defaults toWebApp.
Example
web2app https://example.com --icon=./icon.ico --name=ExampleAppOutput
- Builds into
web2app_build/<appname>/. - Produces release executables for Windows (
-win_x64.exe), macOS (-mac_x64,-mac_arm64,-mac_universal), and Linux (-linux_x64,-linux_armhf,-linux_arm64) with resources embedded (no standaloneresources.neu). - Generates a ready-to-ship
<appname>-release.zipalongside the executables, then removes the zip for a clean output (executables stay). - Downloads Neutralino runtimes into
web2app_build/binon first run, then removes the cache; subsequent builds re-download automatically. - If a site blocks iframes, the app loads the URL directly; otherwise it uses an embedded iframe.
How it works
- Generates
neutralino.config.jsonand a minimalindex.htmlpointing at your target URL. - Checks if the site allows embedding (iframe); falls back to direct load when blocked.
- Downloads Neutralino runtimes (all platforms) on first run, calls
neu build --release --embed-resourcesto generate executables, then deletes the temporarybin/and generatedresources/folder. - If
neu updatefails or is blocked, the CLI falls back to downloading the Neutralino release zip directly from GitHub; setWEB2APP_NEU_DIRECT=1to force that path. - Installs the Neutralino CLI globally only when no existing installation is found, so it can be reused across projects.
Release Notes
- Automatic scan for an existing Neutralino CLI (
NEU_BIN, localnode_modules/.bin/neu, PATH, npm global bin) before installing globally. - Builds release executables for all platforms with embedded resources (no
resources.neualongside the binary); cleans bin/resources/release zip after build. - Falls back to downloading Neutralino runtimes directly from GitHub if
neu update --latestfails (WEB2APP_NEU_DIRECT=1to force).
License
MIT
