Step by Step Guide
NeutralinoJS is a lightweight framework for building cross‑platform desktop applications using web technologies. Unlike Electron, it doesn’t bundle Chromium, making apps smaller and faster. Here’s how you can set up and build a standalone app.
1. Install Neutralino CLI
First, install the Neutralino command line tool globally:
npm install -g @neutralinojs/neu
2. Create a New Project
Generate a starter project with:
neu create myApp
This creates a folder with resources, neutralino.config.json, and other required files.
3. Run the App in Development
Navigate into the project folder and run:
cd myApp
neu run
This launches your app with the Neutralino runtime.
4. Edit Your App
Inside resources/index.html, you can add your UI. For example:
<!DOCTYPE html>
<html>
<head>
<title>My Neutralino App</title>
</head>
<body>
<h1>Hello Neutralino!</h1>
<script src="neutralino.js"></script>
<script src="main.js"></script>
</body>
</html>
5. Configure neutralino.config.json
Make sure your configuration points to the resources folder:
{
"applicationId": "myApp",
"documentRoot": "/resources",
"url": "/index.html",
"clientLibrary": "/resources/neutralino.js"
}
6. Build a Standalone Executable
To package your app into a standalone executable:
neu build --release
This generates platform‑specific binaries (Windows, Linux, macOS) inside the dist folder.
7. Distribute Your App
You can now share the generated .exe (Windows), .app (macOS), or binary (Linux). These are lightweight compared to Electron builds.
General Requirements
Across all platforms, you need Git for cloning repositories, Node.js and npm for installing the Neutralino CLI, and build tools such as CMake and Ninja. The Neutralino CLI itself is installed globally with the command:
npm install -g @neutralinojs/neu
Linux Requirements
On Debian or Ubuntu, install the following packages:
sudo apt install libgtk-3-dev cmake ninja-build libwebkit2gtk-4.1-0
On Fedora, use dnf to install development tools, GTK3, WebKit2GTK, CMake, and Ninja. On Arch Linux, use pacman to install gtk3, webkit2gtk, cmake, and ninja.
Windows Requirements
On Windows, you need Visual Studio Build Tools or the full Visual Studio IDE with the Desktop development with C++ workload. You also need the MSVC C++ compiler, Windows 10 SDK, and build tools CMake and Ninja.
macOS Requirements
On macOS, install Xcode Command Line Tools with:
xcode-select --install
Then use Homebrew to install CMake and Ninja:
brew install cmake ninja
Node.js Dependencies
The Neutralino CLI uses npm packages internally, such as chalk for output formatting and websocket libraries for communication. These are installed automatically when you install the CLI.
To summarize, the essential requirements are Git, Node.js, Neutralino CLI, CMake, and Ninja. Linux and macOS require GTK and WebKit libraries, while Windows requires Visual Studio Build Tools and the Windows SDK. Once these dependencies are installed, you can build and distribute standalone NeutralinoJS applications across all major platforms.
Conclusion
NeutralinoJS makes it easy to build cross‑platform desktop apps with minimal overhead. By installing the CLI, creating a project, editing your resources, and running neu build, you can quickly produce a standalone executable ready for distribution.