Skip to main content

fused json-ui

Inspect, validate, and render JSON-UI widget configs without opening the canvas UI. Use these commands to catch errors before pushing and to screenshot widgets for review.

fused json-ui [SUBCOMMAND] [OPTIONS]

Subcommands

SubcommandDescription
schemasPrint JSON schemas for widget components
validateValidate a widget config file
catalog-promptPrint the JSON-UI catalog prompt
run-inline-widgetScreenshot a widget from an inline config
run-shared-widgetScreenshot a published shared widget

fused json-ui schemas

Print JSON schemas for one or more component types. Useful for understanding required props and accepted values.

fused json-ui schemas [COMPONENTS]...
fused json-ui schemas                    # all components
fused json-ui schemas text-input # one component
fused json-ui schemas text-input dropdown chart

fused json-ui validate

Validate a widget config file against the JSON-UI schema. Catches missing required props, unknown keys, and enum violations.

fused json-ui validate CONFIG_OR_PATH
fused json-ui validate widget_config.json
fused json-ui validate widget_config.json5
fused json-ui validate '{"type": "text", "text": "hello"}' # inline JSON5

fused json-ui run-inline-widget

Open a canvas share URL with an inline widget config and capture a screenshot.

fused json-ui run-inline-widget CANVAS_SHARE_TOKEN WIDGET_CONFIG [OPTIONS]
FlagDescription
--print-url-onlyPrint the URL instead of screenshotting
--browser [chrome|firefox]Browser to use
--wait INTEGERSeconds to wait for async data to load
--screenshot-filename FILESave PNG to file (default: print base64)
fused json-ui run-inline-widget fc_yourtoken '{"type": "text", "text": "hello"}' \
--screenshot-filename out.png
note

Screenshotting requires pip install fused[browser].


fused json-ui run-shared-widget

Open a shared widget page by name and capture a screenshot. Requires the canvas to be shared first (fused canvas share).

fused json-ui run-shared-widget CANVAS_SHARE_TOKEN WIDGET_NAME [OPTIONS]

Same options as run-inline-widget.

fused json-ui run-shared-widget fc_yourtoken MyWidget --screenshot-filename out.png

See also

Debugging flow

# 1. Edit widget JSON
# 2. Validate
fused json-ui validate widget_config.json

# 3. Push
fused canvas push ./my_canvas

# 4. Screenshot to confirm
fused json-ui run-shared-widget fc_yourtoken MyWidget --screenshot-filename out.png