Prerequisites
Required Software
Install uv
uv is a fast Python package manager and runner.
Running from Source
Quick Start
The fastest way to run the bot:uv run command automatically:
- Creates a virtual environment
- Installs dependencies
- Runs the bot
Runtime Dependencies
Frompyproject.toml:7-12:
| Package | Purpose |
|---|---|
| pillow | Image processing and screenshot analysis |
| pyautogui | Mouse control and window interaction |
| numpy | Numerical operations for image data |
| keyboard | Global hotkey detection |
All dependencies are automatically installed by
uv run. You don’t need to install them manually.Development Setup
Installing Dev Dependencies
For code formatting, linting, and building:pyproject.toml:14-20:
| Tool | Purpose |
|---|---|
| black | Code formatter |
| isort | Import statement organizer |
| nuitka | Python to C compiler for building executables |
| ruff | Fast Python linter |
Code Formatting
Format all Python files:Linting
Check code quality:Project Structure
Building Executables
Using Nuitka
Nuitka compiles Python to C for better performance and standalone distribution. FromREADME.md:90-91:
Build Options Explained
| Option | Description |
|---|---|
--python-flag=-m | Run as module (enables __main__.py) |
--output-dir=dist | Output directory for the executable |
--mode=onefile | Create a single executable file |
--lto=yes | Enable link-time optimization for smaller size |
src | Source directory to compile |
Build Process
Advanced Build Options
For smaller executables:Distribution
Pre-built Releases
Download official releases from GitHub Releases. FromREADME.md:79-80:
To run as a non-technical user:
Download and run the .exe from the releases page
Creating Releases
Testing Builds
Verify Functionality
Test the built executable in all modes:Performance Comparison
Compare performance between source and compiled:| Metric | Source (uv run) | Compiled (Nuitka) |
|---|---|---|
| Startup time | ~2-3 seconds | <1 second |
| Solve time | Same | Same |
| File size | N/A | ~50-80 MB |
Troubleshooting
Common Build Errors
ImportError: No module named 'PIL'
ImportError: No module named 'PIL'
Problem: Pillow not bundled correctlySolution: Ensure Pillow is in dependencies and rebuild:
C compiler not found
C compiler not found
Problem: No C compiler installedSolution: Install a C compiler:
- Windows: Install Visual Studio with C++ tools
- Linux:
sudo apt install build-essential - macOS:
xcode-select --install
Antivirus blocking executable
Antivirus blocking executable
Problem: Antivirus flags the executable as suspiciousSolution: This is common with Nuitka builds. Add an exclusion or use code signing for distribution.
executable too large (>100MB)
executable too large (>100MB)
Problem: Bundled dependencies are largeSolution: Use standalone mode for faster startup:
Runtime Issues
Problem:config.toml not found
Solution: The executable creates config.toml in the current working directory. Run from a writable location.
Problem: Performance degradation Solution: Nuitka builds should be faster. Check if antivirus is scanning the executable on each run.
Platform-Specific Notes
Windows
- Requires Visual Studio 2017 or later for building
- Executable name:
src.exe - Default console application (window appears)
Linux
- Not officially supported (no screenshot/mouse libraries tested)
- Build may work but runtime will fail
- See
README.md:47-48for Linux limitation
macOS
- Not officially supported
- Requires code signing for distribution
- May need additional permissions for screen capture
Continuous Integration
For automated builds, use GitHub Actions:.github/workflows/build.yml