Local Script Library
PowBot Script Library
Run your own scripts from your computer straight to your PowBot devices over your local network — no uploading, no per-device copying. The Script Library is a small desktop app that watches your script projects, builds them, and serves them to any device on the same network (or emulator) through the Library tab.
What it is
The Script Library is a desktop daemon (a small background app with a window). You point it at one or more local script projects; it:
- Watches each project for changes,
- Builds it (using Gradle) whenever it changes,
- Packages the compiled scripts for the device, and
- Serves them on your local network so your phones/emulators can pull and run them.
On the device side, a new Library tab in the script selector discovers your computer automatically and lists every script it's serving. Tap one to pull and run it.
This replaces the old workflow of copying a dev script onto each device individually.
Requirements
- Java 21 (JRE or JDK) installed on the computer that runs the library.
- Check with:
java -version(should report21). - Don't have it? Install Temurin 21 from https://adoptium.net.
- Check with:
- Your computer and your devices/emulators on the same local network (or an emulator running on the same computer — see Emulators below).
- The PowBot mobile client updated to a version with the Library tab.
Install & run
- Download powbot-script-library.jar
(
https://storage.powbot.org/v2/script-library/powbot-script-library.jar). - Start it:
On Windows you can usually double-click the jar if Java 21 is installed; otherwise run the command above in a terminal.java -jar powbot-script-library.jar - The Script Library window opens. Leave it running while you want devices to reach it.
The app stores its registered projects in ~/.powbot/library/projects.json, so your
setup is remembered between launches.
The desktop window
The window has three sections (navigation rail on the left):
1. Projects
Register and manage the script projects the library builds.
- Add project — pick the folder of a script project (a standard PowBot Gradle script project, e.g. one created with the PowBot IntelliJ tooling). The library immediately builds it.
- Each project row shows its build status: Never built, Built OK • <time>, or Build failed • <time> (click Show error to see why).
- Rebuild — force a fresh build.
- Remove — unregister the project (your files are untouched).
- Use the enable/disable toggle to temporarily stop serving a project without removing it.
Changes you save in your editor are picked up and rebuilt automatically — no need to click Rebuild for every edit.
2. Catalog
The list of built, ready-to-serve scripts (everything currently offered to devices). A script appears here once its project builds successfully and contains a valid script manifest.
3. Settings
- Server port — default 61777. Only change this if the port is already in use; if you do, you'll enter the same port manually on the device.
- Service name — the friendly name devices see during auto-discovery (default PowBot Script Library).
- Pairing PIN (optional) — set a PIN to require devices to supply it before they can list/pull scripts. Leave blank for an open library on a trusted home network.
Connecting from a device
- On the device, open the script selector and switch to the Library tab.
- Automatic (same Wi-Fi): your computer should appear on its own within a few seconds — its scripts load into the grid. Tap a script to pull and run it.
- If it doesn't appear automatically, add it manually (see below).
- If you set a Pairing PIN on the desktop, enter the same PIN in the PIN field before connecting.
Adding a host manually (saved hosts)
Some networks (guest Wi-Fi, corporate/VPN networks, and emulators) block the auto-discovery traffic. You can point the device directly at your computer instead:
- Find your computer's local IP address:
- Windows:
ipconfig→ IPv4 Address (e.g.192.168.1.20) - macOS/Linux:
ipconfig getifaddr en0/hostname -I
- Windows:
- In the Library tab, type that IP in the host field, leave the port at 61777 (unless you changed it), optionally add the PIN, and tap Add.
- The host is saved — it persists across restarts and is always checked, even when auto-discovery doesn't work. You can save multiple hosts; each appears in a list with a Remove button.
Emulators (BlueStacks, Android Studio AVD, Genymotion)
Emulators put Android on a virtual network, so the automatic discovery announcement usually doesn't reach them. Two things make it work anyway:
- Automatic: the Library tab automatically probes the emulator's "host loopback"
address (
10.0.2.2for BlueStacks / Android Studio,10.0.3.2for Genymotion) on port 61777. If the Script Library is running on the same computer as the emulator, it's usually found with no setup at all. - Manual fallback: if that doesn't work, add a saved host using your computer's LAN
IP address (steps above). For an emulator on the same machine,
10.0.2.2also works as the host value.
Troubleshooting
Nothing shows up on the device.
- Confirm the Script Library window is open and at least one project shows Built OK.
- Confirm the device and computer are on the same network (not guest/isolated Wi-Fi).
- Add the host manually using your computer's LAN IP (see Adding a host manually).
"Connection refused" or the manual host won't connect.
- Check your computer's firewall allows inbound connections on TCP 61777 (Windows Defender Firewall commonly blocks this the first time — allow it).
- Make sure you used the right IP and port, and the same PIN (if set).
A script never appears in the Catalog.
- Open the project's row in Projects; if it shows Build failed, click Show error.
- Make sure the project builds on its own and contains a valid script manifest.
It worked, then stopped after I closed the window.
- The library only serves while the desktop app is running. Reopen it.
I changed the port.
- Enter the new port in the device's manual host field; auto-discovery still works, but manual entries must match.
Quick reference
| Item | Value |
|---|---|
| Download | https://storage.powbot.org/v2/script-library/powbot-script-library.jar |
| Run command | java -jar powbot-script-library.jar |
| Java required | 21 |
| Default port | 61777 |
| Default service name | PowBot Script Library |
| Emulator host address | 10.0.2.2 (BlueStacks/AVD), 10.0.3.2 (Genymotion) |
| Project registry file | ~/.powbot/library/projects.json |