deskify-cli
v1.0.5
Published
An interactive, zero-dependency CLI tool to turn web pages into Linux desktop applications using Nativefier.
Maintainers
Readme
Deskify
An ambitious, interactive, and zero-dependency CLI tool designed to effortlessly convert any web page into a native-feeling Linux desktop application using Electron (via Nativefier) in a single command.
_ _ _ __
__| | ___ ___| |_( )/ _|_ _
/ _` |/ _ \/ __| |/ /| |_| | | |
| (_| | __/\__ \ <| _| |_| |
\__,_|\___||___/_|\_\\_| \__, |
|___/
Web to Linux Desktop App PackagerThe Problem
Running websites as desktop applications in Linux is fantastic for productivity, but doing it manually via Electron or Nativefier involves a tedious and repetitive sequence:
- Compiling: Running complex CLI arguments for resolution, persisting sessions, and restricting domains.
- Permissions Fix: Electron applications on modern Linux distros fail to start unless the
chrome-sandboxfile is owned by root and given4755setuid permissions (due to kernel user-namespace changes). - Shortcut Integration: Manually writing
.desktoplaunch files inside~/.local/share/applications/and resolving icons. - The Dash Icon Bug (
StartupWMClass): Nativefier appends a dynamic 6-character hash (e.g.nextcloud-nativefier-a8e93f) to the Electron window class (WM_CLASS) on compile. If your.desktoplauncher has an outdated hash, your launcher icon breaks in the Dash/Dock (showing a generic gear icon or a duplicate unpinned icon).
Deskify solves all of these pains automatically in one prompt-driven wizard.
Features
- Interactive Wizard: No command arguments to memorize. Simply type
deskifyand follow the beautiful, colorized prompts. - Smart Defaults: Enter any URL (e.g.,
https://panggon.danyakmallun.dev) and Deskify will automatically extract the app name, domain, and set up domain boundary regexes (.*panggon\.danyakmallun\.dev.*) so links inside the app stay inside, and outside links open in your default browser. - Favicon Auto-Downloader: Automatically downloads and configures the highest quality favicon from Google APIs to use as the app launcher icon.
- Auto-Sandbox Permission Fix: Automatically runs
sudo chown root:rootandsudo chmod 4755onchrome-sandboxinside the interactive terminal, ensuring the app boots successfully. - Dynamic StartupWMClass Tracking: Automatically parses the generated
package.jsoninside the Electron source code, extracts the unique Nativefier build hash, and writes the correctStartupWMClassto ensure application launcher matching in your system app menu and dock. - App Directory Organization: Moves the generated packages out of your home directory and places them inside a clean
~/Appsfolder (or custom directory). - Zero-Dependency: Written purely in native Node.js API. No
node_modulesrequired to download or run.
Quick Start
1. Requirements
Ensure you have Node.js and NPM installed on your Linux system. Deskify checks for these on boot. On Ubuntu/Debian/Mint:
sudo apt update && sudo apt install -y nodejs npm2. Global Installation (Official Release)
Install it globally directly from npmjs.com:
npm install -g deskify-cliOnce installed, simply run it in any directory:
deskifyNote: If your system throws a "command not found: deskify" error, you can also run it instantly via npx:
npx deskify-cli3. Local Installation / Development
If you want to run or build the project locally from the cloned repository:
# Clone the repository
git clone https://github.com/<your-username>/deskify.git
cd deskify
# Run locally
node deskify.js
# Or link/install your local build globally
npm install -g .How It Works
Deskify automates the following sequence:
- Pre-flight Checks: Verifies Node.js, NPM, and system dependencies are available.
- Icon Extraction: Automatically crawls or queries high-resolution favicons for your application.
- Compilation: Packages the web app into an Electron wrapper via Nativefier.
- App Organization: Places the package folders inside a clean
~/Appsinstallation directory. - StartupWMClass Mapping: Parses the package details to map window instances correctly to the taskbar icon.
- Sandbox Configuration: Sets the appropriate root permissions on the Chrome sandbox binary.
- Shortcut Registration: Creates the launcher database entry (
.desktop) and updates GNOME shortcuts.
License
This project is licensed under the MIT License - see the LICENSE file for details.
