PeekWin is a Windows-native command-line interface (CLI) tool designed for window control, input automation, UI inspection, screenshots, and wait commands. It provides developers and system administrators with a powerful set of utilities to interact with windows, automate tasks, and inspect user interfaces programmatically.
Key Features:
Window Management: List, focus, move, resize, minimize, maximize, restore, and close windows.
Input Automation: Send mouse clicks and keyboard input to control applications programmatically.
UI Inspection: Inspect UI elements, capture references, and reuse them for automation tasks.
Screenshot Capture: Take screenshots of screens, windows, or specific UI elements with precision.
Wait Commands: Pause execution until a window, text, or saved UI reference reaches a specified state.
MCP Integration: Expose PeekWin's functionality over the Microsoft Command Processor (MCP) protocol for seamless integration into tools like Claude Desktop.
Audience & Benefit:
Ideal for developers, testers, and system administrators who need to automate tasks or interact with windows and UI elements programmatically. PeekWin enables efficient workflow automation, UI testing, and scripted interactions without requiring graphical user interface (GUI) navigation.
PeekWin can be installed via winget using the command winget install --id UsamaEjaz.PeekWin, making it easy to integrate into your development environment. For more detailed information, refer to PeekWin's documentation or run peekwin --help for usage guidance.
README
peekwin
peekwin is a Windows-native CLI for window control, input automation, screen inspection, targeted image capture, and UI wait commands.
Install
Package manager listings can take a little time to show up after a release or moderation step. When available, use:
WinGet
winget install --id UsamaEjaz.PeekWin
Chocolatey
choco install peekwin
Download the binary
Download the latest Windows executable from GitHub Releases:
peekwin--win-x64.exe for most Windows PCs
peekwin--win-arm64.exe for Windows on ARM
peekwin--claude-desktop-win-x64.mcpb for Claude Desktop on most Windows PCs
peekwin--claude-desktop-win-arm64.mcpb for Claude Desktop on Windows on ARM
Rename it to peekwin.exe if you want, then run it directly from PowerShell or Command Prompt:
.\peekwin.exe --help
.\peekwin.exe version
If you want it available from anywhere, add the folder containing peekwin.exe to your PATH.
If you need a specific version, download the asset from that release tag.
Build from source
Build from source with the .NET 8 SDK:
git clone https://github.com/usamaejaz/peekwin.git
cd peekwin
dotnet build -c Release
List, focus, move, resize, minimize, maximize, restore, and close windows
Send mouse and keyboard input
Inspect UI elements and reuse them later with --ref
Capture screenshots of screens, windows, or UI elements
Wait for windows, text, or saved UI refs to reach a state
Expose the same command surface over MCP
MCP server
peekwin includes an MCP server under the mcp subcommand. It supports both stdio and HTTP transports and exposes named MCP tools across the full command surface.
The CLI is Windows-only at runtime, but it can be built from a Linux host with the .NET 8 SDK installed.
Build:
dotnet build -c Release
Run locally on Windows:
dotnet run --project .\src\peekwin.csproj -- window list
Print the CLI version:
dotnet run --project .\src\peekwin.csproj -- version
Run the lightweight Windows smoke test:
.\scripts\smoke-test.ps1
Releases
GitHub release publishing is automated for pushed version tags that match v*.
Directory.Build.props defines the release version. peekwin version, assembly/file metadata, and release tags should stay in sync.
Create and push a release with the helper script:
.\scripts\release.ps1 0.5.0
This updates Directory.Build.props, creates a version-bump commit, creates tag v0.5.0, and pushes the branch and tag. Use -NoPush to keep the commit and tag local, or -DryRun to preview the release steps. -DryRun also skips the Windows-only guard so you can preview the flow from non-Windows PowerShell.
You can still push a tag manually if needed:
git tag v0.5.0
git push origin v0.5.0
Produced release assets:
peekwin--win-x64.exe
peekwin--win-arm64.exe
peekwin--claude-desktop-win-x64.mcpb
peekwin--claude-desktop-win-arm64.mcpb
Each executable is a self-contained Windows build, so the target machine does not need a separate .NET runtime installation.
Help
Use the built-in help for the full command reference: