Skip to content

Running from Source

SpaceSquare edited this page Aug 3, 2026 · 1 revision

繁體中文:Running-from-Source-zh-TW

Running from Source

Python core

python -m venv .venv
.venv\Scripts\activate
pip install -e ".[dev]"

CLI only (no GUI)

  1. Crop a screenshot of the thing you want to detect and put it in targets/.

  2. Copy rules.example.json to rules.json and edit the roi (screen region to watch, in absolute pixels) and image path.

  3. Run:

    python -m core.run rules.json

New rules default to "dryRun": true — the engine logs matches but does not click or type anything. Flip it to false once you've confirmed detection is stable. Press Ctrl+Alt+Q at any time to stop the engine immediately.

GUI (Electron)

  1. Start the Python server (binds to 127.0.0.1:8765 only):

    python -m core.server --rules-path rules.json
  2. In a second terminal, install and run the GUI:

    cd gui
    npm install
    npm run dev

    npm run dev starts the Vite dev server and Electron together. The window minimizes to the system tray on close instead of quitting — use the tray icon's "Quit" item to actually exit.

See also Building the Installer to package a distributable build yourself.

Clone this wiki locally