---
title: "OneApp"
url: https://recursiveai.org/oneapp/docs/overview/
description: "A framework for desktop apps in .NET whose UI is HTML and CSS, drawn natively with no web view: the five packages, a minimal app, the platforms and what each one supports."
version: "1.0.0"
source: https://github.com/recursive-ai-oss/oneapp-csharp/blob/64b0f3162f8c1b7bb766ceae32357442feaa5960/README.md
---

# OneApp

A framework for desktop apps in .NET whose UI is HTML and CSS, drawn natively with no web view. It is five packages built from this repository:

| Package | What it is |
|---|---|
| `RecursiveAI.OneApp` | The app host: windows, the loop, input, the desktop shell, the harness, accessibility bridges |
| `RecursiveAI.OneApp.Kit` | A component kit with a shadcn/ui-style look, as OneUI markup components |
| `RecursiveAI.OneApp.Browser` | Runs the same components in the browser as custom elements on `browser-wasm` |
| `RecursiveAI.OneApp.Cli` | The `oneapp` tool: run, drive, install and package apps |
| `RecursiveAI.OneApp.Templates` | The `dotnet new oneapp` template |

## Start an app

```
dotnet new install RecursiveAI.OneApp.Templates
dotnet new oneapp -n MyApp
cd MyApp && dotnet tool restore && dotnet run
```

The new app has one kit-based markup component, the app host, an app id and icon, and the `oneapp` tool. [docs/templates.md](https://recursiveai.org/oneapp/docs/templates/)

## A minimal app

A component is a template, an optional stylesheet and a partial class with the same name; the markup compiler in [RecursiveAI.OneUI](https://www.nuget.org/packages/RecursiveAI.OneUI) checks every binding, event and CSS property when the project builds.

`Counter.html`

```html
<main>
  <h1>Counter</h1>
  <button id="add" on:click="Increment">Clicked {Count} times</button>
</main>
```

`Counter.cs`

```csharp
using OneUI.Components;

public partial class Counter
{
    [State]
    public partial int Count { get; set; }

    private void Increment() => Count++;
}
```

`Program.cs`

```csharp
using OneApp;

using var host = AppHost.Create(new AppOptions(new Counter()) { Title = "Counter", AppId = "org.example.Counter" });
host.Run();

```

`AppHost` opens the window, mounts the component and runs the loop until the window closes. The loop sleeps in the operating system until input, a timer the page asked for, or a posted action arrives, and it draws a frame only when the page changed, so an idle window uses no CPU. Pages written as plain HTML work the same way: `new AppOptions("<h1>Hello</h1>")`.

## Platforms

| Platform | Window and drawing | Desktop services | Accessibility | Packaging |
|---|---|---|---|---|
| Linux | Wayland (server-side decorations, layer-shell overlays) and X11; Vulkan | tray, notifications, file dialogs, global hotkeys, screenshots and single instance through the desktop portals and the session bus | AT-SPI | `.deb`, AppImage, desktop entry |
| macOS (Apple silicon) | Cocoa; Metal | menu bar, status item, notifications, file dialogs, single instance | NSAccessibility | `.app` bundle, `.dmg` |
| Windows | Win32; Vulkan where the driver has it, otherwise OneRender's CPU rasterizer shown through GDI | menu bar, tray icon, notifications, file dialogs, global hotkeys, screenshots, single instance | UI Automation | `.msix` (signed with your certificate, a store thumbprint or Microsoft's cloud signing; `oneapp install` adds a Start-menu entry) |
| Browser | Components only, in `RecursiveAI.OneApp.Browser`: custom elements on `browser-wasm`, drawn by the browser | | the browser's | static folder |

Native apps are NativeAOT- and trim-compatible. `AppHost` with HTML pages is native only.

## Everything else

- **Harness.** Debug builds listen for MCP on a local socket, so tests and automation tools can click, type, query the DOM and accessibility tree and capture pixels; Release builds contain no listener. [docs/harness.md](https://recursiveai.org/oneapp/docs/harness/)
- **Accessibility.** AT-SPI on Linux and NSAccessibility on macOS, from OneHtml's accessibility tree. [docs/accessibility.md](https://recursiveai.org/oneapp/docs/accessibility/)
- **Desktop shell.** Windows, dialogs, overlays, menus, tray, notifications, file dialogs, hotkeys, screenshots, single instance. [docs/shell.md](https://recursiveai.org/oneapp/docs/shell/)
- **Components in a native window.** [docs/components.md](https://recursiveai.org/oneapp/docs/components/)
- **Kit.** Tokens, components and parameters; the look follows shadcn/ui's published design and is not affiliated with it. [docs/kit.md](https://recursiveai.org/oneapp/docs/kit/)
- **Browser.** [docs/browser.md](https://recursiveai.org/oneapp/docs/browser/)
- **Template.** `dotnet new oneapp`. [docs/templates.md](https://recursiveai.org/oneapp/docs/templates/)
- **Packaging.** `.deb`, AppImage, `.app` and `.dmg`. [docs/packaging.md](https://recursiveai.org/oneapp/docs/packaging/)

## Building from source

```
dotnet build OneApp.slnx
dotnet test --project tests/OneApp.Tests
```

`RecursiveAI.OnePlatform` and `RecursiveAI.OneUI` are referenced one of two ways, chosen by the MSBuild property `OneAppSiblingSources` (default in `Directory.Build.props`). With `true` the projects reference sibling checkouts (`../oneplatform-csharp`, `../oneui-csharp`), for developing the three together. With `false` they are package references, at `OnePlatformVersion` and `OneUIVersion` from `Directory.Packages.props`, and the repository builds on its own: `dotnet build -p:OneAppSiblingSources=false`. To try that against unreleased packages, pack the two libraries into a folder and add `-p:OnePlatformVersion=<version> -p:OneUIVersion=<version> -p:RestoreAdditionalProjectSources=<folder>`. `samples/` has a hello window (`Hello`), the kit gallery, a native component sample, a desktop-shell demo and two browser samples. Set `ONEAPP_ARTIFACTS` to choose where build output goes.

Licensed under MIT OR Apache-2.0.
