A complete beginner's guide. No prior experience required.
A script that opens a browser, visits a website, takes a screenshot, and clicks a link. All in about 10 lines of code.
Vibium requires Python 3.9 or higher. Check if you have it:
python3 --versionIf you see a version number (like Python 3.9.0 or higher), skip to Step 2.
# Install Homebrew (if you don't have it)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Python
brew install pythonDownload and run the installer from python.org. Choose the latest version.
# Ubuntu/Debian
sudo apt-get install python3 python3-pip python3-venv
# Or use your distro's package managermkdir my-first-bot
cd my-first-bot
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activatepip install vibiumThis downloads Vibium and the vibium binary for your platform.
Optionally, pre-download Chrome:
vibium installOr just let it download automatically on first run.
Create a file called hello.py:
from vibium import browser_sync as browser
# Launch a browser (you'll see it open!)
vibe = browser.launch()
# Go to a website
vibe.go("https://example.com")
print("Loaded example.com")
# Take a screenshot
png = vibe.screenshot()
with open("screenshot.png", "wb") as f:
f.write(png)
print("Saved screenshot.png")
# Find and click the link
link = vibe.find("a")
print("Found link:", link.text())
link.click()
print("Clicked!")
# Close the browser
vibe.quit()
print("Done!")python3 hello.pyYou should see:
- A Chrome window open
- example.com load
- The browser click "More information..."
- The browser close
Check your folder - there's now a screenshot.png file!
| Line | What It Does |
|---|---|
browser.launch() |
Opens Chrome |
vibe.go(url) |
Navigates to a URL |
vibe.screenshot() |
Captures the page as PNG bytes |
vibe.find(selector) |
Finds an element by CSS selector |
link.text() |
Gets the element's text content |
link.click() |
Clicks the element |
vibe.quit() |
Closes the browser |
Hide the browser (run headless):
vibe = browser.launch(headless=True)Use async/await (for more complex scripts):
import asyncio
from vibium import browser
async def main():
vibe = await browser.launch()
await vibe.go("https://example.com")
# ...
await vibe.quit()
asyncio.run(main())Use JavaScript instead: See Getting Started (JavaScript) for the JS version.
Add to Claude Code (let AI control the browser):
claude mcp add vibium -- npx -y vibium mcpSee Getting Started with MCP for the full guide.
Python isn't installed or isn't in your PATH. Reinstall from python.org.
Make sure you activated the virtual environment:
source .venv/bin/activateThen install vibium:
pip install vibiumTry running with headless mode disabled (it's disabled by default, but just in case):
vibe = browser.launch(headless=False)You might need to install dependencies for Chrome:
sudo apt-get install -y libgbm1 libnss3 libatk-bridge2.0-0 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libasound2You just automated a browser with Python. The same techniques work for:
- Web scraping
- Testing websites
- Automating repetitive tasks
- Building AI agents that can browse the web
Questions? Open an issue.