CLI reference
The huxerui CLI owns project generation and platform workflows.
It discovers the SDK, validates the current host, and delegates each build to the platform shell generated with the project.
Command map
Section titled “Command map”huxerui create app <name> [--build cmake|mcpp] [--template <name>] [--id <project-id>] [-p|--platform <platform-list>] [--agent <agent-list>]huxerui create library <name> [--build cmake|mcpp] [--template <name>] [--namespace <cpp-namespace>] [--target <public-cmake-target>] [-p|--platform <platform-list>] [--agent <agent-list>]huxerui platform add <platform-list>huxerui doctor [platform-list] [--operation build|run|package|devices] [--json]huxerui setup <platform-list> [--operation build|run|package|devices] [--yes]huxerui devices [platform]huxerui build [platform-list] [build-options]huxerui run <platform> [build-options] [--watch]huxerui package <platform-list> [build-options] [-f|--format appimage|deb|rpm]huxerui open ios [--sdk <path>]huxerui sdk listhuxerui sdk use <version> [--yes]huxerui sdk update [--check] [--yes]huxerui mcpp build [--project <dir>] [--release] [--locked] [--offline] [--verbose]huxerui --versionA platform list is either a comma-separated list such as windows,web or the single value all.
Commands still enforce host availability: a Windows host cannot build an iOS application, for example.
Create projects
Section titled “Create projects”Create an application with a reverse-DNS project identifier and selected platform shells:
huxerui create app notes --id dev.example.notes --platform windows,android,webCreate a reusable component library with the same shared-source model:
huxerui create library rich_text --namespace rich_text --target RichText::RichText --platform windows,androidGenerated projects keep shared C++ under src/, resources under resources/, and host-specific integration under platform/<id>/.
The CLI scans the shared source tree; adding a source file does not require a second list in every platform shell.
Project creation also installs the application-development Skill. The default writes to .agents/skills. Use --agent claude or --agent zcode for those editors’ directories, --agent all for all three, or --agent none to skip it.
Add a platform later without replacing application-owned files:
huxerui platform add iosChoose the build system
Section titled “Choose the build system”Create defaults to CMake. –build mcpp renders a desktop module project; –template selects app, navigation or library package templates. The mcpp path rejects –platform because it has no Android/iOS/Web platform shells.
huxerui create app notes --build mcpp --template navigationcd notesmcpp buildmcpp runUse the C++ Modules and mcpp guide for source layout, language mode, resources and library consumption. The CMake project layout above applies to the default build path.
Diagnose and set up tools
Section titled “Diagnose and set up tools”doctor is read-only.
It reports the selected HuxerUI SDK, external tools, host restrictions, and project integration problems:
huxerui doctorhuxerui doctor android,webhuxerui doctor android --operation run --jsonhuxerui doctor linux --operation package --format debsetup performs supported prerequisite installation or configuration.
Without --yes, it describes each planned action and asks before changing the machine:
huxerui setup android,webhuxerui setup web --yesUse --operation to check dependencies for the action you intend to perform. --json returns the diagnosis in a machine-readable form. setup rechecks prerequisites as it applies the selected plan.
The CLI discovers the installed SDK through HUXERUI_HOME or its executable location. --sdk <path> overrides it for a single build, run, package, or open ios invocation and accepts either an installed SDK or a source checkout.
Select devices
Section titled “Select devices”List all device-capable platforms available on the current host, or select one platform:
huxerui deviceshuxerui devices androidIf exactly one ready device is present, run selects it automatically.
When several devices are ready, pass the stable identifier shown by devices:
huxerui run android --device emulator-5554Build and run
Section titled “Build and run”build accepts one or more enabled platforms and defaults to the current host platform when it is part of the project:
huxerui buildhuxerui build windows,web --config releaserun accepts exactly one platform because it launches one application instance:
huxerui run windowshuxerui run web --config releaseWindows selects an MSVC-compatible generator automatically; --generator is intended for other supported CMake workflows.
Android and iOS builds are driven through their platform projects rather than a generic desktop generator.
Build and run default to debug. Use --config release for an optimized build. The short forms are b, r, and pkg for build, run, and package. Shared options include --device <id>, --generator <name>, and --sdk <path>. On Android, --java-home <path> selects the JDK for the current invocation.
Use huxerui run web --watch or huxerui run windows --watch while editing. A successful rebuild refreshes the page or relaunches the application with a fresh session. A failed rebuild leaves the last successful instance running. Press Ctrl+C to end the watch session.
Use runtime profiling when you need --profile with a source checkout.
Select target ABIs
Section titled “Select target ABIs”--abi accepts a comma-separated list when the invocation targets one platform. The CLI normalizes aliases and removes duplicates. Omit it to use the platform and project defaults.
| Platform | ABI selection |
|---|---|
| Android | arm64-v8a and x86_64 in one APK. Termux supports only arm64-v8a. |
| Windows | x86_64. |
| Linux | aarch64 or x86_64. Packaging both publishes separate artifacts in dist/linux/<abi>. Run accepts one ABI. A non-host build needs --sdk <checkout> and a target CMAKE_TOOLCHAIN_FILE. |
| macOS | arm64 or x86_64. A universal build needs --sdk <checkout> and universal dependencies. |
| iOS | arm64 on devices. A simulator can select arm64 or x86_64 as supported by Xcode. |
| Web | wasm32. |
x64 and amd64 select x86_64. arm64 and aarch64 normalize to the platform’s ARM spelling. For example, huxerui package android --abi arm64 produces an ARM64 APK.
Tune release size
Section titled “Tune release size”--optimization size selects the toolchain’s size optimization and minsize requires -Oz support. --lto on enables link-time optimization when supported. Both affect release configurations of source targets. Use --sdk <checkout> to rebuild the framework with these choices. An installed SDK library keeps its published optimization settings.
huxerui build web --config release --optimization minsize --lto onhuxerui package android --abi arm64 --sdk ../HuxerUI --optimization size --lto onSee CMake build options for direct builds.
Package artifacts
Section titled “Package artifacts”package builds first and then replaces dist/<platform> with the platform driver’s distributable artifacts.
Its default configuration is release:
huxerui package windows,webhuxerui package android --device emulator-5554 --config debugPackaging is not code signing or store submission. The produced files are the input to the platform’s signing, notarization, store, or deployment workflow.
When Linux is the only selected platform, --format (-f) selects appimage (default), deb, or rpm. All three require patchelf 0.19.0 or later and binutils. AppImage requires appimagetool, DEB requires CPack and dpkg-shlibdeps, and RPM requires CPack and rpmbuild. Build DEBs and RPMs in the intended distribution family.
Generated Android projects use a development signing configuration by default. Supply your own release signing configuration before publishing the APK.
Open the iOS project
Section titled “Open the iOS project”Generate the current library integration and open the Xcode project from a macOS host:
huxerui open ios [--sdk <path>]Use Xcode for signing, capabilities, device provisioning, and archive distribution; keep shared source and library ownership in the HuxerUI project.
Update an installed SDK
Section titled “Update an installed SDK”huxerui sdk listhuxerui sdk use 0.5.0huxerui sdk update --checkhuxerui sdk updatelist shows the installed versions. use selects the requested version, installing it when needed. update selects the latest published release. --check only checks for an update, and --yes skips the installer confirmation for use or update. The commands operate on an SDK installation.
On Windows, the CLI hands installation to a separate process so the active executable can exit. Wait for completion and run huxerui --version again to confirm the selected SDK.
Standalone mcpp builds
Section titled “Standalone mcpp builds”huxerui mcpp build --project path/to/project --release --lockedThis is a direct frontend for an installed mcpp executable and a project containing mcpp.toml. It forwards –release, –locked, –offline and –verbose to mcpp build in that directory. It does not generate platform shells, translate huxerui.toml, install mcpp, or run the CMake application workflow.
The module examples demonstrate the supported module build rules, composable transformation, resources and library consumption. This command forwards an existing mcpp project build; project generation and normal use are covered by C++ Modules and mcpp.
Exit behavior
Section titled “Exit behavior”Usage errors return exit code 2 and print the command synopsis hint.
Environment, build, or platform failures return exit code 1.
A successful command returns 0, making the CLI suitable for scripts and CI without parsing human-readable status text.

