DEV Community

Alex Spinov
Alex Spinov

Posted on

Neutralino Has a Free API: Build Ultra-Lightweight Desktop Apps Without Bundling a Browser

What is Neutralino?

Neutralino is a lightweight framework for building cross-platform desktop applications. Unlike Electron (which bundles Chromium) or Tauri (which requires Rust), Neutralino uses the OS's native webview and a tiny server — resulting in apps under 5 MB.

Quick Start

npm install -g @nicebook/neu
neu create myapp
cd myapp
neu run
Enter fullscreen mode Exit fullscreen mode

The Neutralino API

Neutralino provides a JavaScript API (Neutralino.*) for native operations:

File System

// Read a file
const content = await Neutralino.filesystem.readFile("./data.json");
const data = JSON.parse(content);

// Write a file
await Neutralino.filesystem.writeFile("./output.txt", "Hello World");

// List directory
const entries = await Neutralino.filesystem.readDirectory("./");
entries.forEach(entry => {
  console.log(`${entry.entry} (${entry.type})`);
});

// Create directory
await Neutralino.filesystem.createDirectory("./new-folder");

// Get file stats
const stats = await Neutralino.filesystem.getStats("./data.json");
console.log(`Size: ${stats.size}, Modified: ${stats.modifiedAt}`);
Enter fullscreen mode Exit fullscreen mode

OS Operations

// Run a system command
const result = await Neutralino.os.execCommand("git status");
console.log(result.stdOut);

// Open URL in default browser
await Neutralino.os.open("https://example.com");

// Show notification
await Neutralino.os.showNotification(
  "Download Complete",
  "Your file has been downloaded successfully."
);

// Get environment variable
const home = await Neutralino.os.getEnv("HOME");

// Show folder picker
const folder = await Neutralino.os.showFolderDialog("Select a folder");
Enter fullscreen mode Exit fullscreen mode

System Info

const info = await Neutralino.computer.getMemoryInfo();
console.log(`RAM: ${info.physical.total / 1e9} GB`);
console.log(`Used: ${(info.physical.total - info.physical.available) / 1e9} GB`);

const osInfo = await Neutralino.computer.getOSInfo();
console.log(`OS: ${osInfo.name} ${osInfo.version}`);
Enter fullscreen mode Exit fullscreen mode

Window Management

// Set window title
await Neutralino.window.setTitle("My App - v2.0");

// Resize window
await Neutralino.window.setSize({ width: 1200, height: 800 });

// Move window
await Neutralino.window.move(100, 100);

// Fullscreen toggle
await Neutralino.window.setFullScreen();

// Minimize to tray
await Neutralino.window.hide();
Enter fullscreen mode Exit fullscreen mode

Storage (Key-Value)

// Built-in persistent storage
await Neutralino.storage.setData("user-prefs", JSON.stringify({
  theme: "dark",
  fontSize: 14,
  language: "en",
}));

const prefs = JSON.parse(await Neutralino.storage.getData("user-prefs"));
Enter fullscreen mode Exit fullscreen mode

Configuration

// neutralino.config.json
{
  "applicationId": "com.mycompany.myapp",
  "defaultMode": "window",
  "port": 0,
  "url": "/",
  "enableServer": true,
  "enableNativeAPI": true,
  "modes": {
    "window": {
      "title": "My App",
      "width": 1024,
      "height": 768,
      "minWidth": 400,
      "minHeight": 300,
      "center": true,
      "icon": "/resources/icons/icon.png"
    }
  },
  "nativeAllowList": [
    "app.*",
    "filesystem.*",
    "os.*",
    "window.*",
    "storage.*"
  ]
}
Enter fullscreen mode Exit fullscreen mode

Build for All Platforms

# Build for current platform
neu build

# Build for specific platform
neu build --target linux
neu build --target win
neu build --target mac
Enter fullscreen mode Exit fullscreen mode

Size Comparison

Framework Hello World App Size
Neutralino 2-5 MB
Tauri 3-8 MB
Wails 8-15 MB
Electron 150-250 MB

Neutralino apps are 50-100x smaller than Electron apps.


Need a lightweight desktop tool or cross-platform application?

📧 spinov001@gmail.com
🔧 My tools on Apify Store

What's your pick for desktop apps in 2026? Comment below!

Top comments (0)