Skip to content

API reference

This page is a navigable index of the OculiX API. For full method signatures and parameter descriptions, see the Javadoc on javadoc.io.

The package layout mirrors SikuliX so existing scripts keep working unchanged. Most users only ever need a handful of classes from org.sikuli.script.

ClassPurpose
ScreenA physical monitor. Screen(0) is primary. Inherits Region.
RegionA rectangular search area. Where every find / click / type lives.
PatternAn image plus matching parameters (similar(), targetOffset()).
MatchA successful find — a Region enriched with score and original pattern.
LocationA single (x, y) point.
ImageA captured or loaded image, decoupled from disk.
ScreenImageA BufferedImage plus its origin region — what capture() returns.
FinderLow-level OpenCV wrapper. findFeatures() lives here.
FindFailedException raised when no match meets the similarity floor.
ImageMissingException raised when a referenced image file is not on disk.
SettingsStatic configuration: MinSimilarity, WaitScanRate, AutoWaitTimeout, …

The five matching verbs:

Match find(Object target); // throw FindFailed
Match exists(Object target); // null if not found
Match exists(Object target, double timeout);
Match wait(Object target, double timeout);
boolean waitVanish(Object target, double timeout);
Iterator<Match> findAll(Object target);

The action verbs (every one returns the target it acted on, for chaining):

int click(Object target);
int doubleClick(Object target);
int rightClick(Object target);
int hover(Object target);
int type(String text);
int type(Object target, String text); // click first, then type
int paste(String text);
int dragDrop(Object from, Object to);
int mouseDown(int buttons);
int mouseUp(int buttons);
int wheel(int direction, int steps);
int keyDown(String keys);
int keyUp(String keys);

Subregion operations (all return a new Region):

Region above(int n);
Region below(int n);
Region left(int n);
Region right(int n);
Region inside();
Region nearby(int n);
Region grow(int width, int height);
Region morphTo(Region other);
Pattern p = new Pattern("button.png")
.similar(0.85) // similarity floor
.targetOffset(20, 5); // click 20 px right, 5 px down of center
Screen.getNumberScreens(); // how many monitors?
Screen s = new Screen(0); // primary
Screen s = new Screen(1); // secondary
s.capture(); // ScreenImage of the whole screen
s.capture(region); // ScreenImage of a sub-region
ClassPurpose
TextRecognizerBundled Tesseract front-end. Used by Region.text().
PaddleOCREngineHTTP client for the PaddleOCR server (localhost:5000).
PaddleOCRClientLow-level transport — most users call PaddleOCREngine instead.
String all = region.text();
Match label = region.findText("Submit");
PaddleOCREngine ocr = new PaddleOCREngine();
String json = ocr.recognize(screenImage.getFile());
int[] xywh = ocr.findTextCoordinates(json, "Submit");
Map<String, Double> all = ocr.parseTextWithConfidence(json);

See the OCR guide for the full story.

ClassPurpose
VNCScreenA Screen backed by a remote VNC server. Same API as Screen.
VNCRobotLow-level input event injection over VNC.
VNCClientThe raw VNC protocol client.
VNCFrameBufferDecoded pixel buffer of the remote screen.
VNCClipboardBidirectional clipboard sync.
XKeySym2200+ X11 key symbol definitions.
ThreadLocalSecurityClientPer-thread auth context for parallel VNC sessions.
VNCScreen vnc = VNCScreen.start("192.168.1.10", 5900, "password", 1920, 1080);
vnc.click("button.png");
vnc.type("hello");
vnc.stop();
ClassPurpose
ADBScreenA Screen backed by an Android device over ADB.
ADBDeviceDirect device control (tap, swipe, key, shell).
ADBClientLow-level ADB protocol client. Embedded jadb — no adb binary needed.
ADBRobotInput event injection.
ADBScreen android = ADBScreen.start("/path/to/adb");
android.click("button.png");
android.getDevice().tap(540, 1200);

Tested on Android 12+ via USB and WiFi (ADB pairing).

ClassPurpose
SSHTunnelOpen an SSH tunnel from Java. Embedded jcraft/jsch. No external deps.
SSHTunnel tunnel = new SSHTunnel("user", "remote-host", 22, "password");
tunnel.open(5900, "localhost", 5900); // local 5900 → remote localhost:5900
VNCScreen vnc = VNCScreen.start("localhost", 5900, "", 1920, 1080);
ClassPurpose
RunnerDispatch table to language-specific runners.
JythonRunnerJython (Python 2.7 on the JVM) — the default.
JRubyRunnerJRuby.
PythonRunnerCPython 3 via subprocess.
PowerShellRunnerPowerShell (Windows).
AppleScriptRunnerAppleScript (macOS).
RobotFrameworkRunnerRobot Framework keyword library.
NetworkRunnerDistributed remote execution.
ServerRunnerHeadless HTTP server for CI.

See the scripting languages guide.

ClassPurpose
SikulixIDEIDE entry point.
ScriptExplorerThe workspace explorer panel.
WelcomeTabFirst-launch landing tab.
EditorTabPaneThe script editor with image thumbnails.
ConsolePanelThe bottom console.
RecorderAssistantModern Recorder engine.

End-users normally don’t touch these. They’re public so plugin authors can extend the IDE.

oculix-mcp-server is a separate Maven module that exposes OculiX as an MCP server (stdio + HTTP). It signs every action with Ed25519 and writes a SHA-256-chained JSONL audit journal, designed for regulated environments.

Tool exposed via MCPMaps to
ClickRegion.click()
DblClickRegion.doubleClick()
RClickRegion.rightClick()
FindRegion.find()
FindTextRegion.findText()
ExistsRegion.exists()
WaitRegion.wait()
KeyComboSynthetic key event
OCRRegion.text() / PaddleOCREngine.recognize()
ScreenshotScreen.capture()
TypeRegion.type()
<dependency>
<groupId>io.github.oculix-org</groupId>
<artifactId>oculix-mcp-server</artifactId>
<version>3.0.3</version>
</dependency>
ClassPurpose
CommonsShared helpers (path resolution, version checks, OCR bootstrap).
DebugLogging façade — Debug.log(), Debug.error(), Debug.info().
RunTimeRuntime introspection (OS, Java version, fat-jar status).
FileManagerCross-platform file operations used by the IDE.
XKeySymX11 keysym definitions for VNC.
SikuliXceptionProject-wide checked exception.

javadoc.io / oculixapi

The Javadoc is auto-generated on every Maven Central release and is the source of truth for method signatures, parameter names, and return types.