Golang API

Golang API Installation

Prepare the runtime and API module for direct Go usage, either from published binaries or from the repository build flow.

Who This Page Is For

Use this page when you want to work with the base implementation directly instead of starting from the Node.js or Python wrappers.

Runtime Setup Options

Build From Source

make

Or build the runtime binaries explicitly:

cd packages/api
go build -tags "gosseract opencv gocv_specific_modules gocv_features2d gocv_calib3d" \
  -trimpath -ldflags="-s -w" -o ../../sikuli-go ./cmd/sikuli-go
go build -tags "gosseract opencv gocv_specific_modules gocv_features2d gocv_calib3d" \
  -trimpath -ldflags="-s -w" -o ../../sikuli-go-monitor ./cmd/sikuli-go-monitor

Install A Published Runtime

Use Downloads and API Publish and Install if you want a published binary instead of a local build.

Module Path

The Go package surfaces in this repository live under:

github.com/smysnk/sikuligo/pkg/sikuli

Verify The Runtime

sikuli-go -listen 127.0.0.1:50051 -admin-listen :8080

Then use sikuli.NewRuntime("127.0.0.1:50051") from your Go program.

Next Pages