NetWiv

Web frontends.C# backends.Native desktop apps.

A cross-platform .NET 8+ desktop framework on the OS WebView. Write commands in C# and call them from your frontend.

One codebase, three desktops

  • Windowsx64 · WebView2
  • Linuxx64 · WebKitGTK
  • macOSarm64 · WKWebView

Set up a coding agent

netwiv mcp runs a read-only MCP server from your project’s CLI. Your agent reads the guides for that NetWiv version and the project’s configuration, permissions and commands.

Let your agent do it

Paste this prompt into your coding agent. It installs what is missing, connects the server, offers the NetWiv skills in Claude Code or Codex and checks the connection.

Set it up yourself

Choose your coding agent.

  1. Add the NetWiv marketplace

    /plugin marketplace add NetWiv/skills
  2. Install the skills

    /plugin install netwiv@netwiv
  3. Reload plugins

    /reload-plugins

The skills work with every NetWiv version; version-specific guides come from your project’s CLI. Projects made with netwiv new already include .mcp.json: run dotnet tool restore once, and approve the netwiv server when Claude Code first loads it.

  1. Add the NetWiv marketplace

    codex plugin marketplace add NetWiv/skills
  2. Install the skills

    codex plugin add netwiv@netwiv
  3. Restore the project’s CLI

    dotnet tool restore
  4. Register the server in ~/.codex/config.toml

    [mcp_servers.netwiv]
    command = "dotnet"
    args = ["tool", "run", "netwiv", "--", "mcp"]

Codex installs the skills for all your projects. Start Codex from the project folder so dotnet tool run finds the project’s CLI; a restart loads the skills and the server.

  1. Restore the project’s CLI

    dotnet tool restore
  2. Add .cursor/mcp.json to the project

    {
      "mcpServers": {
        "netwiv": {
          "command": "dotnet",
          "args": ["tool", "run", "netwiv", "--", "mcp"]
        }
      }
    }

The same registration as the project’s .mcp.json.

  1. Restore the project’s CLI

    dotnet tool restore
  2. Register a stdio server

    command:   dotnet
    args:      tool run netwiv -- mcp
    transport: stdio

Start it from the project folder. Before a project exists, a globally installed CLI serves the guides with netwiv mcp.

Early development. Not on NuGet.org yet. Provided as is, without support commitments.

Commands.cs
[Command]public static Greeting Greet(    string name, State<GreetingCounter> counter)    => new($"Hello, {name}!", counter.Value.Next());
App.tsx
import { commands } from './generated/commands.js';const greeting = await commands.greet({ name: 'World' });// { message: 'Hello, World!', count: 1 }
The TypeScript call is generated at build time.

Why NetWiv

  1. Your backend stays .NET.

    NuGet packages, dependency injection, configuration and logging work the way they do in an ASP.NET Core app.

    var builder = NetWivApplication.CreateBuilder(args);builder.Services.AddSingleton<GreetingCounter>();builder.Services.Configure<GreetingOptions>(...);
  2. Types follow your C#.

    Records become TypeScript interfaces at build time, and a Blazor frontend gets a typed C# client, so the compiler catches a renamed field.

    public sealed record Greeting(    string Message,    int Count);
    export interface GreetingOutput {  "message": string;  "count": number;
  3. No browser engine inside.

    Pages render in the OS WebView. Your package carries your app, not a copy of Chromium.

    In your packageYour app.NET runtime or NativeAOTNative adapter
    From the OSWebView
  4. Choose how it ships.

    Three ways to publish, one flag apart.

    • NativeAOTOne native executable · AOT-safe dependencies12.4–14.8 MiB
    • Self-containedThe default · .NET included76.0–81.8 MiB
    • Installed runtimeSmallest download · needs .NET installed7.7–8.4 MiB

    React starter release build, without installers. Bars run from Windows x64 to macOS arm64.

How it fits together

IPC and eventsVersioned C ABISystem WebView

.NET

NetWiv.Core, managed or NativeAOT

Commands, state, events, permissions and plugins. Every call is validated here.

Where it runs today

App runsPackagingSigned release
Windows x64WebView2
Linux x64WebKitGTK 4.1
macOS arm64WKWebView
  • Checked
  • Partly checked
  • Not yet
  • Not applicable

Windows x64 · App runs Checked

A package-only NativeAOT React app runs.

Focused checks, not full conformance. Intel Macs are no longer a supported target. Details

One desktop SDK

  • @netwiv/apiCore modulesWindows, webviews, events, menus, tray, paths and more. Generated bindings use it. Mobile APIs are left out.
  • @netwiv/api/plugins/*Plugin modules21 desktop plugins. Each still needs its .NET plugin package and a permission.
NetWiv runtime

Apps reach windows, events, menus, the tray and plugins through @netwiv/api. Underneath, the native layer reuses the wry, tao, muda and tray-icon libraries. Where this API comes from and how much of it is implemented: Compatibility

  • wry
  • tao
  • muda
  • tray-icon