NPM Package

May 7, 2026 · View on GitHub

TypeScript/JavaScript API reference for @microsoft/winappcli. Each CLI command is available as an async function that captures stdout/stderr and returns a typed result. Helper utilities for MSIX identity, Electron debug identity, and build tools are also exported.

Installation

npm install @microsoft/winappcli

Quick start

import { init, packageApp, certGenerate } from '@microsoft/winappcli';

// Initialize a new project with defaults
await init({ useDefaults: true });

// Generate a dev certificate
await certGenerate({ install: true });

// Package the built app
await packageApp({ inputFolder: './dist', cert: './devcert.pfx' });

Common types

Every CLI command wrapper accepts an options object extending CommonOptions and returns Promise<WinappResult>.

CommonOptions

Base options shared by most commands.

PropertyTypeRequiredDescription
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

WinappResult

Result returned by every command wrapper.

PropertyTypeRequiredDescription
exitCodenumberYesProcess exit code (always 0 on success – non-zero throws).
stdoutstringYesCaptured standard output.
stderrstringYesCaptured standard error.

CLI command wrappers

These functions wrap native winapp CLI commands. All accept CommonOptions (quiet, verbose, cwd).

certGenerate()

Create a self-signed certificate for local testing only. Publisher must match the manifest (auto-inferred if --manifest provided or Package.appxmanifest is in working directory). Output: devcert.pfx (default password: 'password'). For production, obtain a certificate from a trusted CA. Use 'cert install' to trust on this machine.

function certGenerate(options?: CertGenerateOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
exportCerboolean | undefinedNoExport a .cer file (public key only) alongside the .pfx
ifExistsIfExists | undefinedNoBehavior when output file exists: 'error' (fail, default), 'skip' (keep existing), or 'overwrite' (replace)
installboolean | undefinedNoInstall the certificate to the local machine store after generation
jsonboolean | undefinedNoFormat output as JSON
manifeststring | undefinedNoPath to Package.appxmanifest or appxmanifest.xml file to extract publisher information from
outputstring | undefinedNoOutput path for the generated PFX file
passwordstring | undefinedNoPassword for the generated PFX file
publisherstring | undefinedNoPublisher name for the generated certificate. If not specified, will be inferred from manifest.
validDaysnumber | undefinedNoNumber of days the certificate is valid

Also accepts CommonOptions (quiet, verbose, cwd).


certInfo()

Display certificate details (subject, thumbprint, expiry). Useful for verifying a certificate matches your manifest before signing.

function certInfo(options: CertInfoOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
certPathstringYesPath to the certificate file (PFX)
jsonboolean | undefinedNoFormat output as JSON
passwordstring | undefinedNoPassword for the PFX file

Also accepts CommonOptions (quiet, verbose, cwd).


certInstall()

Trust a certificate on this machine (requires admin). Run before installing MSIX packages signed with dev certificates. Example: winapp cert install ./devcert.pfx. Only needed once per certificate.

function certInstall(options: CertInstallOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
certPathstringYesPath to the certificate file (PFX or CER)
forceboolean | undefinedNoForce installation even if the certificate already exists
passwordstring | undefinedNoPassword for the PFX file

Also accepts CommonOptions (quiet, verbose, cwd).


createDebugIdentity()

Enable package identity for debugging without creating full MSIX. Required for testing Windows APIs (push notifications, share target, etc.) during development. Example: winapp create-debug-identity ./myapp.exe. Requires Package.appxmanifest or appxmanifest.xml in current directory or passed via --manifest. Re-run after changing the manifest or Assets/.

function createDebugIdentity(options?: CreateDebugIdentityOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
entrypointstring | undefinedNoPath to the .exe that will need to run with identity, or entrypoint script.
keepIdentityboolean | undefinedNoKeep the package identity from the manifest as-is, without appending '.debug' to the package name and application ID.
manifeststring | undefinedNoPath to the Package.appxmanifest or appxmanifest.xml
noInstallboolean | undefinedNoDo not install the package after creation.

Also accepts CommonOptions (quiet, verbose, cwd).


createExternalCatalog()

Generates a CodeIntegrityExternal.cat catalog file with hashes of executable files from specified directories. Used with the TrustedLaunch flag in MSIX sparse package manifests (AllowExternalContent) to allow execution of external files not included in the package.

function createExternalCatalog(options: CreateExternalCatalogOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
inputFolderstringYesList of input folders with executable files to process (separated by semicolons)
computeFlatHashesboolean | undefinedNoInclude flat hashes when generating the catalog
ifExistsIfExists | undefinedNoBehavior when output file already exists
outputstring | undefinedNoOutput catalog file path. If not specified, the default CodeIntegrityExternal.cat name is used.
recursiveboolean | undefinedNoInclude files from subdirectories
usePageHashesboolean | undefinedNoInclude page hashes when generating the catalog

Also accepts CommonOptions (quiet, verbose, cwd).


getWinappPath()

Print the path to the .winapp directory. Use --global for the shared cache location, or omit for the project-local .winapp folder. Useful for build scripts that need to reference installed packages.

function getWinappPath(options?: GetWinappPathOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
globalboolean | undefinedNoGet the global .winapp directory instead of local

Also accepts CommonOptions (quiet, verbose, cwd).


init()

Start here for initializing a Windows app with required setup. Sets up everything needed for Windows app development: creates Package.appxmanifest with default assets, downloads Windows SDK and Windows App SDK packages, and generates projections. When SDK packages are managed (--setup-sdks stable/preview/experimental), also creates winapp.yaml to pin versions for 'restore'/'update'; with --setup-sdks none (e.g., for Rust/Tauri projects that bring their own SDK bindings), no winapp.yaml is created. Interactive by default (use --use-defaults to skip prompts). Use 'restore' instead if you cloned a repo that already has winapp.yaml. Use 'manifest generate' if you only need a manifest, or 'cert generate' if you need a development certificate for code signing.

function init(options?: InitOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
baseDirectorystring | undefinedNoBase/root directory for the winapp workspace, for consumption or installation.
configDirstring | undefinedNoDirectory to read/store configuration (default: current directory)
configOnlyboolean | undefinedNoOnly handle configuration file operations (create if missing, validate if exists). Skip package installation and other workspace setup steps.
ignoreConfigboolean | undefinedNoDon't use configuration file for version management
noGitignoreboolean | undefinedNoDon't update .gitignore file
setupSdksSdkInstallMode | undefinedNoSDK installation mode: 'stable' (default), 'preview', 'experimental', or 'none' (skip SDK installation)
useDefaultsboolean | undefinedNoDo not prompt, and use default of all prompts

Also accepts CommonOptions (quiet, verbose, cwd).


manifestAddAlias()

Add an execution alias (uap5:AppExecutionAlias) to a Package.appxmanifest. This allows launching the packaged app from the command line by typing the alias name. By default, the alias is inferred from the Executable attribute (e.g. targetnametokentargetnametoken.exe becomes targetnametokentargetnametoken.exe alias).

function manifestAddAlias(options?: ManifestAddAliasOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
appIdstring | undefinedNoApplication Id to add the alias to (default: first Application element)
manifeststring | undefinedNoPath to Package.appxmanifest or appxmanifest.xml file (default: search current directory)
namestring | undefinedNoAlias name (e.g. 'myapp.exe'). Default: inferred from the Executable attribute in the manifest.

Also accepts CommonOptions (quiet, verbose, cwd).


manifestGenerate()

Create Package.appxmanifest without full project setup. Use when you only need a manifest and image assets (no SDKs, no certificate). For full setup, use 'init' instead. Templates: 'packaged' (full MSIX), 'sparse' (desktop app needing Windows APIs).

function manifestGenerate(options?: ManifestGenerateOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
directorystring | undefinedNoDirectory to generate manifest in
descriptionstring | undefinedNoHuman-readable app description shown during installation and in Windows Settings
executablestring | undefinedNoPath to the application's executable. Default: .exe
ifExistsIfExists | undefinedNoBehavior when output file exists: 'error' (fail, default), 'skip' (keep existing), or 'overwrite' (replace)
logoPathstring | undefinedNoPath to logo image file
packageNamestring | undefinedNoPackage name (default: folder name)
publisherNamestring | undefinedNoPublisher CN (default: CN=)
templateManifestTemplates | undefinedNoManifest template type: 'packaged' (full MSIX app, default) or 'sparse' (desktop app with package identity for Windows APIs)
versionstring | undefinedNoApp version in Major.Minor.Build.Revision format (e.g., 1.0.0.0).

Also accepts CommonOptions (quiet, verbose, cwd).


manifestUpdateAssets()

Generate new assets for images referenced in a Package.appxmanifest from a single source image. Source image should be at least 400x400 pixels.

function manifestUpdateAssets(options: ManifestUpdateAssetsOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
imagePathstringYesPath to source image file (SVG, PNG, ICO, JPG, BMP, GIF)
lightImagestring | undefinedNoPath to source image for light theme variants (SVG, PNG, ICO, JPG, BMP, GIF)
manifeststring | undefinedNoPath to Package.appxmanifest or appxmanifest.xml file (default: search current directory)

Also accepts CommonOptions (quiet, verbose, cwd).


packageApp()

Create MSIX installer from your built app. Run after building your app. A manifest (Package.appxmanifest or appxmanifest.xml) is required for packaging - it must be in current working directory, passed as --manifest or be in the input folder. Use --cert devcert.pfx to sign for testing. Example: winapp package ./dist --manifest Package.appxmanifest --cert ./devcert.pfx

function packageApp(options: PackageOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
inputFolderstringYesInput folder with package layout
certstring | undefinedNoPath to signing certificate (will auto-sign if provided)
certPasswordstring | undefinedNoCertificate password (default: password)
executablestring | undefinedNoPath to the executable relative to the input folder.
generateCertboolean | undefinedNoGenerate a new development certificate
installCertboolean | undefinedNoInstall certificate to machine
manifeststring | undefinedNoPath to AppX manifest file (default: auto-detect from input folder or current directory)
namestring | undefinedNoPackage name (default: from manifest)
outputstring | undefinedNoOutput msix file name for the generated package (defaults to .msix, falling back to .msix, .msix, or .msix when version/arch can't be determined)
publisherstring | undefinedNoPublisher name for certificate generation
selfContainedboolean | undefinedNoBundle Windows App SDK runtime for self-contained deployment
skipPriboolean | undefinedNoSkip PRI file generation

Also accepts CommonOptions (quiet, verbose, cwd).


restore()

Use after cloning a repo or when .winapp/ folder is missing. Reinstalls SDK packages from existing winapp.yaml without changing versions. Requires winapp.yaml (created by 'init'). To check for newer SDK versions, use 'update' instead.

function restore(options?: RestoreOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
baseDirectorystring | undefinedNoBase/root directory for the winapp workspace
configDirstring | undefinedNoDirectory to read configuration from (default: current directory)

Also accepts CommonOptions (quiet, verbose, cwd).


run()

Creates packaged layout, registers the Application, and launches the packaged application.

function run(options: RunOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
inputFolderstringYesInput folder containing the app to run
argsstring | undefinedNoCommand-line arguments to pass to the application
cleanboolean | undefinedNoRemove the existing package's application data (LocalState, settings, etc.) before re-deploying. By default, application data is preserved across re-deployments.
debugOutputboolean | undefinedNoCapture OutputDebugString messages and first-chance exceptions from the launched application. Only one debugger can attach to a process at a time, so other debuggers (Visual Studio, VS Code) cannot be used simultaneously. Use --no-launch instead if you need to attach a different debugger. Cannot be combined with --no-launch or --json.
detachboolean | undefinedNoLaunch the application and return immediately without waiting for it to exit. Useful for CI/automation where you need to interact with the app after launch. Prints the PID to stdout (or in JSON with --json).
jsonboolean | undefinedNoFormat output as JSON
manifeststring | undefinedNoPath to the Package.appxmanifest (default: auto-detect from input folder or current directory)
noLaunchboolean | undefinedNoOnly create the debug identity and register the package without launching the application
outputAppxDirectorystring | undefinedNoOutput directory for the loose layout package. If not specified, a directory named AppX inside the input-folder directory will be used.
symbolsboolean | undefinedNoDownload symbols from Microsoft Symbol Server for richer native crash analysis. Only used with --debug-output. First run downloads symbols and caches them locally; subsequent runs use the cache.
unregisterOnExitboolean | undefinedNoUnregister the development package after the application exits. Only removes packages registered in development mode.
withAliasboolean | undefinedNoLaunch the app using its execution alias instead of AUMID activation. The app runs in the current terminal with inherited stdin/stdout/stderr. Requires a uap5:ExecutionAlias in the manifest. Use "winapp manifest add-alias" to add an execution alias to the manifest.

Also accepts CommonOptions (quiet, verbose, cwd).


sign()

Code-sign an MSIX package or executable. Example: winapp sign ./app.msix ./devcert.pfx. Use --timestamp for production builds to remain valid after cert expires. The 'package' command can sign automatically with --cert.

function sign(options: SignOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
filePathstringYesPath to the file/package to sign
certPathstringYesPath to the certificate file (PFX format)
passwordstring | undefinedNoCertificate password
timestampstring | undefinedNoTimestamp server URL

Also accepts CommonOptions (quiet, verbose, cwd).


store()

Run a Microsoft Store Developer CLI command. This command will download the Microsoft Store Developer CLI if not already downloaded. Learn more about the Microsoft Store Developer CLI here: https://aka.ms/msstoredevcli

function store(options?: StoreOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
storeArgsstring[] | undefinedNoArguments to pass through to the Microsoft Store Developer CLI.

Also accepts CommonOptions (quiet, verbose, cwd).


tool()

Run Windows SDK tools directly (makeappx, signtool, makepri, etc.). Auto-downloads Build Tools if needed. For most tasks, prefer higher-level commands like 'package' or 'sign'. Example: winapp tool makeappx pack /d ./folder /p ./out.msix

function tool(options?: ToolOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
toolArgsstring[] | undefinedNoArguments to pass to the SDK tool, e.g. ['makeappx', 'pack', '/d', './folder', '/p', './out.msix'].

Also accepts CommonOptions (quiet, verbose, cwd).


uiClick()

Click an element by slug or text search using mouse simulation. Works on elements that don't support InvokePattern (e.g., column headers, list items). Use --double for double-click, --right for right-click.

function uiClick(options?: UiClickOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
doubleboolean | undefinedNoPerform a double-click instead of a single click
jsonboolean | undefinedNoFormat output as JSON
rightboolean | undefinedNoPerform a right-click instead of a left click
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiFocus()

Move keyboard focus to the specified element using UIA SetFocus.

function uiFocus(options?: UiFocusOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiGetFocused()

Show the element that currently has keyboard focus in the target app.

function uiGetFocused(options?: UiGetFocusedOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiGetProperty()

Read UIA property values from an element. Specify --property for a single property or omit for all.

function uiGetProperty(options?: UiGetPropertyOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
propertystring | undefinedNoProperty name to read or filter on
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiGetValue()

Read the current value from an element. Tries TextPattern (RichEditBox, Document), ValuePattern (TextBox, ComboBox, Slider), then Name (labels). Usage: winapp ui get-value -a

function uiGetValue(options?: UiGetValueOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiInspect()

View the UI element tree with semantic slugs, element types, names, and bounds.

function uiInspect(options?: UiInspectOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
ancestorsboolean | undefinedNoWalk up the tree from the specified element to the root
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
depthnumber | undefinedNoTree inspection depth
hideDisabledboolean | undefinedNoHide disabled elements from output
hideOffscreenboolean | undefinedNoHide offscreen elements from output
interactiveboolean | undefinedNoShow only interactive/invokable elements (buttons, links, inputs, list items). Increases default depth to 8.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiInvoke()

Activate an element by slug or text search. Tries InvokePattern, TogglePattern, SelectionItemPattern, and ExpandCollapsePattern in order.

function uiInvoke(options?: UiInvokeOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiListWindows()

List all visible windows with their HWND, title, process, and size. Use -a to filter by app name. Use the HWND with -w to target a specific window.

function uiListWindows(options?: UiListWindowsOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON

Also accepts CommonOptions (quiet, verbose, cwd).


uiScreenshot()

Capture the target window or element as a PNG image. When multiple windows exist (e.g., dialogs), captures each to a separate file. With --json, returns file path and dimensions. Use --capture-screen for popup overlays.

function uiScreenshot(options?: UiScreenshotOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
captureScreenboolean | undefinedNoCapture from screen (includes popups/overlays) instead of window rendering. Brings window to foreground first.
jsonboolean | undefinedNoFormat output as JSON
outputstring | undefinedNoSave output to file path (e.g., screenshot)
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiScroll()

Scroll a container element using ScrollPattern. Use --direction to scroll incrementally, or --to to jump to top/bottom.

function uiScroll(options?: UiScrollOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
directionstring | undefinedNoScroll direction: up, down, left, right
jsonboolean | undefinedNoFormat output as JSON
tostring | undefinedNoScroll to position: top, bottom
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiScrollIntoView()

Scroll the specified element into the visible area using UIA ScrollItemPattern.

function uiScrollIntoView(options?: UiScrollIntoViewOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiSearch()

Search the element tree for elements matching a text query. Returns all matches with semantic slugs.

function uiSearch(options?: UiSearchOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
maxnumber | undefinedNoMaximum search results
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiSetValue()

Set a value on an element using UIA ValuePattern. Works for TextBox, ComboBox, Slider, and other editable controls. Usage: winapp ui set-value -a

function uiSetValue(options?: UiSetValueOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
valuestring | undefinedNoValue to set (text for TextBox/ComboBox, number for Slider)
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiStatus()

Connect to a target app and display connection info.

function uiStatus(options?: UiStatusOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


uiWaitFor()

Wait for an element to appear, disappear, or have a property reach a target value. Polls at 100ms intervals until condition met or timeout.

function uiWaitFor(options?: UiWaitForOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
containsboolean | undefinedNoUse substring matching for --value instead of exact match
goneboolean | undefinedNoWait for element to disappear instead of appear
jsonboolean | undefinedNoFormat output as JSON
propertystring | undefinedNoProperty name to read or filter on
timeoutnumber | undefinedNoTimeout in milliseconds
valuestring | undefinedNoWait for element value to equal this string. Uses smart fallback (TextPattern -> ValuePattern -> Name). Combine with --property to check a specific property instead.
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.

Also accepts CommonOptions (quiet, verbose, cwd).


unregister()

Unregisters a sideloaded development package. Only removes packages registered in development mode (e.g., via 'winapp run' or 'create-debug-identity').

function unregister(options?: UnregisterOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
forceboolean | undefinedNoSkip the install-location directory check and unregister even if the package was registered from a different project tree
jsonboolean | undefinedNoFormat output as JSON
manifeststring | undefinedNoPath to the Package.appxmanifest (default: auto-detect from current directory)

Also accepts CommonOptions (quiet, verbose, cwd).


update()

Check for and install newer SDK versions. Updates winapp.yaml with latest versions and reinstalls packages. Requires existing winapp.yaml (created by 'init'). Use --setup-sdks preview for preview SDKs. To reinstall current versions without updating, use 'restore' instead.

function update(options?: UpdateOptions): Promise<WinappResult>

Options:

PropertyTypeRequiredDescription
setupSdksSdkInstallMode | undefinedNoSDK installation mode: 'stable' (default), 'preview', 'experimental', or 'none' (skip SDK installation)

Also accepts CommonOptions (quiet, verbose, cwd).


Utility functions

execWithBuildTools()

Execute a command with BuildTools bin path added to PATH environment

function execWithBuildTools(command: string, options?: ExecSyncOptions): string | Buffer<ArrayBufferLike>

Parameters:

ParameterTypeRequiredDescription
commandstringYesThe command to execute
optionsExecSyncOptionsNoOptions to pass to execSync (optional)

Returns: The output from execSync


addMsixIdentityToExe()

Adds package identity information from a Package.appxmanifest or appxmanifest.xml file to an executable's embedded manifest

function addMsixIdentityToExe(exePath: string, appxManifestPath?: string | undefined, options?: MsixIdentityOptions): Promise<MsixIdentityResult>

Parameters:

ParameterTypeRequiredDescription
exePathstringYesPath to the executable file
appxManifestPathstring | undefinedNoPath to the Package.appxmanifest or appxmanifest.xml file containing package identity data
optionsMsixIdentityOptionsNoOptional configuration

addElectronDebugIdentity()

Adds package identity to the Electron debug process

function addElectronDebugIdentity(options?: MsixIdentityOptions): Promise<ElectronDebugIdentityResult>

Parameters:

ParameterTypeRequiredDescription
optionsMsixIdentityOptionsNoConfiguration options

clearElectronDebugIdentity()

Clears/removes package identity from the Electron debug process by restoring from backup

function clearElectronDebugIdentity(options?: MsixIdentityOptions): Promise<ClearElectronDebugIdentityResult>

Parameters:

ParameterTypeRequiredDescription
optionsMsixIdentityOptionsNoConfiguration options

getGlobalWinappPath()

Get the path to the global .winapp directory

function getGlobalWinappPath(): string

Returns: The full path to the global .winapp directory


getLocalWinappPath()

Get the path to the local .winapp directory

function getLocalWinappPath(): string

Returns: The full path to the local .winapp directory


Node.js CLI commands

These commands are available exclusively via npx winapp node <subcommand> and are not exported as programmatic functions.

node create-addon

Generate native addon files for an Electron project. Supports C++ (node-gyp) and C# (node-api-dotnet) templates.

npx winapp node create-addon [options]

Options:

FlagDescription
--name <name>Addon name (default depends on template)
--template <type>Addon template: cpp or cs (default: cpp)
--verboseEnable verbose output

Note: Must be run from the root of an Electron project (directory containing package.json).

Examples:

npx winapp node create-addon
npx winapp node create-addon --name myAddon
npx winapp node create-addon --template cs --name MyCsAddon

node add-electron-debug-identity

Add package identity to the Electron debug process using sparse packaging. Creates a backup of electron.exe, generates a sparse MSIX manifest, adds identity to the executable, and registers the sparse package. Requires a Package.appxmanifest (create one with winapp init or winapp manifest generate).

npx winapp node add-electron-debug-identity [options]

Options:

FlagDescription
--manifest <path>Path to custom Package.appxmanifest (default: Package.appxmanifest in current directory)
--no-installDo not install the package after creation
--keep-identityKeep the manifest identity as-is, without appending .debug suffix
--verboseEnable verbose output

Note: Must be run from the root of an Electron project (directory containing node_modules/electron). To undo, use npx winapp node clear-electron-debug-identity.

Examples:

npx winapp node add-electron-debug-identity
npx winapp node add-electron-debug-identity --manifest ./custom/Package.appxmanifest

node clear-electron-debug-identity

Remove package identity from the Electron debug process. Restores electron.exe from the backup created by add-electron-debug-identity and removes the backup files.

npx winapp node clear-electron-debug-identity [options]

Options:

FlagDescription
--verboseEnable verbose output

Note: Must be run from the root of an Electron project (directory containing node_modules/electron).

Examples:

npx winapp node clear-electron-debug-identity

Types reference

ExecSyncOptions

Re-exported from Node.js for convenience. See Node.js docs.

MsixIdentityOptions

PropertyTypeRequiredDescription
verboseboolean | undefinedNo
noInstallboolean | undefinedNo
keepIdentityboolean | undefinedNo
manifeststring | undefinedNo

MsixIdentityResult

PropertyTypeRequiredDescription
successbooleanYes

ElectronDebugIdentityResult

PropertyTypeRequiredDescription
successbooleanYes
electronExePathstringYes
backupPathstringYes
manifestPathstringYes
assetsDirstringYes

ClearElectronDebugIdentityResult

PropertyTypeRequiredDescription
successbooleanYes
electronExePathstringYes
restoredFromBackupbooleanYes

CallWinappCliOptions

PropertyTypeRequiredDescription
exitOnErrorboolean | undefinedNo

CallWinappCliResult

PropertyTypeRequiredDescription
exitCodenumberYes

CallWinappCliCaptureOptions

PropertyTypeRequiredDescription
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd())

CallWinappCliCaptureResult

PropertyTypeRequiredDescription
exitCodenumberYes
stdoutstringYes
stderrstringYes

GenerateCppAddonOptions

PropertyTypeRequiredDescription
namestring | undefinedNo
projectRootstring | undefinedNo
verboseboolean | undefinedNo

GenerateCppAddonResult

PropertyTypeRequiredDescription
successbooleanYes
addonNamestringYes
addonPathstringYes
needsTerminalRestartbooleanYes
filesstring[]Yes

GenerateCsAddonOptions

PropertyTypeRequiredDescription
namestring | undefinedNo
projectRootstring | undefinedNo
verboseboolean | undefinedNo

GenerateCsAddonResult

PropertyTypeRequiredDescription
successbooleanYes
addonNamestringYes
addonPathstringYes
needsTerminalRestartbooleanYes
filesstring[]Yes

IfExists

IfExists values.

type IfExists = "error" | "overwrite" | "skip"

SdkInstallMode

SdkInstallMode values.

type SdkInstallMode = "stable" | "preview" | "experimental" | "none"

ManifestTemplates

ManifestTemplates values.

type ManifestTemplates = "packaged" | "sparse"

CertGenerateOptions

PropertyTypeRequiredDescription
exportCerboolean | undefinedNoExport a .cer file (public key only) alongside the .pfx
ifExistsIfExists | undefinedNoBehavior when output file exists: 'error' (fail, default), 'skip' (keep existing), or 'overwrite' (replace)
installboolean | undefinedNoInstall the certificate to the local machine store after generation
jsonboolean | undefinedNoFormat output as JSON
manifeststring | undefinedNoPath to Package.appxmanifest or appxmanifest.xml file to extract publisher information from
outputstring | undefinedNoOutput path for the generated PFX file
passwordstring | undefinedNoPassword for the generated PFX file
publisherstring | undefinedNoPublisher name for the generated certificate. If not specified, will be inferred from manifest.
validDaysnumber | undefinedNoNumber of days the certificate is valid
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

CertInfoOptions

PropertyTypeRequiredDescription
certPathstringYesPath to the certificate file (PFX)
jsonboolean | undefinedNoFormat output as JSON
passwordstring | undefinedNoPassword for the PFX file
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

CertInstallOptions

PropertyTypeRequiredDescription
certPathstringYesPath to the certificate file (PFX or CER)
forceboolean | undefinedNoForce installation even if the certificate already exists
passwordstring | undefinedNoPassword for the PFX file
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

CreateDebugIdentityOptions

PropertyTypeRequiredDescription
entrypointstring | undefinedNoPath to the .exe that will need to run with identity, or entrypoint script.
keepIdentityboolean | undefinedNoKeep the package identity from the manifest as-is, without appending '.debug' to the package name and application ID.
manifeststring | undefinedNoPath to the Package.appxmanifest or appxmanifest.xml
noInstallboolean | undefinedNoDo not install the package after creation.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

CreateExternalCatalogOptions

PropertyTypeRequiredDescription
inputFolderstringYesList of input folders with executable files to process (separated by semicolons)
computeFlatHashesboolean | undefinedNoInclude flat hashes when generating the catalog
ifExistsIfExists | undefinedNoBehavior when output file already exists
outputstring | undefinedNoOutput catalog file path. If not specified, the default CodeIntegrityExternal.cat name is used.
recursiveboolean | undefinedNoInclude files from subdirectories
usePageHashesboolean | undefinedNoInclude page hashes when generating the catalog
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

GetWinappPathOptions

PropertyTypeRequiredDescription
globalboolean | undefinedNoGet the global .winapp directory instead of local
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

InitOptions

PropertyTypeRequiredDescription
baseDirectorystring | undefinedNoBase/root directory for the winapp workspace, for consumption or installation.
configDirstring | undefinedNoDirectory to read/store configuration (default: current directory)
configOnlyboolean | undefinedNoOnly handle configuration file operations (create if missing, validate if exists). Skip package installation and other workspace setup steps.
ignoreConfigboolean | undefinedNoDon't use configuration file for version management
noGitignoreboolean | undefinedNoDon't update .gitignore file
setupSdksSdkInstallMode | undefinedNoSDK installation mode: 'stable' (default), 'preview', 'experimental', or 'none' (skip SDK installation)
useDefaultsboolean | undefinedNoDo not prompt, and use default of all prompts
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

ManifestAddAliasOptions

PropertyTypeRequiredDescription
appIdstring | undefinedNoApplication Id to add the alias to (default: first Application element)
manifeststring | undefinedNoPath to Package.appxmanifest or appxmanifest.xml file (default: search current directory)
namestring | undefinedNoAlias name (e.g. 'myapp.exe'). Default: inferred from the Executable attribute in the manifest.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

ManifestGenerateOptions

PropertyTypeRequiredDescription
directorystring | undefinedNoDirectory to generate manifest in
descriptionstring | undefinedNoHuman-readable app description shown during installation and in Windows Settings
executablestring | undefinedNoPath to the application's executable. Default: .exe
ifExistsIfExists | undefinedNoBehavior when output file exists: 'error' (fail, default), 'skip' (keep existing), or 'overwrite' (replace)
logoPathstring | undefinedNoPath to logo image file
packageNamestring | undefinedNoPackage name (default: folder name)
publisherNamestring | undefinedNoPublisher CN (default: CN=)
templateManifestTemplates | undefinedNoManifest template type: 'packaged' (full MSIX app, default) or 'sparse' (desktop app with package identity for Windows APIs)
versionstring | undefinedNoApp version in Major.Minor.Build.Revision format (e.g., 1.0.0.0).
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

ManifestUpdateAssetsOptions

PropertyTypeRequiredDescription
imagePathstringYesPath to source image file (SVG, PNG, ICO, JPG, BMP, GIF)
lightImagestring | undefinedNoPath to source image for light theme variants (SVG, PNG, ICO, JPG, BMP, GIF)
manifeststring | undefinedNoPath to Package.appxmanifest or appxmanifest.xml file (default: search current directory)
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

PackageOptions

PropertyTypeRequiredDescription
inputFolderstringYesInput folder with package layout
certstring | undefinedNoPath to signing certificate (will auto-sign if provided)
certPasswordstring | undefinedNoCertificate password (default: password)
executablestring | undefinedNoPath to the executable relative to the input folder.
generateCertboolean | undefinedNoGenerate a new development certificate
installCertboolean | undefinedNoInstall certificate to machine
manifeststring | undefinedNoPath to AppX manifest file (default: auto-detect from input folder or current directory)
namestring | undefinedNoPackage name (default: from manifest)
outputstring | undefinedNoOutput msix file name for the generated package (defaults to .msix, falling back to .msix, .msix, or .msix when version/arch can't be determined)
publisherstring | undefinedNoPublisher name for certificate generation
selfContainedboolean | undefinedNoBundle Windows App SDK runtime for self-contained deployment
skipPriboolean | undefinedNoSkip PRI file generation
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

RestoreOptions

PropertyTypeRequiredDescription
baseDirectorystring | undefinedNoBase/root directory for the winapp workspace
configDirstring | undefinedNoDirectory to read configuration from (default: current directory)
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

RunOptions

PropertyTypeRequiredDescription
inputFolderstringYesInput folder containing the app to run
argsstring | undefinedNoCommand-line arguments to pass to the application
cleanboolean | undefinedNoRemove the existing package's application data (LocalState, settings, etc.) before re-deploying. By default, application data is preserved across re-deployments.
debugOutputboolean | undefinedNoCapture OutputDebugString messages and first-chance exceptions from the launched application. Only one debugger can attach to a process at a time, so other debuggers (Visual Studio, VS Code) cannot be used simultaneously. Use --no-launch instead if you need to attach a different debugger. Cannot be combined with --no-launch or --json.
detachboolean | undefinedNoLaunch the application and return immediately without waiting for it to exit. Useful for CI/automation where you need to interact with the app after launch. Prints the PID to stdout (or in JSON with --json).
jsonboolean | undefinedNoFormat output as JSON
manifeststring | undefinedNoPath to the Package.appxmanifest (default: auto-detect from input folder or current directory)
noLaunchboolean | undefinedNoOnly create the debug identity and register the package without launching the application
outputAppxDirectorystring | undefinedNoOutput directory for the loose layout package. If not specified, a directory named AppX inside the input-folder directory will be used.
symbolsboolean | undefinedNoDownload symbols from Microsoft Symbol Server for richer native crash analysis. Only used with --debug-output. First run downloads symbols and caches them locally; subsequent runs use the cache.
unregisterOnExitboolean | undefinedNoUnregister the development package after the application exits. Only removes packages registered in development mode.
withAliasboolean | undefinedNoLaunch the app using its execution alias instead of AUMID activation. The app runs in the current terminal with inherited stdin/stdout/stderr. Requires a uap5:ExecutionAlias in the manifest. Use "winapp manifest add-alias" to add an execution alias to the manifest.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

SignOptions

PropertyTypeRequiredDescription
filePathstringYesPath to the file/package to sign
certPathstringYesPath to the certificate file (PFX format)
passwordstring | undefinedNoCertificate password
timestampstring | undefinedNoTimestamp server URL
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

StoreOptions

PropertyTypeRequiredDescription
storeArgsstring[] | undefinedNoArguments to pass through to the Microsoft Store Developer CLI.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

ToolOptions

PropertyTypeRequiredDescription
toolArgsstring[] | undefinedNoArguments to pass to the SDK tool, e.g. ['makeappx', 'pack', '/d', './folder', '/p', './out.msix'].
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiClickOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
doubleboolean | undefinedNoPerform a double-click instead of a single click
jsonboolean | undefinedNoFormat output as JSON
rightboolean | undefinedNoPerform a right-click instead of a left click
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiFocusOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiGetFocusedOptions

PropertyTypeRequiredDescription
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiGetPropertyOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
propertystring | undefinedNoProperty name to read or filter on
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiGetValueOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiInspectOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
ancestorsboolean | undefinedNoWalk up the tree from the specified element to the root
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
depthnumber | undefinedNoTree inspection depth
hideDisabledboolean | undefinedNoHide disabled elements from output
hideOffscreenboolean | undefinedNoHide offscreen elements from output
interactiveboolean | undefinedNoShow only interactive/invokable elements (buttons, links, inputs, list items). Increases default depth to 8.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiInvokeOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiListWindowsOptions

PropertyTypeRequiredDescription
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiScreenshotOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
captureScreenboolean | undefinedNoCapture from screen (includes popups/overlays) instead of window rendering. Brings window to foreground first.
jsonboolean | undefinedNoFormat output as JSON
outputstring | undefinedNoSave output to file path (e.g., screenshot)
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiScrollOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
directionstring | undefinedNoScroll direction: up, down, left, right
jsonboolean | undefinedNoFormat output as JSON
tostring | undefinedNoScroll to position: top, bottom
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiScrollIntoViewOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiSearchOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
maxnumber | undefinedNoMaximum search results
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiSetValueOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
valuestring | undefinedNoValue to set (text for TextBox/ComboBox, number for Slider)
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiStatusOptions

PropertyTypeRequiredDescription
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
jsonboolean | undefinedNoFormat output as JSON
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UiWaitForOptions

PropertyTypeRequiredDescription
selectorstring | undefinedNoSemantic slug (e.g., btn-minimize-d1a0) or text to search by name/automationId
appstring | undefinedNoTarget app (process name, window title, or PID). Lists windows if ambiguous.
containsboolean | undefinedNoUse substring matching for --value instead of exact match
goneboolean | undefinedNoWait for element to disappear instead of appear
jsonboolean | undefinedNoFormat output as JSON
propertystring | undefinedNoProperty name to read or filter on
timeoutnumber | undefinedNoTimeout in milliseconds
valuestring | undefinedNoWait for element value to equal this string. Uses smart fallback (TextPattern -> ValuePattern -> Name). Combine with --property to check a specific property instead.
windownumber | undefinedNoTarget window by HWND (stable handle from list output). Takes precedence over --app.
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UnregisterOptions

PropertyTypeRequiredDescription
forceboolean | undefinedNoSkip the install-location directory check and unregister even if the package was registered from a different project tree
jsonboolean | undefinedNoFormat output as JSON
manifeststring | undefinedNoPath to the Package.appxmanifest (default: auto-detect from current directory)
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).

UpdateOptions

PropertyTypeRequiredDescription
setupSdksSdkInstallMode | undefinedNoSDK installation mode: 'stable' (default), 'preview', 'experimental', or 'none' (skip SDK installation)
quietboolean | undefinedNoSuppress progress messages.
verboseboolean | undefinedNoEnable verbose output.
cwdstring | undefinedNoWorking directory for the CLI process (defaults to process.cwd()).