Free · open source
Apache License 2.0$0forever
- The weft command: validate, fmt, explain
- MCP server and editor plugins
- Render to HTML, React, SwiftUI and Slint
An agent-friendly UI description format — strict markup that models read and write, canonical JSON that tools validate and patch.
cargo build -p weft-cli

See it run
$ weft validate weft-tour/login.weft --catalog packages/catalog/catalog.json --strict
$ <screen id="login" label="Sign in" weft="0.1">
$ <form id="f1" on-submit="auth.submit">
$ <field id="email" label="Email" required="true" type="email" value="{$.email}"/>
$ <button id="go" submit="true" variant="primary">Sign in</button>
$ </form> Overview
Weft is an open format for describing a screen of a user interface so that an AI agent can read it, write it, check it and change it safely, and so that ordinary tools can check, preview and convert it too.
A Weft file is a strict XML subset with a closed vocabulary: explicit hierarchy, named slots, enumerated states and stable ids. The same tree exists as canonical typed JSON, validated against a component catalog. Roles and states come from WAI-ARIA, component contracts are modelled on Custom Elements Manifest, and design values come from Design Tokens (DTCG 2025.10).
Weft is a prototype at format version 0.1. There is no installer and no release yet: build the
weft command from the repository.
Features
A restricted subset of XML with double-quoted attributes and one way to say each thing. Anything not in the catalog is an error, with a "did you mean" hint.
Markup and .weft.json convert into each other without loss, and a screen has exactly one canonical text, so two files that mean the same are byte-for-byte equal.
29 components (button, field, table, dialog and more), each with its props, slots, states and events. The catalog is data you can read, extend and version.
Values are token references such as {token.space.md}, data is bound with {$.user.email}, and behaviour is a named action like on-press="nav.reset". The document never carries code.
Every element has an id, and a change is a short patch applied atomically, so the diff is exactly what was asked for.
An MCP server, and plugins for Claude Code, Cursor, Open Design and Xcode; render to HTML, React, SolidJS, Lit, SwiftUI and Slint, and import HTML and React back with the losses listed.
Install
There is no installer yet. Build the weft command from the repository and put the folder on
your PATH:
cargo build -p weft-cli
export PATH="$PWD/target/debug:$PATH"
For the tour and the TypeScript packages, set up the pinned tools and the WebAssembly core first:
mise install
pnpm install
moon run root:wasm
cargo build -p weft-cli
Check a screen against the component catalog; exit code 0 means it is valid.
weft validate weft-tour/login.weft --catalog packages/catalog/catalog.json --strict
More examples below.
Usage examples
A screen in Weft markup: a sign-in form with a bound email field and a submit action.
<screen id="login" label="Sign in" weft="0.1">
<form id="f1" on-submit="auth.submit">
<field id="email" label="Email" required="true" type="email" value="{$.email}"/>
<button id="go" submit="true" variant="primary">Sign in</button>
</form>
</screen>
Print the canonical markup of a document, then read back what each binding, token and event means.
weft fmt weft-tour/login.weft
weft explain weft-tour/login.weft
Links
Weft is licensed under the Apache License 2.0:
Pricing
Pro is a placeholder$0forever
$9 / moper seat
Placeholder — the Pro waitlist is not open yet.
Free and open source. Star it, file an issue, or send a pull request.