A beginner-friendly template for creating Robot Process Automation (RPA) bots using VibeScript that can control web browsers automatically.
This is a Robot Process Automation (RPA) template that teaches you how to build bots that can:
- π Open web browsers automatically
- π±οΈ Click buttons and fill forms without human interaction
- π Extract data from websites
- πΎ Save information to files
In this example, we built a bot that searches Wikipedia articles and saves their content - but you can modify it to automate any web task!
This Wikipedia bot performs these steps automatically:
- π Opens Chrome browser (without you clicking anything!)
- π Goes to Wikipedia.org
- π Types your search term in the search box
- π° Clicks on the first result
- π Reads the entire article
- πΎ Saves it as a JSON file on your computer
- A computer running Linux
- Internet connection
- Basic command line knowledge (we'll teach you!)
Press Ctrl + Alt + T to open the terminal.
VibeScript is a special programming language that controls web browsers. Copy and paste this command:
curl -L https://github.com/OUIsolutions/VibeScript/releases/download/0.15.1/vibescript.out -o vibescript.out && sudo chmod +x vibescript.out && sudo mv vibescript.out /bin/vibescriptWhat this does:
curl -Lβ Downloads VibeScript from the internetchmod +xβ Makes it executable (runnable)mv /bin/vibescriptβ Installs it system-wide
These are the tools that let our bot control Chrome browser:
# Create a folder for Chrome
mkdir -p chrome
# Download ChromeDriver (the controller)
curl -L https://storage.googleapis.com/chrome-for-testing-public/138.0.7204.94/linux64/chromedriver-linux64.zip -o chromedriver.zip
# Download Chrome browser
curl -L https://storage.googleapis.com/chrome-for-testing-public/138.0.7204.94/linux64/chrome-linux64.zip -o chrome-linux64.zip
# Extract both files
unzip chromedriver.zip -d chrome && unzip chrome-linux64.zip -d chrome
# Clean up zip files
rm *.zipcurl -L https://github.com/OUIsolutions/Standard-OUI-Rpa-Template-/releases/download/0.1.0/cli.lua -o cli.luaThis downloads the actual bot code!
First, create a shortcut name for our bot:
vibescript add_script --file cli.lua wikisearchNow you can use wikisearch instead of typing the full file name!
vibescript wikisearch configure --chromedriver_path chrome/chromedriver-linux64/chromedriver --chrome_binary chrome/chrome-linux64/chromeThis tells the bot:
- Where to find ChromeDriver (the controller)
- Where to find Chrome browser
vibescript wikisearch run --article "Albert Einstein" --out_dir my_resultsWhat happens:
- Chrome opens automatically
- Goes to Wikipedia
- Searches for "Albert Einstein"
- Saves the article to
my_results/result.json
Our bot has two main commands: configure and run.
Purpose: Tells the bot where to find Chrome on your computer
Full syntax:
vibescript wikisearch configure --chromedriver_path <path> --chrome_binary <path>Parameters explained:
| Parameter | What it means | Example |
|---|---|---|
--chromedriver_path |
Location of ChromeDriver (the controller) | chrome/chromedriver-linux64/chromedriver |
--chrome_binary |
Location of Chrome browser | chrome/chrome-linux64/chrome |
Short version (using aliases):
vibescript wikisearch configure -d <chromedriver> -c <chrome>Purpose: Actually searches Wikipedia and saves results
Full syntax:
vibescript wikisearch run --article <article_name> --out_dir <folder>Parameters explained:
| Parameter | What it means | Example |
|---|---|---|
--article |
What to search on Wikipedia | "Python programming" |
--out_dir |
Where to save results | results |
Short version:
vibescript wikisearch run -a "Python programming" -o resultsAfter running, you'll find:
my_results/
βββ result.json # The Wikipedia article
βββ downloads/ # Any images or files from the page
The JSON file looks like:
{
"hatnote": "This article is about the physicist. For other uses, see Albert Einstein (disambiguation).",
"text": "Albert Einstein (14 March 1879 β 18 April 1955) was a German-born theoretical physicist..."
}hatnote: Special notes at the top of Wikipedia articlestext: The actual article content
| File | What it's for | How to use |
|---|---|---|
| cli.lua | Command-line tool | Use with vibescript command |
| api_lib.lua | Programming library | Import in Lua scripts with require() |
| api.lua | Embedded library | Copy-paste into other projects |
If you want to use this bot in your own Lua programs:
- Download the API library:
curl -L https://github.com/OUIsolutions/Standard-OUI-Rpa-Template-/releases/download/0.1.0/api_lib.lua -o wikisearch.lua- Create your own script (
my_wikipedia_bot.lua):
-- Import the Wikipedia bot library
local wikisearch = require("wikisearch")
-- Search for an article
local result = wikisearch.fetch_wikipedia_article({
article = "Linux", -- What to search
chromedriver_path = "chrome/chromedriver-linux64/chromedriver", -- ChromeDriver location
chrome_binary = "chrome/chrome-linux64/chrome", -- Chrome location
outdir = "my_search_results" -- Where to save
})
-- Check if we found something
if result then
print("=== Wikipedia Article Found ===")
-- Print the hatnote if it exists
if result.hatnote then
print("Note: " .. result.hatnote)
end
-- Print first 500 characters of the article
print("\nArticle preview:")
print(string.sub(result.text, 1, 500) .. "...")
else
print("Article not found!")
end- Run your script:
vibescript my_wikipedia_bot.lualocal wikisearch = require("wikisearch")
-- List of articles to search
local articles = {"Python programming", "JavaScript", "Lua programming"}
-- Search multiple articles
for _, article in ipairs(articles) do
print("\nSearching for: " .. article)
local result = wikisearch.fetch_wikipedia_article({
article = article,
chromedriver_path = "chrome/chromedriver-linux64/chromedriver",
chrome_binary = "chrome/chrome-linux64/chrome",
outdir = "results/" .. article:gsub(" ", "_")
})
if result then
print("β Found! Saved to results/" .. article:gsub(" ", "_"))
else
print("β Not found")
end
end- Install Darwin (Build Tool):
curl -L https://github.com/OUIsolutions/Darwin/releases/download/0.4.0/darwin.out -o darwin.out && sudo chmod +x darwin.out && sudo mv darwin.out /usr/bin/darwin- Clone this repository:
git clone https://github.com/OUIsolutions/Standard-OUI-Rpa-Template-.git
cd Standard-OUI-Rpa-Template-- Build everything:
darwin run_blueprintThis creates all files in the release/ directory.
Standard-OUI-Rpa-Template-/
βββ api/ # Source code for the library
β βββ main.lua # Main API functions
β βββ scripts.lua # JavaScript code for browser
βββ cli/ # Source code for command-line tool
β βββ main.lua # CLI implementation
βββ release/ # Built files (generated)
β βββ cli.lua # Complete CLI tool
β βββ api.lua # Standalone API
β βββ api_lib.lua # Importable API
βββ README.md # This file
Contains the core functionality:
- Browser initialization
- Wikipedia navigation
- Content extraction
JavaScript code that runs inside the browser to extract text efficiently.
Command-line interface that:
- Parses arguments
- Calls API functions
- Handles errors
Solution: VibeScript isn't installed properly. Re-run Step 2.
Solution: You might need to install Chrome dependencies:
sudo apt-get install -y libglib2.0-0 libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2Solutions:
- Check spelling
- Try simpler search terms
- Check internet connection
Solution: Add sudo before commands that require administrator privileges
- Check existing issues
- Create a new issue with:
- Your operating system
- The command you ran
- The error message
- What you expected to happen
-
Understanding RPA:
- RPA = Robot Process Automation
- Automates repetitive tasks
- No human interaction needed
-
How Web Automation Works:
- WebDriver controls the browser
- Sends commands like "click here" or "type this"
- Can read page content
-
JSON Basics:
{ "key": "value", "number": 123, "list": ["item1", "item2"] }
After mastering this template, try:
- Modifying it to search other websites
- Adding features like downloading images
- Creating your own RPA bots
This project is open source. You can use, modify, and share it freely.
We welcome contributions! Even fixing typos helps!
- Fork the repository
- Make your changes
- Submit a pull request
- π§ Email: [your-email@example.com]
- π¬ Discord: [Your Discord Server]
- π Wiki: [Project Wiki]
Remember: This is just the beginning! Once you understand this template, you can automate almost any web task. Happy automating! π