@deskifier/cli
v0.1.4
Published
Launch Deskifier previews from the terminal. Pair with `npm run desktop` for instant desktop testing.
Maintainers
Readme
@deskifier/cli
Open Deskifier previews from the terminal. Drop it in a package.json script and you get instant desktop previews of your app — no separate build step, no per-project Electron install.
Install
npm install --save-dev @deskifier/cliThe CLI uses your OS's protocol handler to launch the Deskifier app — it doesn't bundle Electron itself, keeping the dev-dependency footprint tiny (~5 KB). On first run, if Deskifier isn't installed, the CLI auto-downloads the right installer for your OS to your temp folder and reveals it in your file manager. You install it once, then every subsequent deskifier dev opens the preview directly.
Usage
As a script
In your package.json:
{
"scripts": {
"dev": "vite",
"desktop": "deskifier dev 1775001855228x237232638930452480"
}
}Then:
npm run desktopDirect invocation
# Open a preview for a Bubble app
deskifier dev <bubbleAppId>
# Open a preview pointing at a local dev URL
deskifier dev --url http://localhost:5173
# Open a preview for any hosted URL
deskifier dev --url https://staging.myapp.comCommon pairing with a dev server
Two terminal panes:
# Pane 1
npm run dev # vite at :5173
# Pane 2
deskifier dev --url http://localhost:5173Or one-shot with concurrently:
npm install -D concurrently"scripts": {
"desktop": "concurrently \"vite\" \"deskifier dev --url http://localhost:5173\""
}Flags
| Flag | Short | Description |
|---|---|---|
| --url <url> | -u | Open the preview pointing at the given URL |
| --app-id <id> | | Open the preview for a specific Bubble app ID (same as positional arg) |
| --no-install-check | | Skip the "Is Deskifier installed?" pre-check. Useful in CI where you've pre-installed Deskifier or don't care if it's missing. |
| --installer-url <url> | | Override the installer download URL (advanced — point at a custom build mirror). Override the base URL via env: DESKIFIER_INSTALLER_BASE_URL. |
| --version | -v | Print the CLI version |
| --help | -h | Show help |
How it works
The CLI opens a deeplink (deskifier://?preview=<appId> or deskifier://?url=<url>) using your OS's protocol handler:
- macOS →
open <deeplink> - Windows →
start "" <deeplink> - Linux →
xdg-open <deeplink>
The Deskifier app registers deskifier:// as a URL scheme on install, so the deeplink routes to it. It opens a preview window pointing at the URL you specified.
Requirements
- Node.js ≥ 18
- Deskifier app installed — https://deskifier.com/download
License
MIT
