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
| Subcommand | Description |
|---|---|
schemas | Print JSON schemas for widget components |
validate | Validate a widget config file |
catalog-prompt | Print the JSON-UI catalog prompt |
run-inline-widget | Screenshot a widget from an inline config |
run-shared-widget | Screenshot 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]
| Flag | Description |
|---|---|
--print-url-only | Print the URL instead of screenshotting |
--browser [chrome|firefox] | Browser to use |
--wait INTEGER | Seconds to wait for async data to load |
--screenshot-filename FILE | Save 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
- fused canvas — push widget changes back to a canvas
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