Build

The sections below are synced from the Sqyre application repository so install and build steps stay in one place.

Sqyre logo

Sqyre

Desktop macro builder — automate mouse, keyboard, and screen-aware steps with a visual tree editor.


What it does

Sqyre lets you build and run macros without writing code. Each macro is a tree of actions: loops and branches for flow control, detection steps when the screen matters, and leaf actions for concrete input. Macros, images, masks, and data tables live under ~/.sqyre/ (config in db.yaml).

Platforms: Linux and Windows (see Developing).


Actions

CategoryActions
Mouse & keyboardMove, click, key, type
DetectionImage search (OpenCV), OCR (Tesseract), find pixel
VariablesSet, calculate, for each row, save to file or clipboard
Loop flowLoop, break, continue
MiscellaneousWait, pause, focus window, run macro, if (conditional)

Also in the app: data editor for reusable images, masks, and tabular sources; macro hotkeys (on press or release); global delay per macro; runtime variable panel while a macro runs.

Stack: Fyne · robotgo · gocv / OpenCV · gosseract / Tesseract


Usage

  1. Build or install for your OS — make linux or make windows (see Developing).
  2. Launch ./bin/sqyre (Linux) or the Windows binary from bin/windows-amd64/.
  3. Create a macro — the root is always a loop; add child actions from the picker.
  4. Configure each node in its dialog (coordinates, keys, templates, OCR regions, variables, etc.).
  5. Run from the toolbar, or assign a hotkey to the macro.

Branching actions (image search, OCR, find pixel, if) run child steps only when their condition matches. Loop / for each row repeat children; break and continue control those loops.


Screenshots

Assets under images/sqyre/ are generated from UI tests (./scripts/generate-docs-media.sh). CI checks they stay in sync.

Main windowMain window
Add action pickerAdd action picker
Data editorData editor
Building a macroDemo
Action dialog screenshots
Category
Mouse & keyboardMove · Click · Key · Type
DetectionImage search · OCR · Find pixel
VariablesSet · Calculate · For each row · Save to
MiscellaneousWait · Focus window · Run macro · Loop

Build (quick start)

Recommended: open the repo in the dev container — dependencies and OpenCV match what the app expects.

GoalCommand
Linux dev binarymake linux./bin/sqyre
Windows exemake windowsbin/windows-amd64/
AppImagemake appimage
Tesseract datamake tessdata

Override Go build tags with BUILD_TAGS=... (default: gocv_specific_modules).

More detail — manual host setup, tests, profiling, packaging — is in docs/DEVELOPING.md and docs/README.md.


License

Sqyre is licensed under the GNU General Public License v3.0 — see LICENSE.


Donations

If Sqyre saves you time, consider supporting development:

Developing (extended)

Developing Sqyre

Open the repository in the dev container (.devcontainer/). It provides Go, OpenCV (cached under /opt/opencv/linux), Tesseract, Flatpak tooling, and aligned library versions. GOFLAGS defaults to -tags=gocv_specific_modules.

From the repo root:

make linux          # ./bin/sqyre
make windows        # bin/windows-amd64/sqyre.exe (fyne-cross in Docker)
make appimage       # bin/*.AppImage
make tessdata       # download eng.traineddata for OCR

Run make help for matprofile variants (windows-matprofile, appimage-matprofile).


Make targets

TargetOutput
linuxbin/sqyre
windowsbin/windows-amd64/sqyre.exe
appimagebin/Sqyre-*.AppImage
tessdataTesseract trained data via scripts/download-tessdata.sh
*-matprofileSame as above with matprofile build tag

Set BUILD_TAGS to override tags (default: gocv_specific_modules).


Native dependencies

Sqyre uses CGO for OpenCV (gocv) and Tesseract (gosseract). OpenCV ≥ 4.6 is required.

ResourcePurpose
.devcontainer/DockerfileReference Linux dependency versions
scripts/linux/build-opencv-linux.shBuild OpenCV on Linux
scripts/windows/build-opencv-windows.shBuild OpenCV for Windows cross-compile
scripts/android/README-opencv.mdOpenCV for Android ABIs

Manual setup (without dev container)

These paths are maintained less actively than the dev container. Prefer the container when possible.

Linux

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

Build or install OpenCV to match gocv (see Dockerfile and build-opencv-linux.sh), then:

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

Windows (MSYS2 mingw64)

In the MSYS2 mingw64 shell, install toolchain, OpenCV, Tesseract, and Leptonica from MSYS2 packages (e.g. mingw-w64-x86_64-opencv, mingw-w64-x86_64-tesseract-ocr).

  1. Place eng.traineddata in C:\msys64\mingw64\share\tessdata.
  2. Set TESSDATA_PREFIX=C:/msys64/mingw64/share/tessdata.
  3. Build: go build -o sqyre.exe ./cmd/sqyre

Or cross-compile from Linux with make windows.


Tests

Headless (no display; uses -tags=nohook so the keyboard hook is not linked):

./scripts/test.sh
./scripts/test.sh -v ./internal/services/ -run TestExecute

UI / display (virtual framebuffer via xvfb-run):

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

Plain go test without these wrappers can segfault when DISPLAY is unset because of the native hook.


README screenshots & demo GIF

Regenerate assets in images/sqyre/:

./scripts/generate-docs-media.sh

Requires xvfb-run; ffmpeg builds the demo GIF from captured frames.

Verify committed PNGs match the current UI:

go test -v ./ui/ -run 'TestDocsScreenshots|TestDemoWorkflowFrames'
# or: ./scripts/test-ui.sh with the same -run filter

Set SQYRE_UPDATE_SCREENSHOTS=1 when intentionally updating golden images (the generate script sets this).


GoCV Mat profiling

Build with the matprofile tag to track gocv.Mat allocations and detect leaks.

PlatformCommand
Linuxgo build -tags "gocv_specific_modules,matprofile" -o sqyre ./cmd/sqyre
Windows (from dev container)make windows-matprofile
  • Logs: ~/.sqyre/sqyre.log (Windows: %USERPROFILE%\.sqyre\sqyre.log)
  • pprof HTTP server on 127.0.0.1:6060 (or next free port 6061–6065); open gocv.io/x/gocv.Mat in the browser for stack traces
  • SQYRE_PPROF=0 disables pprof; SQYRE_PPROF=127.0.0.1:9090 sets a fixed port

Packaging

See scripts/linux/packaging/PACKAGING.md for Flatpak and AppImage builds.