Mire 0.7.0
dotnet add package Mire --version 0.7.0
NuGet\Install-Package Mire -Version 0.7.0
<PackageReference Include="Mire" Version="0.7.0" />
<PackageVersion Include="Mire" Version="0.7.0" />
<PackageReference Include="Mire" />
paket add Mire --version 0.7.0
#r "nuget: Mire, 0.7.0"
#:package Mire@0.7.0
#addin nuget:?package=Mire&version=0.7.0
#tool nuget:?package=Mire&version=0.7.0
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
Layout — Stack, 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 | Versions 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. |
-
net10.0
- FSharp.Core (>= 10.1.301)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.