gut is the Go desktop automation layer in this repo. It now ships with:
- the library APIs under
./ - the capability report CLI at
./cmd/gutenv - a local stdio MCP server at
./cmd/gutmcp - a Codex plugin plus bundled skills at
plugins/gut
gut now depends on the official Go MCP SDK, which currently requires Go 1.25. The module go version was updated accordingly in go.mod.
On Windows, the local go.bat wrapper keeps GOTMPDIR at gut/.gotmp, but it special-cases the default go test ./testing and go test ./... flows. For the gut/testing package it compiles ./testing into the stable artifact path gut/.artifacts/go-test/gut-testing.exe and runs that binary directly, which avoids executing the blocked gut/.gotmp/go-build... test binary. If you already export GOTMPDIR, the wrapper leaves it unchanged.
Default unit/CI-style run:
go test ./...Coverage artifact generation:
go test -coverprofile=.artifacts/coverage/coverage.out ./...
go tool cover -func=.artifacts/coverage/coverage.out > .artifacts/coverage/coverage.txtCapability/environment report:
go run ./cmd/gutenv -format text
go run ./cmd/gutenv -format jsonYou can require specific capabilities in the report when checking a local/CI host:
go run ./cmd/gutenv -format text -require screen.size,window.list
go run ./cmd/gutenv -format json -require screen.size,window.list -mutableLive integration/parity smoke entrypoint:
GUT_ENABLE_LIVE_TESTS=1 go test -v ./testing/...Run the local MCP server over stdio:
go run ./cmd/gutmcpEnable mutating tools:
GUT_MCP_ALLOW_MUTATION=1 go run ./cmd/gutmcpOr:
go run ./cmd/gutmcp --allow-mutationRead-only:
statusscreen_capturescreen_color_atscreen_find_colorwindow_listwindow_activewindow_elementswindow_find_elementsaccessibility_snapshotaccessibility_searchclipboard_read
Mutating:
window_actionaccessibility_actionmouse_actionkeyboard_actionclipboard_write
gut://reference/capabilitiesgut://reference/keys
The repo-local Codex plugin lives at plugins/gut. It bundles:
- the local MCP server configuration in
plugins/gut/.mcp.json - a launcher script in
plugins/gut/scripts/run-gutmcp.sh - four skills for inspection, targeting, and control
The repo-local marketplace entry is at .agents/plugins/marketplace.json.
The bundled plugin configuration enables mutation by default via GUT_MCP_ALLOW_MUTATION=1, so agents should still use status and confirm intent before invoking mutating tools.
For a generic local MCP host, point it at the server directly:
{
"mcpServers": {
"gut": {
"command": "go",
"args": ["run", "./cmd/gutmcp"],
"env": {
"GUT_MCP_ALLOW_MUTATION": "1"
}
}
}
}If the host does not launch from the repo root, use the plugin launcher script instead:
{
"mcpServers": {
"gut": {
"command": "bash",
"args": ["/absolute/path/to/gut/plugins/gut/scripts/run-gutmcp.sh"]
}
}
}On Windows, prefer the direct go run ./cmd/gutmcp configuration instead of the plugin launcher script, because the bundled launcher currently assumes bash.
- v1 is optimized for macOS.
- Linux support depends on the active display session and capability availability.
- Window, screen, and accessibility behavior is capability-driven; use
statusbefore automation. - macOS screen capture and accessibility flows may require Screen Recording and Accessibility permissions.
- OCR/text finding in the default registry
- image-template finding in the default registry
- MCP prompts
- packaged MCP bundles or registry publication
The live gut/testing smoke suite stays gated by the existing harness rules:
GUT_ENABLE_LIVE_TESTS=1- a supported
libnut-corelive platform (darwin,linux, orwindows) - on Linux,
DISPLAYorWAYLAND_DISPLAY - every required capability reporting
available
More invasive checks can also require:
GUT_ENABLE_MUTATION_TESTS=1
go run ./cmd/gutenv uses the default gut/testing evaluation path and default libnut-core client so the report matches the same backend info, environment gates, readiness decision, reasons, and capability statuses used by the live test harness.