peepbo
v1.0.1
Published
A lightweight Linux automation tool for mouse, keyboard, and screenshots. Inspired by Peekaboo.
Downloads
10
Maintainers
Readme
Peepbo 🫣
Peepbo is a lightweight, Node.js + TypeScript automation tool for Linux, inspired by Peekaboo. It allows you to programmatically control your mouse, keyboard, and window focus, as well as capture screenshots, making it ideal for building AI agents that interact with the Linux desktop.
Features
- 👀 See: Capture screenshots (
scrot,gnome-screenshot,imagemagick, orgdbusfor Wayland). - point_up Click: Move mouse and click (
xdotool). - keyboard Type: Type text and press key combinations.
- window Window Management: Focus and query active windows.
- TypeScript: Fully typed for safety.
Requirements
Peepbo relies on standard Linux automation tools. You can check for them using the built-in verify command:
peepbo verifyTypically, you will need:
xdotool(for automation)libglib2.0-bin(forgdbusscreenshots on GNOME Wayland)scrotorimagemagick(fallback for X11 screenshots)
Installation
From npm (Recommended)
npm install -g peepboFrom Source
# Clone the repository
git clone https://github.com/LichAmnesia/peepbo.git
cd peepbo
# Install dependencies
npm install
# Build the project
npm run build
# Link globally (optional)
npm linkUsage
You can run Peepbo directly via node:
# Link for global usage (optional)
npm link
# Capture a screenshot
peepbo image --output capture.png
# Click at specific coordinates
peepbo click --x 500 --y 300
# Type text
peepbo type "Hello World"
# Press a key combo
peepbo key "ctrl+c"
# Focus a window
peepbo window focus "Code"Troubleshooting: Wayland & Black Screenshots
On modern Linux distributions (like Ubuntu 24.04/25.10) using Wayland, you might encounter completely black screenshots. Peepbo handles this via GNOME's D-Bus API, but it requires GNOME to be in "Unsafe Mode" to allow external script interaction.
⚠️ Hardcore Solution: Enabling "Unsafe Mode"
Enabling Unsafe Mode allows external processes to interact with GNOME Shell internals. This is powerful for automation but bypasses some default security sandboxing.
- Open Looking Glass: Press
Alt + F2, typelg, and hitEnter. - Execute Command: In the console that appears, type the following and press
Enter:global.context.unsafe_mode = true - Exit: Press
Escto close the console.
Note: This setting resets on logout/reboot. If you prefer not to use this, consider switching to an X11 (Xorg) session from the login screen.
Documentation
- Tool Reference: Detailed guide to all CLI commands.
- Agent Patterns: Best practices for AI agents using Peepbo.
Development
# Watch mode for development
npm run build -- --watchLicense
ISC
