Skip to content

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.

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 list
huxerui sdk use <version> [--yes]
huxerui sdk update [--check] [--yes]
huxerui mcpp build [--project <dir>] [--release] [--locked] [--offline] [--verbose]
huxerui --version

A 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 an application with a reverse-DNS project identifier and selected platform shells:

Terminal window
huxerui create app notes --id dev.example.notes --platform windows,android,web

Create a reusable component library with the same shared-source model:

Terminal window
huxerui create library rich_text --namespace rich_text --target RichText::RichText --platform windows,android

Generated 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:

Terminal window
huxerui platform add ios

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.

Terminal window
huxerui create app notes --build mcpp --template navigation
cd notes
mcpp build
mcpp run

Use 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.

doctor is read-only. It reports the selected HuxerUI SDK, external tools, host restrictions, and project integration problems:

Terminal window
huxerui doctor
huxerui doctor android,web
huxerui doctor android --operation run --json
huxerui doctor linux --operation package --format deb

setup performs supported prerequisite installation or configuration. Without --yes, it describes each planned action and asks before changing the machine:

Terminal window
huxerui setup android,web
huxerui setup web --yes

Use --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.

List all device-capable platforms available on the current host, or select one platform:

Terminal window
huxerui devices
huxerui devices android

If exactly one ready device is present, run selects it automatically. When several devices are ready, pass the stable identifier shown by devices:

Terminal window
huxerui run android --device emulator-5554

build accepts one or more enabled platforms and defaults to the current host platform when it is part of the project:

Terminal window
huxerui build
huxerui build windows,web --config release

run accepts exactly one platform because it launches one application instance:

Terminal window
huxerui run windows
huxerui run web --config release

Windows 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.

--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.

--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.

Terminal window
huxerui build web --config release --optimization minsize --lto on
huxerui package android --abi arm64 --sdk ../HuxerUI --optimization size --lto on

See CMake build options for direct builds.

package builds first and then replaces dist/<platform> with the platform driver’s distributable artifacts. Its default configuration is release:

Terminal window
huxerui package windows,web
huxerui package android --device emulator-5554 --config debug

Packaging 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.

Generate the current library integration and open the Xcode project from a macOS host:

Terminal window
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.

Terminal window
huxerui sdk list
huxerui sdk use 0.5.0
huxerui sdk update --check
huxerui sdk update

list 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.

Terminal window
huxerui mcpp build --project path/to/project --release --locked

This 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.

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.