loom

Understand a screen layout before you translate it.

Read a screen’s structure, generate a starting layout and compare supported frameworks. The reports show which platform behavior and accessibility work still need attention.

Open source under 0BSD.

What it does

Inspect layouts

Read supported SwiftUI, XAML, QML, Qt and JUCE constructs into normalized reports or an ASCII layout tree. Unsupported features are marked for review.

Generate scaffolds

Generate starter code and notes about behavior, actions, state and accessibility. Review the output before adding it to an application.

Compare and hand off

Compare layout structure and visual measurements for the selected profiles. Bring the reports, graphs and behavior notes together for review.

Build and install

Use the Go toolchain declared in the repository’s go.mod, with Make and the installer prerequisites in the README. Run these commands from a fresh clone:

git clone https://github.com/Starlit-Digital/loom.git
cd loom
make build

make build installs the native CLI into ~/.local/bin. Put that directory before Homebrew on PATH. Use make compile for a build that leaves installed tools unchanged. Read the README for supporting assets and platform requirements.

Examples

Inspect, generate and compare

Run this from the cloned checkout. Generation writes to a fresh output directory. The sample parity comparison reports differences and may exit with status 1.

Sample workflow

loom inspect:ascii examples/sampleapp/mainwindow.xaml
output_dir=$(mktemp -d)
loom generate:xaml examples/sampleapp/contentview.swift \
  --output "$output_dir/generated.xaml"
loom inspect:parity examples/sampleapp/contentview.swift \
  --target examples/sampleapp/mainwindow.xaml \
  --from swiftui --to winui3 --json

Reports and review bundles

Once the sample makes sense, point loom at your own layouts. Use individual commands for focused questions, or a project manifest to assemble a review bundle.

Visual metrics

inspect:visual-parity compares profile-normalized metrics and semantic roles. Font inspection supplies intrinsic material metrics. These reports are not screenshot-based pixel comparisons.

Native behavior

generate:contracts reports state, action, collection and accessibility work. patterns:transfer helps plan how source layout intent maps to a target.

Review bundles

project:build writes manifest-directed analysis, component graphs, scaffolds, contracts and comparison reports. It builds a review bundle, not a compiled native application.

In the terminal

loom command output in a macOS terminal frame.
Actual command output, shown in a macOS terminal frame. Check the README for current commands and tested platforms.

What to know before using it

Generated code is a starting point. The measurements do not prove that a screen looks right, behaves correctly on its platform or meets accessibility requirements. Some formats are read using cautious estimates. A project build creates a review bundle, not a compiled application.

Releases and verification

Check the release page for downloads and instructions to verify them. The README explains the current source and tested platforms.

View releases · Build and test results

Instructions and help

Help is welcome

You can help with examples, bug reports, tests or clearer instructions. Use made up sample data. Do not share private code, passwords, customer details or logs.