Reliable Windows Automation — Image & OCR Powered
Just keep building.
Many automation tools rely on fixed coordinates or fragile selectors. Scripts break when windows move, applications update, or screen resolutions change.
Surtr is a free, open-source Windows automation tool built to keep working when simpler automation approaches fail.
Instead of relying only on fixed coordinates or brittle selectors, Surtr can look at the screen like a human using image detection and OCR to find and interact with buttons, text, icons, forms, and other visual elements.
Image-based automation can survive window movement, resizing, and different screen layouts.
- Works when coordinate-based macros fail
- Built-in macro recorder turns actions into reusable scripts
- Image-based automation and OCR
- Powerful downloader and scraping tools
- Advanced OCR for screenshots, receipts, invoices, and documents
- SurtrUI desktop IDE with visual script building
- WebUI for browser-based remote control
- Task Bot scheduler for unattended recurring jobs
- Built-in JSON processing
- Extensive scripting capabilities
- Runs locally with no cloud dependency
- No subscriptions
- No ads
- Open source
Surtr was built over months of experimentation, debugging, redesigning, and adding features. It is still evolving, but the core idea remains simple:
Build automation that doesn't fall apart the moment the screen changes.
Download the latest release:
Download the latest Surtr release
Install Surtr and open Command Prompt:
surtr --versionLaunch the desktop IDE:
surtruior launch surtrui.exe from the installation directory.
To launch WebUI:
webuilauncherThen open:
http://127.0.0.1:4444
Important: If you use WebUI, change the default password immediately.
Want to explore the source code, modify Surtr, build your own commands, or contribute?
You're welcome here.
The source version of Surtr is intended for Windows.
The recommended Python version for the current source tree is:
Python 3.11.9
Using the recommended version helps avoid compatibility problems with some of Surtr's Windows-specific dependencies.
Check your Python version:
python --versionExpected:
Python 3.11.9
git clone https://github.com/vyixor/surtr.git
cd surtrRecommended:
python -m venv .venvActivate it on Windows:
.venv\Scripts\activateYour terminal should now show something similar to:
(.venv)
Install everything from the included requirements file:
python -m pip install -r requirements.txtIf pip is outdated:
python -m pip install --upgrade pipThen install the requirements again:
python -m pip install -r requirements.txtSurtr's OCR functionality uses Tesseract OCR.
You have two ways to make Tesseract available.
Install Tesseract OCR on Windows using a suitable Tesseract distribution.
After installation, make sure tesseract.exe is available to Surtr.
Then test it from Command Prompt:
tesseract --versionIf Windows recognizes the command, Surtr should normally be able to find it.
If Tesseract is installed but Surtr cannot detect it automatically, you can place Tesseract directly inside Surtr's OCR resources directory.
Use:
resources\OcR
The important file is:
resources\OcR\tesseract.exe
Copy the required Tesseract files into that directory so that tesseract.exe is directly available there.
Your directory should look approximately like:
surtr/
│
├── resources/
│ └── OcR/
│ ├── tesseract.exe
│ └── ...
│
├── autoscreen.py
├── requirements.txt
└── ...
This local fallback is useful when Surtr cannot detect a system-wide Tesseract installation.
Check that this file exists:
resources\OcR\tesseract.exe
Then try running Tesseract manually:
resources\OcR\tesseract.exe --versionIf that works, Surtr should be able to use the local copy.
Once Python, the dependencies, and Tesseract are ready:
python autoscreen.pyIf everything is installed correctly, Surtr should start normally.
That's it.
You can then explore the source, modify commands, create your own automation logic, and experiment with the framework.
For experienced developers, the entire setup is essentially:
git clone https://github.com/vyixor/surtr.git
cd surtr
python -m venv .venv
.venv\Scripts\activate
python -m pip install -r requirements.txt
python autoscreen.pyIf OCR fails:
Make sure resources\OcR\tesseract.exe exists.
Surtr runs as a lightweight CLI automation engine, but its real strength comes from combining automation with visual understanding.
Commands such as:
seeImage
moveToWord
textOnScreen
can search the screen for images or text and return coordinates, status values, or matches.
Commands such as:
imageReader
readScreen
can extract text from screenshots and other images.
Surtr provides its own scripting syntax with support for:
- Variables
- Conditions
- Loops
- Labels
- External scripts
- Multi-line blocks
- JSON operations
- Error handling
- Task automation
Example:
if {{input}} ?cntn bad ?run stop
SurtrUI provides a native desktop interface with:
- Script Builder
- Syntax highlighting
- Command tools
- Terminal
- Task Bot
- Script management
The WebUI provides browser-based access to Surtr, including:
- Live desktop streaming
- File browser
- Terminal
- Script Builder
- Remote automation control
Everything is designed to run locally.
Fetcher is Surtr's built-in downloading and web-fetching system.
It supports:
- Parallel segmented downloads
- Retries
- Backoff
- Batch downloads
- HTML parsing
- JSON parsing
- Data extraction
- Local HTML parsing
fetcher -fetch-download ^
-url https://example.com/linux.iso ^
-saveto linux.iso ^
-split-download 8 ^
-chunk-size 4096 ^
-retries 10 ^
-backoff-factor 1.5 ^
-show-progressCreate downloads.json:
[
{
"url": "https://site.com/file1.zip",
"save_as": "dl1.zip",
"split_download": 6
},
{
"url": "https://site.com/video.mp4",
"save_as": "movie.mp4",
"split_download": 12
}
]Run:
fetcher -fetch-download-json downloads.json -max-worker 10This allows multiple downloads to run concurrently while each download can also use segmented transfers.
Fetch → parse → extract:
fetcher -fetch "[{\"url\":\"https://news.com/article\",\"parser\":\"bs4\",\"select\":\"div\"}]"BS4
Full BeautifulSoup parsing.
Useful for:
- Complex selectors
- Classes
- Nested structures
- Local HTML files
- Raw HTML content
Example:
-select "div.article > p:first-child"
SBS4
Strict web parser.
Accepts:
http://
https://
Example:
-select "p"
fetcher -fetch "[{\"url\":\"C:\\path\\myfile.html\",\"parser\":\"bs4\",\"select\":\"div\"}]"Surtr includes an OCR system for extracting text from:
- Screenshots
- Receipts
- Invoices
- Documents
- Images
- Live desktop captures
imageReader -image receipt.png -lang eng
imageReader -image scan.jpg -transform bw -min-conf 65 -psm 6
imageReader -image invoice.png -char-width 9 -line-height 22 -save invoice.txt
imageReader -image screenshot.png -hide-output -save result.txt
screenShot temp.png ++ imageReader -image temp.png -lang eng
Launch:
surtruior open surtrUi.exe.
SurtrUI includes three major areas:
Visually create and edit Surtr scripts with syntax highlighting and command helpers.
Run Surtr commands interactively and inspect output immediately.
Schedule automation such as:
- Every few minutes
- Hourly
- Daily
- Weekly
- Custom recurring jobs
Launch:
webuilauncherThen open:
http://127.0.0.1:4444
Live Desktop Stream
Watch Surtr automate the desktop in real time.
File Browser
Browse and download files remotely.
Terminal
Execute commands through the browser.
Script Builder
Build and run Surtr scripts without leaving the browser.
Security: Change the default WebUI password immediately after setup.
One of Surtr's most useful features is the built-in Macro Recorder.
It watches your mouse and keyboard actions and converts them into a Surtr .as script.
Open SurtrUI or run:
startRecorder mymacro.as
You can also specify a recording duration:
startRecorder mymacro.as 60
Perform your normal actions:
- Click buttons
- Type text
- Move windows
- Scroll
- Navigate applications
- Perform repetitive workflows
Stop recording:
stopRecorder
Surtr creates:
mymacro.as
Run it with:
surtr run mymacro.as- Keep actions deliberate
- Avoid unnecessarily fast clicks
- Save clean reference images when visual matching is required
- Open recorded scripts in SurtrUI and refine them
- Add conditions, loops, and variables
- Combine recordings with Task Bot
- Test your automation after changing window size or layout
Record once.
Improve the script.
Schedule it.
Let Surtr do the repetitive work.
Surtr is a powerful automation tool because it can interact with your Windows environment.
That power should be used responsibly.
Change the default password via the WebUI configuration tools.
Use a strong password and configure the maximum number of users appropriately.
Enable guest restrictions when appropriate:
guestUser on
setSecurityPassword strongpass
activateSecurity
Use:
set {{onerror}} mylabel:
to provide controlled failure handling.
Example:
if {{input}} ?cntn bad ?run stop
- Test scripts before scheduling them
- Be careful when executing shell commands
- Avoid running untrusted scripts
- Review automation code before running it
- Keep Surtr updated
- Use strong WebUI credentials
- Restrict remote access when it is not needed
while not seeImage save-btn.png ?run wait 2
mouse click
screenShot price.png ++ imageReader -image price.png -lang eng -save price.txt
Example Task Bot command:
fileman copy C:\Data D:\Backup
Schedule:
Every day at 23:00
Surtr includes built-in JSON commands for creating, reading, modifying, appending, saving, deleting, and querying JSON data directly from automation scripts.
JSON is stored in memory during a session and remains available across runs only when saved to a file.
Keys are wrapped in square brackets:
[key]
Numeric array indexes remain plain:
.0
.1
.2
Example:
config.[theme]
config.[users].0.[name]
| Command | Purpose | Example |
|---|---|---|
json <name> <json> |
Create/update JSON | json config {"theme":"dark"} |
json <name> |
Print entire JSON | json config |
json <name>.[key] |
Read a value | json config.[theme] |
json <name>.[key] <value> |
Set a value | json config.[theme] light |
jsonAppend <path> <value> |
Append data | jsonAppend config.[favorites] "SurtrUI" |
jsonSave <name> <file> [indent] |
Save JSON | jsonSave config settings.json 2 |
jsonDelete <path> |
Delete a value | jsonDelete config.[theme] |
lenJson <path> |
Get length | lenJson config.[favorites] |
jsonParse <json> |
Parse JSON | jsonParse {"key":"value"} |
json config '{"theme":"dark","favorites":["Task Bot"]}'
json config
json config.[theme] light
jsonAppend config.[favorites] "SurtrUI"
jsonDelete config.[theme]
jsonDelete config.[favorites].0
jsonSave config myconfig.json 2
get {{data}} fetcher -fetch '[{"url":"https://myapisite.com","parser":"json"}]' -headers '{"User-Agent":"Mozilla/5.0","Accept":"application/json"}' -getdata
jsonParse {{data}}
json users {{data}}
json users.[0].[name]
lenJson users
Surtr can be customized through its configuration file.
Typical location:
C:\Surtr\surtr\surtrconfig.conf
or the equivalent location in your installation directory.
The configuration file can be opened with any text editor.
allowExternalScriptLabels=yes
autoBackupFileOnWatch=yes
trayIcon=yes
showSafeModeWarnings=yes
surtrPath=C:\\Surtr\\surtr
webuiSurtrWaitTimeout=120
useWebuiDefaultSurtrTheme=yes
useSurtrTheme=no
surtrUiOutput=shell
keepOutputShellOpen=no
showShellWhenRunningTask=yesKeep command windows open
keepOutputShellOpen=yesRun Task Bot jobs silently
showShellWhenRunningTask=noUse the built-in WebUI theme
useWebuiDefaultSurtrTheme=yesHide the system tray icon
trayIcon=noRestart Surtr after configuration changes.
Always keep a backup of your configuration file before making major changes.
Confirm that you are using the recommended Python version:
python --versionRecommended:
Python 3.11.9
Then reinstall dependencies:
python -m pip install -r requirements.txtCheck:
resources\OcR\tesseract.exe
or verify the system installation:
tesseract --versionIf Windows cannot find tesseract, install it or place the Tesseract files in:
resources\OcR
Run:
python -m pip install -r requirements.txtIf you are using a virtual environment, make sure it is activated first.
Make sure you have:
- Python 3.11.9
- All requirements installed
- Tesseract configured
- The project files in their expected locations
- The virtual environment activated
Then run:
python autoscreen.pySurtr started with a simple problem:
Automation should not break just because a window moved.
From that idea, it grew into a much larger automation framework combining:
- Visual recognition
- OCR
- Automation scripting
- GUI tooling
- Remote browser control
- Task scheduling
- Downloading
- Web fetching
- JSON processing
- Macro recording
It is not meant to replace every automation framework.
It is meant to be another option — especially when traditional automation starts becoming fragile.
Surtr is free and open source.
The source code is available so developers can:
- Study how it works
- Modify it
- Build new features
- Create custom commands
- Improve existing systems
- Report bugs
- Submit fixes
- Experiment with the framework
The project is still evolving, and you may encounter bugs or unfinished areas. That's part of the journey.
If you find something broken, please open an issue with:
- What you were trying to do
- What you expected
- What actually happened
- Your Python version
- Your Windows version
- Relevant error output
- Steps to reproduce the problem
Good bug reports make Surtr better for everyone.
Pull requests, ideas, bug reports, and improvements are welcome.
Before submitting a large change, opening an issue to discuss the idea can save time for everyone.
When contributing:
- Keep changes focused
- Avoid unnecessary dependencies
- Preserve Windows compatibility
- Test automation features before submitting
- Document new commands and features
- Keep security in mind
No ads.
No subscriptions.
No cloud dependency.
Just Windows automation.
Full documentation:
You can also run:
define
inside Surtr to explore available commands and functionality.
Surtr is free and open-source.
Development takes time, testing, debugging, and a ridiculous amount of coffee. ☕🔥
If Surtr saves you time, helps automate something annoying, or simply makes your workflow better, consider supporting the project.
Every bit of support helps keep development moving.










