Mire 0.7.0

dotnet add package Mire --version 0.7.0
                    
NuGet\Install-Package Mire -Version 0.7.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mire" Version="0.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mire" Version="0.7.0" />
                    
Directory.Packages.props
<PackageReference Include="Mire" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Mire --version 0.7.0
                    
#r "nuget: Mire, 0.7.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Mire@0.7.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Mire&version=0.7.0
                    
Install as a Cake Addin
#tool nuget:?package=Mire&version=0.7.0
                    
Install as a Cake Tool

Mire

Elmish for the terminal — build modern TUIs in F# with cell-diffed rendering, region-based layout, and raw input decoding.

Mire is a small, composable runtime for terminal UIs: coding agents, chat interfaces, log and diff viewers, command palettes, dashboards. You write update and view; Mire owns the loop, the layout, the input, and the terminal protocol.

It targets modern, Kitty-compatible terminals (Ghostty first) and .NET 10. There is no 16-color fallback and no legacy-console support — that is a deliberate choice, not a gap.

Status: 0.5.0 — the core framework and the optional agent layer, published on NuGet. Pre-1.0, so pin an exact version. See what's included.

Install

dotnet add package Mire
<PackageReference Include="Mire" Version="0.5.0" />

A taste

A counter, start to finish:

open Mire.Core      // InputEvent, Key
open Mire.Widgets   // Text, Stack, Style
open Mire.App       // Cmd, Program, Runtime

type Msg = Increment | Decrement

let init () = 0, Cmd.none

let update msg model =
    match msg with
    | Increment -> model + 1, Cmd.none
    | Decrement -> model - 1, Cmd.none

let view model = Text.text (sprintf "count: %d" model) Style.text

let mapInput e =
    match e with
    | Key ke ->
        match ke.Key with
        | ArrowUp -> Some Increment
        | ArrowDown -> Some Decrement
        | _ -> None
    | _ -> None

Program.create init update view
|> Program.withMapInput mapInput
|> Runtime.run

That's the whole shape — a model, an update, a view, and a mapInput. Everything else builds on it.

How it works

Mire follows The Elm Architecture, adapted for the terminal. Each frame, Runtime.run does:

read input → decode → map to a message → update the model
           → build the view → lay it out → diff against the last frame
           → write only the cells that changed

The view is a pure description of the screen. You rebuild the whole tree every frame; the diff makes that cheap. There is no browser — Mire owns layout, scroll state, focus, input decoding, and terminal-protocol control as first-class concerns.

What's included

LayoutStack, Dock, Box, Scroll, Overlay, and 9-point Positioned, with cell / fraction / content / fill sizing.

Widgets — virtualized ListView and Table, a fuzzy CommandPalette, Completion, Modal, Toast, Tooltip, ScrollView, Tabs, Toggle, ProgressBar, Spinner, SplitView, StatusBar, Markdown, ImagePreview, and Separator / Badge / KeyHint.

Text editing — a pure TextBuffer (cursor, selection, word/line motions) and an overridable TextEdit keymap, rendered by single-line Input and soft-wrapping TextArea.

Input — the Kitty keyboard protocol (chords, press/repeat/release, keypad/F-keys), SGR mouse, bracketed paste, focus events, and light/dark theme notifications — all decoded for you.

Rendering — truecolor, synchronized output, true grapheme-cluster widths (astral, emoji-ZWJ, flags), OSC 8 links, OSC 52 clipboard, and the Kitty graphics protocol.

Agent layer (Mire.Agent, optional) — ChatTranscript, PromptBox (history + completion), ApprovalModal, and DiffView for building coding-agent and chat UIs.

Documentation

The user guide is the place to start:

Getting started · Architecture · Layout · Widgets · Styling · Input · Text editing · Agent layer

A full documentation site (Astro) lives in website/.

Demos and samples

Each takes over the alternate screen; Ctrl+C quits. Add -- --dump to render a screen as text instead.

dotnet run --project samples/Gallery        # every widget in its states
dotnet run --project samples/AgentShell     # a minimal agent shell
dotnet run --project Mire.Demo.Agent        # the comprehensive showcase
dotnet run --project Mire.Demo.Feed         # an RSS reader
dotnet run --project Mire.Demo.Spreadsheet  # an A1 grid + formula engine

A justfile wraps the common commands: just build, just test, just gallery, just shell.

Project layout

The framework is one assembly, layered by folder; the folder order is the dependency order, enforced by the <Compile> order in Mire/Mire.fsproj.

Folder (namespace) What it holds
Core Pure value types: Point, Size, Rect, Color, Style, Cell, Grapheme, TextBuffer, input events.
Protocol ANSI sequences, raw-mode setup, and the byte → InputEvent parser.
Renderer Surface (the cell grid + draw primitives) and Diff.
Layout The LayoutNode tree, measure / render, and the keyboard Focus ring.
Widgets The widget library and AppTheme.
App Cmd, Sub, Program, and Runtime.run.

Alongside it: three Mire.Demo.* apps, two samples/, and an Expecto test project.

Roadmap and design

  • ROADMAP.md — the plan of record: a widget/node status table and the phased plan.
  • SPEC.md — the design exploration and the rationale. Read it for the why; read the code for what's built.

License

MIT © 2026 Helge Sverre.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.0 44 6/19/2026
0.6.0 43 6/19/2026
0.5.0 51 6/18/2026
0.4.0 53 6/18/2026
0.0.2 92 6/6/2026
0.0.1 84 6/6/2026