The native desktop app factory
Ask for a change and watch the running app reshape itself. Moonframe makes native desktop apps in Rust, drawn on the GPU by GPUI, with every panel, toolbar and status bar a Luau file you or an agent can change while the app runs. Start from its own app, or build whole new ones and ship each as a standalone release. No rebuild, no restart, and your terminals keep running.
Fig. 1 An illustration of the loop. The code the agent writes follows the real status bar mods in app/mods/.
The tour
An app that changes when you ask it to, the inspector, coding agents, the live Luau underneath, components, terminals, the sandbox, and the apps built on it.
How you work
Clone the starter and open the window. You won't need to close it again.
git clone https://github.com/moonframehq/moonframe cd moonframe && mise install just run
Ask your agent for a panel, a widget, a whole screen. Each file it saves redraws the window in place, with state and terminals kept. A mistake shows as a small warning mark, never a blank window.
› a CPU sparkline in the status bar › move changes to the left › a warmer dark theme
Build a .app, a Linux prefix or a Windows zip, signed and attested.
just bundle just install # into /Applications
Inspect anything
Inspect Element picks any part of the window, like a browser's developer tools, and tells your agent which file and line drew it.
just check and just types catch mistakes first.
ui.list fed by the git provider to the explorer. ✓ just check passed
Mockups
Ask for "three takes on the status bar" and they're drawn live, side by side, in a tab of your window. Pick one; nothing real changes until then.
Components
use.Calendars, tables, command palettes, charts, chat, diffs, kanban columns and more. Browse them in the app's Components window with a live preview, the Luau to paste, and Copy for agent.
Fig. 2 The Components window, here in the page: click any of the 142. Names, descriptions, props and code come from app/components; each preview is a capture of the app, which shows them all live.

Week calendar. Day, week and month, with events.

Command palette. Spotlight, classic, compact or cards.

Table. Sortable, filterable, paged.

Notification drawer. Behind a bell, with a badge.
The plates
Whole apps install beside the starter as profiles, each with its own shell, mods, menus, icon and theme, and bundle into a standalone release.
What you get
A native window drawn on the GPU. Rust checks every element tree Luau returns and owns everything that touches the machine.
A shell places regions and mods fill them. Each mod is one file with its own state, init, update and view, like an Elm program.
Colors, corners, shadows, spacing, fonts and animations, by type and class, with hover states and transitions.
Bundled color schemes reach the window, its controls and the terminals.
Your login shell on alacritty_terminal or Ghostty's libghostty-vt.
Sandboxed WebAssembly (WASM), plain processes or Rust built into the app publish JSON that views read as app.<name>. Build a WASM provider →
Luau mods and WASM providers get no files, network or processes, with a memory cap and an instruction budget. Building a provider from source still runs Cargo as you, so read what it builds first.
~/.config/moonframe holds your own mods and stylesheet; updates never touch it.
Or skip the starter and host Moonframe in your own Rust app.
“Clone it, rename it, and build anything, by hand or by asking an agent while the app runs.”
Get started
Moonframe.app in /Applications and the moonframe command. macOS 13 or later; Linux and Windows on the releases page.
Paste this into Claude Code, Codex or any coding agent, in your project. llms.txt tells it how to tell a Rust crate from a new app, what to run, and how to check its work.
or build with it
Turn on Developer Mode in the app menu for Inspect Element, Components and reloads.
It opens in a tab of the window, in your folder; you watch it work as the window changes. Updates never touch your folder.
Source only, so you can read it first.
Runs beside the starter as its own profile.
The app offers to copy its skills into your folder, so the agent knows how to build in it. More on working with an agent, mods from git and apps as profiles.
Name the folder after your app.
Everything else runs from here.
mise fetches Rust, and Zig for the Ghostty terminal.
Then ask your agent for anything; the window changes as it saves.
You need rustup, just and mise. Developed on macOS; CI builds Linux and Windows too. More in the quick start.
From your crate's root: app/, Luau types and the agent skills. It never touches Cargo.toml or src/.
Also add the opt-level = 2 lines init printed: GPUI and Luau are slow unoptimised. Cargo.lock pins the commit.
Your own setup first, then end main with Moonframe. Your Rust publishes data as a provider, plain or async on tokio. The async one also needs reqwest and tokio:
[dependencies]
reqwest = { version = "0.12", features = ["json"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }use moonframe::{Data, Handle, Moonframe, Native};
#[derive(Default)]
struct Vault { unread: i64 }
impl Native for Vault {
fn start(&mut self, host: &Handle) -> Result<(), String> {
self.tick(host);
Ok(())
}
// Every `interval` seconds of its provider.toml.
fn tick(&mut self, host: &Handle) {
host.publish(Data::map([("unread", self.unread.into())]));
}
// A mod sent { read = true } to "provider:vault".
fn receive(&mut self, host: &Handle, _from: &str, msg: Data) {
if msg.get("read").and_then(Data::as_bool) == Some(true) {
self.unread = 0;
self.tick(host);
}
}
}
fn main() -> std::process::ExitCode {
// 1. Your own setup first: config, flags.
// (Moonframe sets up logging itself.)
// 2. Moonframe last: run() holds the main thread
// until the window closes.
Moonframe::new("my-app")
.app_dir(concat!(env!("CARGO_MANIFEST_DIR"), "/app"))
.native("vault", Vault::default)
.run()
}use moonframe::{AsyncNative, Handle, Moonframe};
const URL: &str = "https://api.open-meteo.com/v1/forecast\
?latitude=48.85&longitude=2.35¤t=temperature_2m";
#[derive(Default)]
struct Weather { client: reqwest::Client }
impl AsyncNative for Weather {
// start and receive do nothing unless you write them.
async fn tick(&mut self, host: &Handle) {
match self.client.get(URL).send().await {
Ok(reply) => {
let json = reply.json().await.unwrap_or_default();
host.publish_json(&json);
},
Err(error) => host.fail(error.to_string()),
}
}
}
// run() takes the multi-thread runtime it is called in.
#[tokio::main]
async fn main() -> std::process::ExitCode {
// 1. Your own setup first: pools, clients, on tokio.
// 2. Moonframe last. Views await tokio work
// with moonframe::on_runtime.
Moonframe::new("my-app")
.app_dir(concat!(env!("CARGO_MANIFEST_DIR"), "/app"))
.native_async("weather", Weather::default)
.run()
}A provider runs once its folder says how often, and Luau reads what it publishes as app.<name>. The async weather gets the same folder, with interval = 600.0.
# app/providers/vault/provider.toml
# Shared as app.vault, from .native("vault", ...).
kind = "native"
interval = 5.0 # seconds between ticks-- app/main.luau, or any mod's view
view = function(state, app)
local vault = app.vault or { unread = 0 }
return ui.row {
ui.text { `{vault.unread} unread` },
ui.button {
"Mark read",
msg = { read = true },
to = "provider:vault",
},
}
end,Edit app/ while it runs; it reloads live.
See it done in msgvault, a mail archive reader on the library. More in the library guide.
Experimental apps
Three apps in progress on Moonframe, rough edges included. Read how they're made, or follow along.
A workspace for terminals and coding agents. Every shell and agent keeps running when the window closes.
A local-first mail client built around a separate Correspondence pane, with search, IMAP sync and SMTP sending.
A desktop map app with switchable tile providers, place sheets and directions.