Prototype · no release yet Apache License 2.0

Weft.

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
Abstract woven glass: indigo warp threads crossed by gold weft threads, with a screen tree of nodes pinned on the crossings.

See it run

Weft, in the terminal.

Weft — zsh
$ 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>
Commands from the Weft usage examples.

Overview

What Weft does.

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

Built for real workflows.

Install

Up and running in a minute.

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

Usage

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

Real commands, straight from the docs.

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

License

Weft is licensed under the Apache License 2.0:

  1. Apache License 2.0 — use, modify and distribute it, including in proprietary software, under the terms in LICENSE.

Pricing

Pro is a placeholder

Free forever. Pro when you need it.

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
Install free

Try Weft today.

Free and open source. Star it, file an issue, or send a pull request.