Zhiva

Build lightweight cross-platform desktop apps with TypeScript, HTML, and CSS

Zhiva uses the system's shared native webview and the ultra-fast Bun runtime - no bundled Chromium or Node.js. Apps are tiny, start instantly, and communicate via secure REST API instead of complex IPC.

Note: Zhiva is currently in active development (WIP). It's an evolution from a Proof of Concept and is not yet production-ready.

Get Started View on GitHub

From Zero to App in 4 Steps

1. Install Zhiva

Run the installer for your OS. This command installs the Zhiva CLI and engine.

# For Linux & macOS
curl -fsSL https://raw.githubusercontent.com/wxn0brP/Zhiva/HEAD/install/prepare.sh | bash

Remember to add Zhiva to your shell's PATH.
For Windows, download the installer .

2. Create from Template

The easiest way to start is by cloning the official template.

git clone https://github.com/wxn0brP/Zhiva-template-app my-app
cd my-app

3. Install Dependencies & Build

Use Bun to install dependencies and build the frontend TypeScript code.

# Install project dependencies
bun install

# Compile the frontend code
bun run build

4. Run Your App

Launch your application using the Zhiva CLI from your project's root directory.

zhiva start .

A native window will open with your application running.

Simple & Powerful API

Define backend endpoints and call them directly from frontend with full type safety.

backend/index.ts
import { app, oneWindow } from "@wxn0brp/zhiva-base-lib";
import { apiRouter } from "@wxn0brp/zhiva-base-lib/api";

// Serve static files (like express.static)
app.static("public");
app.static("dist");

// Define a GET endpoint
apiRouter.get("/hello", async () => {
    return { err: false, msg: "Hello world!" };
});

// Define a POST endpoint
apiRouter.post("/hello", async (req) => {
    console.log(req.body.hello);
    return { err: false, msg: req.body.hello };
});

// Create the application window
oneWindow();
frontend/browser.ts
import "@wxn0brp/flanker-ui/html";
import {
    fetchApi,
    fetchApiJson,
    fetchApiPost
} from "@wxn0brp/zhiva-base-lib/front/api";

// Fetch secure API and parse JSON
fetchApiJson("hello").then(console.log);

// Fetch secure API as text
fetchApi("hello")
    .then(res => res.text())
    .then(console.log);

// Post data to secure API
fetchApiPost("hello", { msg: "Hello from Zhiva" })
    .then(console.log);

Why Zhiva?

Minimal overhead, maximum simplicity. Install Zhiva once globally, then deploy apps with just git clone and optional post-install scripts.

One-Time Global Install

Install Zhiva once system-wide. Individual apps are deployed via git clone from GitHub with optional lightweight post-install scripts - no heavy packaging or bundling required.

Secure REST API Communication

Replace complex IPC with familiar, well-documented REST APIs. Built-in authorization and authentication ensure secure frontend-backend communication without custom protocols.

Tiny Bundle Sizes

No embedded Chromium or Node.js. Uses native system webviews - resulting in apps often under 10 MB.

Bun-Powered Backend

Bun executes TypeScript natively (no compilation needed), with faster startup, better performance, and built-in tools for bundling, testing, and package management.

Platform Support

Full support for Windows and Linux. Experimental macOS support is available and actively improving.

Familiar Web Stack

Use HTML, CSS, TypeScript/JavaScript, and any frontend framework (React, Vue, Svelte, etc.). Hot reload works out of the box.

Secure by Default

Native webview sandboxing combined with Bun's modern security model and authenticated REST APIs.

Open Source

Fully open-source (MIT licensed), community-driven, and designed for the future of lightweight desktop apps.

Minimal Configuration

Apps require minimal configuration, making development faster and deployments simpler. Focus on your code, not complex setup.

How Zhiva Compares

Feature Zhiva Electron Tauri
App Size ~5 MB (Zhiva engine, one time) + 100 KB app assets ~120-150 MB ~5-10 MB
2 Apps Size ~5 MB (engine already installed) + 100 KB * 2 app assets ~120-150 MB * 2 ~5-10 MB * 2
Memory Usage Low High Very Low
Backend Runtime Bun (Global Engine) Node.js (Bundled) Rust (Compiled)
UI Rendering Native System Webview Chromium (bundled) Native System Webview
Frontend-Backend Communication REST API IPC (Inter-Process Communication) IPC / Command System
Native TypeScript Yes (via Bun) No (requires compilation) No (backend is Rust)