# CST-Agent on Windows ## Release layout ``` cst-agent.exe busybox.exe # built from busybox-w32 libwinpthread-1.dll # MinGW runtime (required) LICENSE.busybox README-windows.md ``` Prebuilt tree from Linux cross-compile: `agent/dist/windows-x86_64/`. ## Build (MinGW-w64 cross from Linux) ```bash cd agent # 1) third-party: curl (Schannel) + PDCurses + busybox-w32 ./scripts/build_third_party_mingw.sh all # sources: # https://github.com/rmyorston/busybox-w32.git # https://github.com/curl/curl.git # https://github.com/wmcbrine/PDCurses.git # Unix busybox (optional, Linux/Termux bundle): # ./scripts/build_third_party_mingw.sh busybox-unix # https://github.com/mirror/busybox.git # 2) headless cmake -B build-win -DCMAKE_TOOLCHAIN_FILE=cmake/mingw-w64-x86_64.cmake \ -DCST_BUILD_TUI=OFF -DCMAKE_PREFIX_PATH=$PWD/third_party/prefix-mingw cmake --build build-win # 3) TUI (PDCurses) cmake -B build-win-tui -DCMAKE_TOOLCHAIN_FILE=cmake/mingw-w64-x86_64.cmake \ -DCST_BUILD_TUI=ON -DCMAKE_PREFIX_PATH=$PWD/third_party/prefix-mingw \ -DPDCurses_ROOT=$PWD/third_party/prefix-mingw cmake --build build-win-tui ``` Copy `build-win-tui/cst-agent.exe`, `third_party/busybox/busybox.exe`, and `libwinpthread-1.dll` into one folder. ## Run ```bat set CST_API_KEY=... cst-agent.exe --headless --workspace . --prompt "echo hi" cst-agent.exe --workspace . ``` Shell: bundled `busybox.exe sh -c ...` unless `CST_SHELL` is set. Credentials: `%APPDATA%\cst-agent\credentials` (or console prompt).