English | 中文
ok-py is a Python automation project template built on ok-script. It includes a runnable GUI app, task examples, configuration widget examples, OCR examples, template matching examples, tests, localization files, and packaging configuration.
This repository is not a finished automation tool for a specific game. It is a starter project and feature demo for building your own ok-script application.
API list and script recording

Capture and interaction methods

Annotation management and template matching

MyOneTimeTask, a sample task that demonstrates common task APIs and config widgets.ConfigOption global configuration example.TaskTestCase automated test examples..po files and compiled .mo files.pyappify.yml and GitHub Actions packaging/release configuration.Python 3.12 is recommended. On Windows, automation projects often need the terminal, PyCharm, or VS Code to run as administrator.
pip install -r requirements.txt --upgrade
python main_debug.py
Run normal mode:
python main.py
Run tests:
python -m unittest tests.TestMain
src/tasks Sample task classes
src/config.py ok-script app configuration
src/ui Custom UI tab example
tests Automated tests
assets Template matching assets and COCO annotations
docs/images Demo images used by the README
i18n Localization files
icons App icons
main.py Normal entry point
main_debug.py Debug entry point
pyappify.yml Packaging configuration
deploy.txt File list synced to the update repository during release
.github/workflows Build and release workflows
The main sample task is in src/tasks/MyOneTimeTask.py. Start there to:
default_config.config_type.run().self.ocr() for text recognition.self.find_one() or self.find_feature() for template matching.self.info_set() to show task state in the UI.self.log_info(..., notify=True) to send notifications.With custom tasks enabled, you can also create and edit task scripts from the GUI.
The repository includes GitHub Actions workflows. Pushing a matching tag triggers the build:
v*.*.*
The build uses pyappify.yml to package the app and deploy.txt to decide which files are synced to the update repository.
1097603920938132715$ claude mcp add ok-kes \
-- python -m otcore.mcp_server <graph>