Skip to content

luhrMan/Sqyre

Repository files navigation

What is it

Sqyre is a Macro Builder, written using GO, with a few notable libraries:

  • Fyne (GUI)
  • Robotgo (Automation)
  • Gosseract aka Tesseract (OCR)
  • GoCV aka OpenCV (Computer Vision)

The structure of the fyne widget.Tree:

  • (Root) 1 Loop Action
  • (Branch) Action with SubAction (Advanced Actions)
    • Loop
    • Image Search
    • OCR
  • (Leaf) Action
    • Click: click the mouse where cursor is at
    • Move: move the mouse to specific coordinates
    • Key: Set a key state Up/Down
    • Wait: Wait for time set in milliseconds

Main Screen

Screenshot from 2026-01-13 13-09-30

ImageSearch in action

sqyre-imagesearch

Why

fuck all that clicking

BUILD INSTRUCTIONS

Recommended: Open this project in the dev container (e.g. in VS Code/Cursor: Dev Containers: Reopen in Container). All commands below are intended to be run from a terminal inside the dev container.


Linux

From the dev container (dependencies and OpenCV are pre-installed in the container):

go build -o sqyre ./cmd/sqyre
./sqyre

Logs are appended to ~/.sqyre/sqyre.log.

For Flatpak or AppImage packaging, see .devcontainer/builds/linux/packaging/PACKAGING.md.

Testing (UI)

robotgo requires an X display on Linux. To run UI tests in headless environments, use the wrapper script, which starts a virtual display automatically when needed:

./scripts/test-ui.sh

Pass through any go test flags after the script name, for example:

./scripts/test-ui.sh -run TestGUI

GoCV Mat profiling (leak detection)

Build with matprofile to track gocv Mat allocations and find leaks (unclosed Mats). Logs and a pprof HTTP server are enabled.

Build with matprofile:

Platform Command
Linux go build -tags "gocv_specific_modules,matprofile" -o sqyre ./cmd/sqyre
Windows (from dev container) ./.devcontainer/builds/windows/build-matprofile.sh

What you get: Logs (including Mat profile on exit) go to ~/.sqyre/sqyre.log (Windows: %USERPROFILE%\.sqyre\sqyre.log). The pprof server starts on 127.0.0.1:6060 (or 6061–6065 if 6060 is in use); the exact URL is printed in the log. Open it in a browser and use the gocv.io/x/gocv.Mat profile for leak stack traces.

Optional: Set SQYRE_PPROF=0 to disable the pprof server, or SQYRE_PPROF=127.0.0.1:9090 to use a specific port. If the browser cannot connect, allow Sqyre in Windows Firewall or use a different port via SQYRE_PPROF.

Linux without dev container

If you build on a bare Linux system:

  1. Install dependencies
    sudo apt install -y \
      build-essential pkg-config cmake golang-go \
      tesseract-ocr libtesseract-dev libleptonica-dev \
      libgl1-mesa-dev libglvnd-dev libglfw3-dev \
      libxkbcommon-dev libxkbcommon-x11-dev \
      libx11-dev libx11-xcb-dev libxext-dev libxtst-dev \
      libxcursor-dev libxrandr-dev libxinerama-dev \
      libxxf86vm-dev libxt-dev \
      libjpeg-dev libpng-dev libtiff-dev libwebp-dev libopenjp2-7-dev
  2. Install OpenCV — Sqyre uses gocv; OpenCV ≥ 4.6 is required. Either build via gocv (from repo root) or from source; see .devcontainer/Dockerfile for a reference.
  3. Build: go build -o sqyre ./cmd/sqyre

Windows

Docker cross-compile (from dev container)

Build a standalone Windows .exe with OpenCV and Tesseract statically linked (no DLLs). From inside the dev container (repository root), run the Windows build script:

bash .devcontainer/builds/windows/build.sh

Output: .devcontainer/builds/windows/output/Sqyre.exe

The dev container includes Docker-in-Docker and the required tooling.

No Dev Container/Native Windows (MSYS2)

Using the mingw64 shell in MSYS2:

  1. Install packages

  2. Tesseract English data

    • Download eng.traineddata and put it in C:\msys64\mingw64\share\tessdata.
    • In mingw64: export TESSDATA_PREFIX=C:/msys64/mingw64/share/tessdata
  3. Optional: set Go env (if using MSYS2 Go)

    • export GOROOT=/mingw64/lib/go
    • export GOPATH=/mingw64
  4. Build from the repo (in mingw64): go build -o sqyre.exe ./cmd/sqyre

To use the MSYS2 shell in VS Code: integrate MSYS2 with VS Code.

About

Cross-Platform Macro Builder

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors