CLI Reference

The zero-native CLI provides project scaffolding, validation, packaging, and debugging tools.

Commands

CommandDescription
zero-native init [path] --frontend <next|vite|react|svelte|vue>Scaffold a new zero-native project with the specified frontend. Omit path to scaffold into the current directory.
zero-native dev --binary <path>Start the app with a managed frontend dev server (--binary is required)
zero-native doctorCheck host environment, WebView, manifest, and CEF
zero-native cef installDownload, prepare, and verify the macOS CEF runtime
zero-native cef pathPrint the default or configured CEF directory
zero-native cef doctorCheck only the CEF layout
zero-native validate [app.zon]Validate app.zon against the manifest schema
zero-native packagePackage the app for distribution
zero-native bundle-assets [app.zon] [assets] [output]Copy frontend assets into the build output
zero-native package-windowsPackage shortcut for Windows
zero-native package-linuxPackage shortcut for Linux
zero-native package-iosPackage shortcut for iOS
zero-native package-androidPackage shortcut for Android
zero-native automate <command>Interact with the automation server
zero-native versionPrint the zero-native version

zero-native cef flags

FlagDescription
--dirCEF install directory. Defaults to third_party/cef/macos.
--versionCEF binary version to download. The default is zero-native's pinned tested version.
--sourceprepared or official. Defaults to prepared, which downloads zero-native's no-CMake runtime from GitHub Releases.
--download-urlOverride the prepared runtime release base URL, or the official CEF host when using --source official.
--allow-build-toolsAllow the advanced official CEF path to invoke local build tools for libcef_dll_wrapper.a.
--forceRedownload and replace the target directory.

Core maintainers who need to build CEF before a zero-native runtime release exists should use tools/cef/build-from-source.sh. The CLI's default zero-native cef install path remains the no-CMake app-developer path.

zero-native package flags

FlagDescription
--targetTarget platform (macos, linux, windows, ios, android)
--manifestPath to app.zon
--outputOutput path for the package
--binaryPath to the built binary
--assetsPath to frontend assets directory
--optimizeOptimization level
--web-engineTemporarily override app.zon with system or chromium; Chromium is currently wired for macOS packages
--cef-dirTemporarily override the CEF distribution path from app.zon
--cef-auto-installTemporarily allow prepared CEF installation during Chromium packaging
--signingSigning mode: none, adhoc, or identity
--identityCode signing identity name
--entitlementsPath to entitlements file
--team-idApple Developer Team ID
--archiveCreate a distributable archive

zero-native dev flags

FlagDescription
--binary (required)Path to the compiled app binary
--manifestPath to app.zon (default: app.zon)
--urlOverride the dev server URL from app.zon
--commandOverride the dev server command (space-separated)
--timeout-msMilliseconds to wait for the dev server (default from app.zon or 30000)

zero-native automate subcommands

SubcommandDescription
automate listList running automation-enabled apps
automate snapshotDump current app state
automate screenshotCapture a screenshot
automate reloadReload the WebView
automate waitWait for ready=true in the snapshot
automate bridge <json>Send a bridge command (origin zero://inline)

Environment variables

VariableDescription
ZERO_NATIVE_FRONTEND_URLDev server URL (read by frontend.sourceFromEnv)
ZERO_NATIVE_FRONTEND_ASSETSApp convention for signaling pre-built assets
ZERO_NATIVE_LOG_DIROverride log output directory
ZERO_NATIVE_LOG_FORMATLog format: text or jsonl