CLI
Command-line interface for LVGL Pro Editor enabling CI/CD integration and automated workflows.
The LVGL Editor provides a Node-based command line tool, lved-cli.js, for generating and compiling code from XML, validating projects, syncing from Figma, comparing trees, and running headless UI tests.
Pre-release build intended for development and CI integration.
Overview
- Binary:
lved-cli.js(Node script) Download CLI - Platform: Node 18+ recommended
- Container engine: Podman (if not on Windows, Download Podman)
Quick Start
Generate C and H files from XMLs:
lved-cli.js generate path/to/projectCompile the runtime binary for previewing or testing the UI:
lved-cli.js compile path/to/project --target web --start-serviceValidate XML content and limit shown errors:
lved-cli.js validate path/to/project --errorlimit 25Run tests from XML files:
lved-cli.js run-all-tests path/to/project
lved-cli.js run-test path/to/project tests/test-file.xmlSynchronize styles and images from Figma:
lved-cli.js figma-sync path/to/project --start-serviceCommands
generate
Generate code from XML.
lved-cli.js generate <project-path> [--start-service]compile
Compile for a target.
lved-cli.js compile <project-path> [--start-service] [--target <web|node>]--targetdefaults toweb(choices:web,node)
compare
Compare two directories by presence and normalized content.
lved-cli.js compare <first-project-path> <second-project-path>figma-sync
Synchronize project with Figma.
lved-cli.js figma-sync <project-path> [--start-service]validate
Validate XML files and limit the number of shown errors.
lved-cli.js validate <project-path> [--errorlimit n] [--start-service]--errorlimitdefault:10(minimum: 1)
run-test
Run tests from a single file.
lved-cli.js run-test <project-path> <testing-file>run-all-tests
Discover and run all test*.xml files.
lved-cli.js run-all-tests <project-path>Common Arguments
| Argument | Description |
|---|---|
<project-path> | Path to an LVGL Editor project |
<testing-file> | Test XML relative to <project-path> (used in run-test) |
Options
| Option | Description |
|---|---|
-ss, --start-service | Prepare/refresh container image before running |
--target <web|node> | Compile target (used in compile) |
-l, --errorlimit n | Maximum errors shown (used in validate) |
Examples
Compare to a reference tree:
lved-cli.js compare build/generated ./ci/referenceCompile for Node:
lved-cli.js compile ./examples/my-project --target node --start-serviceCI/CD Integration
See an example GitHub Actions workflow for integrating the CLI into your CI/CD pipeline.
How is this guide?
Last updated on