CLI
Published with the npm package. Not the same as maintainer pnpm -C scripts cli (stands / goldens / docs).
npx tauri-widgets <command>
# or: pnpm tauri-widgets <command>
| Command | Purpose |
|---|---|
init | Detect platforms → run init-macos / init-ios / init-windows |
init-macos / init-ios / init-windows | Scaffold native extension |
preview <config.json> | Browser preview of widget.html (--watch, --size, --open) |
signing | Codesign identities + transport verdict (--apply, --write-entitlements, --dev-cert) |
validate <config.json> | Schema shape + capabilities.json per platform |
doctor [app-root] | Transport / entitlements / identities / trace / plugin-config |
trace | Print / --follow widget_trace.json |
clean | Clear store/trace (--group) or --cache (image prefetch) |
Preview
npx tauri-widgets preview ./widget.json --size medium --watch --open
No Xcode / Gradle build — JSON edits reload over SSE.
Validate
npx tauri-widgets validate ./widget.json --platforms ios,android,windows
Uses schemas/capabilities.json (generated from src/capabilities.rs).
Schemas
Add "$schema": "https://s00d.github.io/tauri-plugin-widgets/schemas/widget-config.v1.json" to widget JSON for editor autocomplete.
Maintainer CLI: scripts/README.md · Doctor.
Doctor
Static + optional runtime checks for widget transport, App Groups, signing, bundle layout, receipt schema, and the host trace journal.
Core vs extended
Not every element is held to the same cross-platform bar. Pixel-identical Core+Extended everywhere is not possible — Adaptive Cards, Glance, and WidgetKit each miss overlays, live timers, or network fetch. Aim for a portable Core and treat Extended as best-effort.