# How to Set Up a Development Environment for OpenClaw-Windows-Node: Complete Guide

> Easily set up your development environment for openclaw-windows-node with our complete guide. Follow simple steps to compile the Molty tray application and CLI utilities on Windows.

- Repository: [openclaw/openclaw-windows-node](https://github.com/openclaw/openclaw-windows-node)
- Tags: getting-started
- Published: 2026-06-06

---

**Setting up a development environment for openclaw-windows-node requires Windows 10 (20H2+) or Windows 11, the .NET 10.0 SDK, Windows 10 SDK with WinUI 3, and WebView2 Runtime, after which you clone the repository and execute `build.ps1` to compile the Molty tray application and CLI utilities.**

OpenClaw-Windows-Node is a monorepo containing the **Molty** system-tray companion, shared gateway libraries, and CLI utilities built for the Windows ecosystem. To set up a development environment for openclaw-windows-node, you must configure modern Windows development tooling including the .NET 10.0 SDK and WinUI 3 components. This guide walks through the exact workflow from prerequisite verification to test execution, referencing source files such as `build.ps1` and `openclaw-windows-node.slnx` as implemented in the openclaw/openclaw-windows-node repository.

## Prerequisites and System Requirements

Before compiling the solution, ensure your development machine meets the following requirements. The `build.ps1` script automatically verifies these dependencies and aborts if anything is missing.

- **Windows 10 (20H2+) or Windows 11**: The target OS for the WinUI 3-based tray interface.
- **.NET 10.0 SDK**: Required to build all C# projects. Verify installation with `dotnet --list-sdks` and confirm version `10.0.x` appears.

- **Windows 10 SDK**: Includes WinUI 3 components required by `src/OpenClaw.Tray.WinUI/`. Install via the Visual Studio Installer or standalone SDK.
- **WebView2 Runtime**: Enables the embedded chat window in Molty. Most modern Windows installations include this; otherwise install the Evergreen Standalone from Microsoft.
- **PowerShell 7+**: Optional but recommended for running helper scripts. Verify with `pwsh -Version`.
- **Git**: For cloning the monorepo.

Run the prerequisite check without building to validate your environment:

```powershell
.\build.ps1 -CheckOnly

```

## Clone and Initialize the Repository

Clone the monorepo and navigate to the root directory containing the solution file:

```powershell
git clone https://github.com/openclaw/openclaw-windows-node.git
cd openclaw-windows-node

```

The root directory contains `openclaw-windows-node.slnx` and the `src/` folder housing all project files. The repository uses a [`global.json`](https://github.com/openclaw/openclaw-windows-node/blob/main/global.json) file to pin the .NET SDK version, ensuring consistent builds across environments.

## Building the Solution

The repository ships with `build.ps1`, a centralized PowerShell build script that orchestrates NuGet package restoration and compilation.

### Full Build

Execute the default build to compile all projects in Debug configuration:

```powershell
.\build.ps1

```

The script runs `dotnet restore` followed by `dotnet build` for each project in dependency order, then prints a build summary.

### Single Project Builds

For iterative UI development, build only the WinUI tray application:

```powershell
.\build.ps1 -Project WinUI

```

Alternatively, use direct `dotnet build` commands for specific runtime targets:

```powershell

# Build x64 MSIX package

dotnet build src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj -r win-x64 -p:PackageMsix=true

# Build ARM64 MSIX package  

dotnet build src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj -r win-arm64 -p:PackageMsix=true

```

## Running the Application Locally

### Launch the Molty Tray Application

Use the helper script `run-app-local.ps1` to build (if necessary) and launch the unpackaged WinUI binary:

```powershell

# Build and run

.\run-app-local.ps1

# Skip rebuild, launch existing binary

.\run-app-local.ps1 -NoBuild

# Run with isolated settings (recommended for multiple worktrees)

.\run-app-local.ps1 -Isolated

```

The **`-Isolated`** flag stores settings under a temporary `%APPDATA%` subfolder, preventing configuration clashes when working with multiple repository copies.

### Run the CLI Validator

The `OpenClaw.Cli` project provides a console utility for WebSocket validation. Execute it via `dotnet run`:

```powershell

# Display help

dotnet run --project src/OpenClaw.Cli/OpenClaw.Cli.csproj -- --help

# Send test message

dotnet run --project src/OpenClaw.Cli/OpenClaw.Cli.csproj -- --message "quick test"

# Override gateway settings for isolated testing

dotnet run --project src/OpenClaw.Cli/OpenClaw.Cli.csproj -- --url ws://127.0.0.1:18789 --token "<your-token>" --message "override test"

```

## Running the Automated Test Suite

According to the **AGENTS.md** file in the repository root, all changes must pass the validation workflow comprising shared library tests and tray UI tests.

Execute the full test suite:

```powershell

# Build first (required before initial test run)

.\build.ps1

# Shared library unit tests

dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj

# Tray UI tests

dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj

```

After the initial build, append `--no-restore` to subsequent test commands for faster execution.

Run a specific test class using the filter syntax:

```powershell
dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --filter "FullyQualifiedName~RenderContextTests"

```

## IDE Integration

### Visual Studio 2022

Open `openclaw-windows-node.slnx` in Visual Studio 2022. The solution auto-loads all `.csproj` files and restores NuGet packages automatically on first load. Set `OpenClaw.Tray.WinUI` as the startup project and press **F5** to debug.

### Visual Studio Code

Install the C# extension, then run `dotnet restore` from the integrated terminal. Press **F5** to launch the tray project. Both IDEs respect the SDK version specified in [`global.json`](https://github.com/openclaw/openclaw-windows-node/blob/main/global.json).

## Common Development Tasks

- **Re-run the onboarding wizard**: `Start-Process "$env:APPDATA\OpenClawTray\OpenClawSetupEngine.exe"`
- **Inspect local settings**: `explorer "$env:APPDATA\OpenClawTray\settings.json"`
- **Clean build artifacts**: `git clean -fdx` or manually delete `bin/` and `obj/` folders
- **Generate MSIX installer**: `.\build.ps1 -PackageMsix`

## Summary

- **Prerequisites**: Windows 10 (20H2+) or 11, .NET 10.0 SDK, Windows 10 SDK with WinUI 3, and WebView2 Runtime.
- **Build entry point**: Use `build.ps1` for full solution compilation or `build.ps1 -Project WinUI` for iterative UI work.
- **Local execution**: Run `run-app-local.ps1 -Isolated` to launch the Molty tray app without affecting user settings.
- **Testing**: Execute `dotnet test` against `./tests/OpenClaw.Shared.Tests/` and `./tests/OpenClaw.Tray.Tests/` per the AGENTS.md workflow.
- **Key files**: `build.ps1`, `run-app-local.ps1`, `openclaw-windows-node.slnx`, and `src/OpenClaw.Tray.WinUI/` define the core development surface.

## Frequently Asked Questions

### What versions of Windows and .NET does openclaw-windows-node require?

You need **Windows 10 (build 19042/20H2) or later**, or Windows 11, paired with the **.NET 10.0 SDK**. The `OpenClaw.Tray.WinUI` project specifically requires the Windows 10 SDK with WinUI 3 components to compile the system-tray interface.

### How do I build only the Molty tray application without the CLI?

Pass the `-Project` parameter to the build script: `.\build.ps1 -Project WinUI`. This targets only the `src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj` file, reducing compilation time during UI-focused iterations.

### Why should I use the `-Isolated` flag when running locally?

The `-Isolated` flag in `run-app-local.ps1` directs the application to store settings in a temporary `%APPDATA%` subfolder rather than the standard user configuration path. This prevents conflicts when running multiple checkout copies or testing different branches simultaneously.

### Where are the automated tests located and how do I run them?

Tests reside in the `tests/` directory, specifically `OpenClaw.Shared.Tests` for library logic and `OpenClaw.Tray.Tests` for UI components. Run them with `dotnet test` pointing to the respective `.csproj` files, or follow the validation workflow defined in [`AGENTS.md`](https://github.com/openclaw/openclaw-windows-node/blob/main/AGENTS.md) which requires a full `build.ps1` execution prior to testing.