Deskbrid is a standalone daemon offering a JSON protocol for Linux desktop agents. It bridges popular utilities like GNOME Shell, DBus, and Wayland, enabling a unified interface for automation. Whether for shell scripts or AI agents, Deskbrid ensures consistent interaction across various platforms, addressing a critical gap in Linux desktop automation.
Deskbrid is a sophisticated standalone daemon designed to streamline interactions between Linux desktop environments and desktop agents. Built as a single Rust binary, Deskbrid wraps several core desktop components, including GNOME Shell, DBus, NetworkManager, BlueZ, PipeWire, and Wayland utilities, into a unified JSON-over-Unix-socket protocol. This integration allows both shell scripts and AI agents to communicate seamlessly through the same socket.
Key Features
-
Comprehensive Integration: Interact with various desktop functionalities including window management, input control, clipboard access, notifications, and more without relying on multiple tools.
-
Universal Protocol: By utilizing a JSON-over-Unix-socket architecture, Deskbrid establishes a communication method that is consistent and easy to use across different applications.
Common Actions
Deskbrid provides a range of actions that can be executed through its protocol. Examples include:
# Listing open windows
deskbrid windows list
# Typing text into the focused window
deskbrid keyboard type "git push origin main"
Supported Desktops
Deskbrid currently supports:
- GNOME 46+ on Wayland (Fully Supported)
- GNOME 45 on Wayland (Legacy Support)
- KDE Plasma on Wayland.
- Hyprland on Wayland
Real-World Applications
Deskbrid empowers automation scripts and AI agents alike, ensuring that tasks such as focusing windows, typing commands, and capturing screenshots can be accomplished programmatically. Its architecture facilitates real-time event subscriptions, making it ideal for developers looking to create responsive applications.
Example Client Library for Python
For a quick start with Deskbrid using Python:
from deskbrid import Deskbrid
client = Deskbrid()
@client.on("file.*")
def on_file_change(event):
print(f"File changed: {event['path']}")
client.windows_list()
client.keyboard_type("deploy production\n")
text = client.clipboard_read()
path = client.screenshot()
client.listen() # blocks, streaming events
Why Use Deskbrid?
Unlike alternatives such as xdotool, ydotool, or grim, Deskbrid is designed specifically for contemporary Linux environments leveraging Wayland. By unifying various functionalities into one daemon, it enhances programmability and simplifies the development of desktop automation.
For a detailed specification of the JSON protocol and available actions, refer to the PROTOCOL.md file in the repository.
No comments yet.
Sign in to be the first to comment.