yaze uses a modern CMake build system with presets for easy configuration. This guide explains the environment checks, dependencies, and platform-specific considerations. For concise per-platform commands, always start with the Build & Test Quick Reference.
Before your first build, run the verification script to ensure your environment is configured correctly.
Tip: After verification, run
.\scripts\setup-vcpkg-windows.ps1to bootstrap vcpkg, ensureclang-cl/Ninja are installed, and cache thex64-windowstriplet.
The script checks for required tools like CMake, a C++23 compiler, and platform-specific dependencies.
mac-dbg / lin-dbg / win-dbg, AI-enabled: mac-ai / win-ai, release: *-rel, etc.).cmake --preset <name> and build with cmake --build --preset <name> [--target …].-v to a preset name (e.g., mac-dbg-v) to surface compiler warnings.| Preset | Purpose |
|---|---|
win-dbg, win-rel, ci-windows | Core builds without agent UI, gRPC, or AI runtimes. Fastest option for MSVC/clang-cl. |
win-ai, win-vs-ai | Full agent stack for local development (UI panels + remote automation + AI runtime). |
ci-windows-ai | Nightly/weekly CI preset that exercises the entire automation stack on Windows. |
| Option | Default | Effect |
|---|---|---|
YAZE_BUILD_AGENT_UI | ON when YAZE_BUILD_GUI=ON | Builds the ImGui widgets used by the chat/agent panels. |
YAZE_ENABLE_REMOTE_AUTOMATION | ON for *-ai presets | Adds gRPC/protobuf services plus GUI automation clients. |
YAZE_ENABLE_AI_RUNTIME | ON for *-ai presets | Enables Gemini/Ollama transports, proposal planning, and advanced routing logic. |
YAZE_ENABLE_AGENT_CLI | ON when YAZE_BUILD_CLI=ON | Compiles the conversational agent stack consumed by z3ed. |
Combine these switches to match your workflow: keep everything OFF for lightweight GUI hacking or turn them ON for automation-heavy work with sketchybar/yabai/skhd, tmux, or remote runners.
ext/ directory or are managed by CMake's FetchContent. No external package manager is required for a basic build.-DYAZE_WITH_GRPC=ON.Note: When building in sandboxed/offline environments (e.g., via Claude Code or restricted networks), install yaml-cpp and googletest via Homebrew to avoid GitHub fetch failures. The build system automatically detects Homebrew installations and uses them as fallback:
/opt/homebrew/opt/yaml-cpp, /usr/local/opt/yaml-cpp/opt/homebrew/opt/googletest, /usr/local/opt/googletestchoco install ninja or enable the “CMake tools for Windows” optional component. .\scripts\verify-build-environment.ps1 -FixIssues – this checks Visual Studio workloads, Ninja, clang-cl, Git settings, and vcpkg cache. .\scripts\setup-vcpkg-windows.ps1 (prefetches SDL2, yaml-cpp, etc.). win-* presets (Ninja) or win-vs-* presets (Visual Studio generator) as needed. For AI/gRPC features, prefer win-ai / win-vs-ai. The project uses CTest and GoogleTest. Tests are organized into categories using labels. See the Testing Guide for details.
The easiest way to run tests is with ctest presets.
You can also run tests by invoking the test executable directly or using CTest with labels.
mac-ai). On Windows, choose the desired kit (e.g., “Visual Studio Build Tools 2022”) so the generator matches your preset (win-* uses Ninja, win-vs-* uses Visual Studio).cp build/compile_commands.json . to update IntelliSense.yaze directory.CMakePresets.json.win-dbg or win-ai) from the configuration dropdown.Current Configuration (Optimized):
ci-windows-ai job runs outside pull requests to exercise the full gRPC + AI runtime stack.Why FetchContent for gRPC in CI?
For desktop development, you can use vcpkg for faster gRPC builds:
**Benefits:**
**Note:** CI/CD workflows use FetchContent by default for reliability.
Use FetchContent for all dependencies (matches CI):
If you prefer vcpkg for local development:
**DO NOT** install grpc or zlib via vcpkg:
**clang-cl (Recommended):**
**MSVC:**
**Compiler Flags (Applied Automatically):**
Build issues, especially on Windows, often stem from environment misconfiguration. Before anything else, run the verification script.
This script is your primary diagnostic tool and can detect most common problems.
If the script finds issues, you can often fix them automatically by running it with the `-FixIssues` flag. This can:
After pulling major changes or switching branches, your build directory can become "stale," leading to strange compiler or linker errors. The verification script will warn you about old build files. You can clean them manually or use the `-CleanCache` flag.
**This will delete all `build*` and `out` directories.**
**Cause**: You are building code that requires AI features without using an AI-enabled preset, or your Git submodules are not initialized. **Solution**:
**Cause**: A previous instance of `yaze.exe` is still running in the background. **Solution**: Close it using Task Manager or run:
**Cause**: Your compiler is too old. **Solution**: Update your tools. You need Visual Studio 2022 17.4+, GCC 13+, or Clang 16+. The verification script checks this.
**Cause**: VS failed to parse `CMakePresets.json` or its cache is corrupt. **Solution**:
). Check the "CMake" pane in the Output window for specific JSON parsing errors. Delete the hidden.vs` directory in the project root to force Visual Studio to re-index the project.Cause: Git may be automatically converting line endings, which can break shell scripts and other assets. Solution: The verification script checks for this. Use the -FixIssues flag or run git config --global core.autocrlf false to prevent this behavior.
Cause: By default, Windows has a 260-character path limit, which can be exceeded by nested dependencies. Solution: The verification script checks for this. Use the -FixIssues flag or run git config --global core.longpaths true to enable long path support.