# System Bridge
> Monitor and control your system from the web client, Home Assistant, the terminal or your own code.
# System Bridge
Source: https://system-bridge.timmo.dev/
System Bridge runs on your computer and shares what it's doing, such as CPU, memory, disks, media and Discord, with the [web client](/using/web-client), [Home Assistant](/using/home-assistant), the [CLI](/using/cli) and your own code. It can also control your computer: play and pause media, show notifications, run commands you choose, and more.
**[Download and install](/install)**
Install System Bridge on Linux or Windows.
**[Run it](/running)**
Start it from the desktop, the terminal or a service, and make keys for your clients.
Windows releases are signed through SignPath, as set out in the [Code signing policy](/install#code-signing-policy).
## What it does
**[Monitoring](/features/monitoring)**
Watch CPU, memory, disks, networks, sensors and more in the web client, Home Assistant or the terminal.
**[Commands](/features/commands)**
Run programs you choose on your machine from the web client or any client with a key.
**[Notifications](/features/notifications)**
Show desktop notifications from the web client, the terminal, Home Assistant or an agent.
**[Media](/features/media)**
See and control what's playing, and share media folders with Home Assistant.
**[Remote control](/features/remote-control)**
Open URLs and files, type and press keys, and sleep, lock or shut down your machine.
**[Discord](/features/discord)**
Mute, deafen, change your audio devices and volumes, and play soundboard sounds.
## Ways to use it
**[Desktop](/using/desktop)**
The app launcher entry and system tray.
**[Web client](/using/web-client)**
Dashboards, controls and settings in your browser.
**[CLI](/using/cli)**
Read data, send notifications and run the backend from the terminal.
**[Home Assistant](/using/home-assistant)**
Sensors, a media player, notifications and actions for your automations.
**[Omarchy](/using/omarchy)**
System Bridge's health in the Omarchy bar and panel.
**[Android](/using/android)**
The app from F-Droid, with notifications, tiles and sharing.
## Build on it
**[API](/api)**
The HTTP and WebSocket APIs, with every event and data field.
**[MCP server](/api/mcp)**
Let agents read your system's data and control it over the Model Context Protocol.
**[Docs for agents](/llms)**
These docs as `llms.txt`, Markdown, and an MCP server agents can search.
## What it reports
| Module | What's in it |
| --- | --- |
| System | Hostname, platform, uptime, users, and which apps are using the camera or microphone |
| Processes | Running processes with their CPU and memory use |
| CPU | Usage, frequency, temperature and each core's load |
| Memory | Physical memory and swap |
| GPUs | Load, memory, clocks, temperature and power |
| Sensors | Temperatures and fan speeds |
| Battery | Charge, charging state and time remaining |
| Displays | Resolution, position and refresh rate |
| Disks | Partitions, space and activity |
| Networks | Interfaces, addresses, traffic and connections |
| Media | What's playing and its position |
| Discord | Your voice state and call |
See [Monitoring](/features/monitoring) for every way to read them.
## Get help
**[Discussions](https://github.com/timmo001/system-bridge/discussions)**
Ask questions and get help.
**[Issues](https://github.com/timmo001/system-bridge/issues)**
Report a bug or suggest a feature.
**[Contribute](/developing)**
Build, run and test System Bridge from source.
---
# API
Source: https://system-bridge.timmo.dev/api
System Bridge exposes your system over a local API. There are three ways to interact with it: an HTTP API for simple request/response calls, a WebSocket API for live data and control, and an MCP server for agents.
The [WebSocket API](/api/websocket/) is the primary interface and covers most operations: live data, input, media and power control, notifications, settings, and commands. Reach for HTTP only when you want a quick one-off read of status or a module's current data.
## Base URL
By default the backend listens on port `9170`, so the base URL is:
```text
http://{host}:9170
```
Replace `{host}` with the hostname or IP address of the machine running System Bridge. The port can be changed with the `SYSTEM_BRIDGE_PORT` environment variable.
## Authentication
Most endpoints need a key. Each client has its own, so you can see which clients connect and remove one without touching the others. A key looks like `system-bridge_client_` followed by 49 letters and digits, and it's only shown once, when it's made. System Bridge keeps a hash of it, never the key.
A client gets its key by:
- [Pairing](/api/pairing), for the Android app.
- Being made by hand, under **Settings > Devices** in the web client, or on the computer with:
```bash
system-bridge client key create "My script"
```
On first start, System Bridge also makes an owner key and writes it to the `owner-key` file in the [settings directory](/running/#file-locations), readable only by your user. The CLI signs in with it. See [keys in the CLI](/using/cli/#keys).
How you send the key depends on the protocol:
- **HTTP**: send `Authorization: Bearer {key}`.
- **WebSocket**: send `{"type": "auth", "key": "{key}"}` as the first message. See [signing in](/api/websocket/#signing-in).
- **MCP**: send `Authorization: Bearer {key}`, or for a client that only takes a URL, `?key={key}`. See [the MCP server](/api/mcp).
- **Media files**: ask for a [signed URL](/api/media-file-data), which holds no key.
The `GET /api` and `GET /api/health` endpoints do not need a key.
### Moving from the API token
Before keys, every client used one shared API token. A client that has it can [trade it for its own key](/api/keys#exchange-the-api-token), once. Until the token is removed in a later release, it still works where it did: in the `X-API-Token` or `token` header, as a Bearer, in each WebSocket message's `token` field, and in the `token` query parameter of the MCP and media file endpoints.
## Version header
The web client sends its version, such as `5.29.0`, in the `X-System-Bridge-Version` header, so a page left open across an update finds out. When it doesn't match the backend's version, the backend answers `426 Upgrade Required` and leaves the request undone:
```json
{
"message": "This page is version 5.28.0, but System Bridge is 5.29.0. Reload to use the new version.",
"server": "5.29.0",
"client": "5.28.0"
}
```
`GET /api/health` answers whatever the version, so a client can always read the backend's. A request without the header isn't checked, so other clients don't need to send it.
## Protocols
**[WebSocket](/api/websocket)**
Live data subscriptions and system control. Covers most operations.
**[HTTP](/api/http)**
Request/response endpoints for status and module data.
**[MCP server](/api/mcp)**
Connect agents over the Model Context Protocol.
### When to use which
| Protocol | Best for |
| --- | --- |
| WebSocket | Most operations: live updates, control actions (media, power, notifications, input), settings, and commands. |
| HTTP | Simple one-off reads: health checks and fetching a module's current data. |
| MCP | Letting agents query data and trigger actions. |
---
# Data
Source: https://system-bridge.timmo.dev/api/data
Get a module's current data over HTTP.
## Authentication
Needs a [key](/api/#authentication), as `Authorization: Bearer`.
## Request
```http
GET /api/data/{module}
Authorization: Bearer {key}
```
`{module}` is one of: `audio`, `battery`, `bluetooth`, `cameras`, `cpu`, `disks`, `discord`, `displays`, `gpus`, `media`, `memory`, `networks`, `processes`, `sensors`, `system`.
## Response
The response is the raw data for the requested module. The shape depends on the module. Most modules return a JSON object; `displays`, `gpus`, and `processes` return a JSON array of objects.
:::note
Most fields serialise as `null` when the value is unavailable on your platform or hardware, rather than being omitted. Some fields are only populated on certain operating systems, noted below where it matters.
:::
The same payloads are pushed over the WebSocket API as [`DATA_UPDATE`](/api/websocket/data/#receiving-data) messages.
### `audio`
| Field | Type | Description |
| --- | --- | --- |
| `outputs` | array | Output devices, such as speakers and headphones. |
| `inputs` | array | Input devices, such as microphones. |
| `apps` | array | Apps playing sound, each of which can be turned up, down or muted on its own. Linux only, and empty elsewhere. |
Each device has:
| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The device's id: its PulseAudio or PipeWire name on Linux, or its endpoint id on Windows. |
| `name` | string | The device's description. |
| `volume` | number | Volume as a percentage, averaged over its channels. It can go over 100 when the volume is boosted. |
| `muted` | boolean | Whether the device is muted. |
| `default` | boolean | Whether it's the default output or input. |
Each app has:
| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The app's id, such as `app:120`. It changes when the app stops and starts playing again. |
| `name` | string | The app's name, such as `Firefox`. |
| `title` | string | What the app says it's playing, such as a track, or `null`. |
| `volume` | number | The app's own volume as a percentage, averaged over its channels. |
| `muted` | boolean | Whether the app is muted. |
| `playing` | boolean | `false` while the app has paused its sound. |
| `output` | string | The `id` of the output it plays to. |
On Linux, the devices come from `pactl`, which needs PulseAudio 16 or later, or PipeWire with `pipewire-pulse`. Monitor sources, which capture an output, aren't listed as inputs, and filters such as an equaliser aren't listed as apps. On macOS all three lists are empty.
### `battery`
| Field | Type | Description |
| --- | --- | --- |
| `is_charging` | boolean | Whether the battery is charging. |
| `percentage` | number | Charge level, 0-100. |
| `time_remaining` | number | Estimated time until full when charging, or until empty when discharging, in seconds. |
| `state` | string | `charging`, `discharging`, `full`, `not_charging`, `empty`, or `unknown`. |
| `power` | number | Power going into or out of the battery, in watts. |
| `voltage` | number | Battery voltage, in volts. |
| `ac_connected` | boolean | Whether mains or USB power is connected. |
| `batteries` | array | Every battery, including connected devices such as a wireless mouse. |
The top-level battery fields are for the first system battery, and are `null` when there isn't one. `ac_connected` is `null` when the system doesn't report a power supply, as on most desktops, and on macOS.
Each item in `batteries` has `name`, `model`, `serial`, `scope` (`system` or `device`), `state`, `percentage`, `time_remaining`, `power`, and `voltage`. On Windows and macOS, batteries are named `BAT0`, `BAT1` and so on, and connected devices usually aren't listed.
On Linux, a connected device's `name` can change when it reconnects, such as `hidpp_battery_1` becoming `hidpp_battery_2`. Its `serial` stays the same, so use it to tell device batteries apart. `serial` is `null` when the driver doesn't report one, and always on Windows and macOS.
### `bluetooth`
| Field | Type | Description |
| --- | --- | --- |
| `devices` | array | Paired devices, sorted by name. |
| `powered` | boolean | Whether Bluetooth is on: `true` when any adapter is on. `null` when there's no adapter, and on Windows and macOS. |
Each device has:
| Field | Type | Description |
| --- | --- | --- |
| `address` | string | The device's Bluetooth address, such as `80:C3:BA:7B:93:4E`. |
| `name` | string | The device's name, or its address when it has none. |
| `type` | string | A freedesktop icon name for the kind of device, such as `audio-headset`, `input-keyboard` or `phone`. `null` when it's unknown. |
| `connected` | boolean | Whether the device is connected. |
On Linux, the devices come from BlueZ. On Windows, only classic Bluetooth devices are listed, so Bluetooth LE devices such as some keyboards and mice are left out. On macOS the list is empty.
### `cameras`
| Field | Type | Description |
| --- | --- | --- |
| `cameras` | array | Video capture devices, such as webcams, sorted by name. |
Each camera has:
| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The camera's `/dev/v4l/by-id` name, such as `usb-Insta360_Insta360_Link_2C-video-index0`, which stays the same when it's plugged in again. The device name, such as `video0`, when there's no such link. |
| `name` | string | The name the driver gives the camera. |
| `device` | string | The device node, such as `/dev/video0`. |
| `driver` | string | The kernel driver, such as `uvcvideo`. `null` when it isn't reported. |
| `format` | object | The format and size it captures in now, such as `MJPG` at 1280 by 720. `null` when it can't be read. |
| `formats` | array | Each format it supports, at its largest size. |
| `sizes` | array | Each size it captures at in any format, as `width` and `height`, largest first. Pictures can be taken at any of them. |
| `controls` | array | The camera's settings, such as brightness, zoom and white balance. |
Each format has:
| Field | Type | Description |
| --- | --- | --- |
| `format` | string | The format's four character code, such as `MJPG` or `YUYV`. |
| `name` | string | The format's name, such as `Motion-JPEG`. Empty in `format` when the camera doesn't list it. |
| `width`, `height` | number | The size in pixels. |
Each control has:
| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The control's name as `v4l2-ctl` writes it, such as `brightness` or `focus_automatic_continuous`. |
| `name` | string | The control's name, such as `Focus, Automatic Continuous`. |
| `group` | string | The set the control is in, such as `User Controls` or `Camera Controls`, as `v4l2-ctl` lists them. |
| `type` | string | `integer`, `boolean` or `menu`. |
| `value` | number | The current value. A boolean is `0` or `1`, and a menu's is the `value` of one of its `options`. |
| `minimum`, `maximum`, `step`, `default` | number | The range the value can take, and its default. |
| `options` | array | A menu's choices, each with a `value` and `name`. Empty for other controls. |
| `inactive` | boolean | Whether another control overrides it for now, such as focus while autofocus is on. |
| `read_only` | boolean | Whether the control can only be read. |
Metadata nodes are left out, so a webcam is listed once. The cameras are read without streaming from them, so they're still listed while an app is using them. On Windows and macOS the list is empty.
### `cpu`
| Field | Type | Description |
| --- | --- | --- |
| `count` | number | Number of logical cores. |
| `frequency` | object | Current, min, and max frequency in MHz (`current`, `min`, `max`). |
| `load_average` | number | System load average over 1 minute. Windows has no load average, so there it's an estimate from the processor queue length. |
| `load_average_5` | number | System load average over 5 minutes, estimated the same way on Windows. |
| `load_average_15` | number | System load average over 15 minutes, estimated the same way on Windows. |
| `per_cpu` | array | Per-core entries with `id`, `frequency`, `power`, `times`, `times_percent`, `usage`, and `voltage`. |
| `power` | number | Package power draw, in watts. |
| `stats` | object | Counters: `ctx_switches`, `interrupts`, `soft_interrupts`, `syscalls`. |
| `temperature` | number | CPU temperature, in degrees Celsius. |
| `times` | object | Cumulative CPU time in seconds (`user`, `system`, `idle`, `interrupt`, `dpc`). `dpc` is Windows only. |
| `times_percent` | object | The same breakdown as percentages. |
| `usage` | number | Overall CPU usage percentage. |
| `voltage` | number | Core voltage. |
### `disks`
| Field | Type | Description |
| --- | --- | --- |
| `devices` | array | Disks, each with `name`, `partitions`, and `io_counters`. |
| `io_counters` | object | Aggregate I/O: `read_count`, `write_count`, `read_bytes`, `write_bytes`, `read_time`, `write_time`, `read_bytes_rate`, `write_bytes_rate`. On Linux it counts physical disks only, so partitions, LUKS and LVM devices aren't counted twice. |
`read_bytes_rate` and `write_bytes_rate` are in bytes per second since the previous reading, in the total and on each disk. They are `null` on the first reading, and when a counter resets.
Each partition has `device`, `mount_point`, `filesystem_type`, `options`, `category` (`primary`, `bind`, or `squashfs`), and `usage` (`total`, `used`, `free`, `percent`).
### `discord`
The state of the local Discord app. This module only exists once Discord is [set up](/features/discord/), and appears without a restart.
| Field | Type | Description |
| --- | --- | --- |
| `connected` | boolean | Whether System Bridge is connected to the Discord app. |
| `authenticated` | boolean | Whether Discord accepted the authorization. |
| `user` | object | The Discord account: `id`, `username`, `global_name` (display name), and `avatar_url`. |
| `call` | object | The voice channel you're in, or `null` when you're not in one. See below. |
| `mute` | boolean | Whether you are muted. |
| `deaf` | boolean | Whether you are deafened. |
| `input` | object | The microphone setup. See below. |
| `output` | object | The output setup. See below. |
| `mode` | object | `type` (`VOICE_ACTIVITY` or `PUSH_TO_TALK`), `auto_threshold` (whether Discord sets the voice activity sensitivity), `threshold` (voice activity sensitivity in dB, -100 to 0), and `delay` (push to talk release delay in milliseconds). |
| `processing` | object | Whether `noise_suppression`, `echo_cancellation`, and `automatic_gain_control` are on. |
| `qos` | boolean | Whether Discord's quality of service for voice packets is on. |
| `silence_warning` | boolean | Whether Discord warns you when your microphone picks up nothing. |
| `video` | boolean | Whether your camera is on. `null` until it changes, as Discord only reports changes. |
| `screenshare` | boolean | Whether you are sharing your screen. `null` until it changes. |
| `notification` | object | The latest Discord notification: `message_id`, `channel_id`, `title`, `body` and `icon_url`. `null` until one arrives. To open its channel, send `OPEN_TEXT_CHANNEL` with its `channel_id`. |
| `sounds` | array | The soundboard sounds you can play: `id`, `name`, `server_id` (`null` for Discord's default sounds), `emoji`, and `emoji_url` for custom emoji. |
| `error` | string | Why the last attempt to connect or sign in failed, such as Discord rejecting the client ID. Left out when there's no problem, and by older versions of System Bridge. |
`call` has:
| Field | Type | Description |
| --- | --- | --- |
| `channel` | object | The voice channel: `id`, `name`, `type` (`GUILD_VOICE`, `GUILD_STAGE_VOICE`, `DM` or `GROUP_DM`), `bitrate` in bits per second, and `user_limit` (0 for no limit). |
| `server` | object | The server's `id`, `name` and `icon_url`, also known as a guild in Discord's API. `null` for direct message calls. |
| `connection` | object | Your voice connection: `state` (such as `VOICE_CONNECTED`, `CONNECTING` or `NO_ROUTE`), and `last_ping` and `average_ping` in milliseconds. `null` until Discord reports it. |
| `me` | object | Your entry in `members`. |
| `members` | array | Everyone in the call, including you: `user` (`id`, `username`, `global_name` and `avatar_url`), `nick` (their name in the call), `server_mute` and `server_deaf` (whether a moderator has muted or deafened them), `self_mute` and `self_deaf`, `suppress` (whether they can't talk, such as in an AFK channel or as a Stage listener), `speaking`, and your settings for them: `local_mute` and `volume` (0-200, as Discord's slider shows it). `local_mute` and `volume` are `null` for you. |
`input` and `output` each have:
| Field | Type | Description |
| --- | --- | --- |
| `volume` | number | The volume as Discord's slider shows it: 0-100 for input, 0-200 for output. |
| `device_id` | string | The selected device. `default` follows the system default. |
| `devices` | array | Devices Discord can use, each with `id` and `name`. |
Every field other than `connected`, `authenticated` and `error` is `null` until System Bridge is authenticated. Changes are pushed when they happen in Discord.
### `desktop`
The open windows, workspaces and keyboard layout, from Hyprland, another Wayland desktop, or Windows. Changes are pushed when they happen, except on Windows, which is checked every second. It's left out on macOS and X11.
| Field | Type | Description |
| --- | --- | --- |
| `compositor` | string | `hyprland`, `wayland` for other Wayland desktops, or `windows`. |
| `focused_window` | string | The focused window's `id`, or `null`. |
| `focused_workspace` | string | The focused workspace's `id`, or `null`. |
| `focused_display` | string | The focused display's id from the [`displays`](#displays) module, or `null`. Hyprland only. |
| `keyboard` | object | `layout` (the active layout, such as `gb`), `name` (such as `English (UK)`) and `layouts` (every installed layout). On Sway and niri, the layouts are named rather than coded, so `layout` and `name` are both the name, such as `English (UK)`. Empty on other Wayland desktops. |
| `windows` | array | The open windows. See below. |
| `workspaces` | array | The workspaces. Empty on Windows. See below. |
| `hyprland` | object | What only Hyprland reports, or `null` elsewhere. See below. |
| `omarchy` | object | What the Omarchy shell can open, or `null` while it isn't running. See below. |
Each window has `id`, `app`, `title`, `pid`, `workspace` (a workspace `id`), `display`, `x`, `y`, `width`, `height`, and whether it's `focused`, `fullscreen`, `maximised`, `minimised`, `floating`, `urgent` and `inhibiting_idle` (keeping the screen awake). `content_type` is what the window says it shows, such as `video` or `game`. Fields a desktop doesn't report are `null`. `title` is `null` unless you turn on **Window titles** on the web client's **Desktop** page.
Window ids are Hyprland's window addresses, Windows' window handles, or numbers System Bridge gives windows on other Wayland desktops. Use them with [desktop control](/api/websocket/control/#desktop-control).
Each workspace has `id`, `name`, `display`, `windows` (how many), and whether it's `active` (shown on its display), `focused`, `special` (a Hyprland scratchpad) and `fullscreen`.
`hyprland` has:
| Field | Type | Description |
| --- | --- | --- |
| `version` | object | `version`, `tag`, `commit`, `branch`, `config_provider` (`lua` or `hyprlang`) and `backend`. |
| `windows` | object | More about each window, by `id`: `fullscreen_mode`, `pinned`, `xwayland`, `hidden`, `visible`, `group`, `swallowing`, `tags`, `focus_history`, `stable_id` (never reused, unlike the `id`), `initial_app`, `initial_title` (only with window titles on), `xdg_tag`, `xdg_description` and `tearing_hint`. |
| `workspaces` | object | More about each workspace, by `id`: `layout`, `persistent` and `last_window`, the window last focused on it. |
| `options` | array | Common config options, each with its `name`, its `type`, `bool` or `int`, and its value in the field of that name. Gaps that differ by side are left out. Any option can be [read and set](/api/websocket/control/#options). |
| `displays` | object | More about each display, by name: `scale`, `transform`, `format`, `colour_preset`, `reserved`, `layers`, `dpms`, `vrr`, `tearing`, `direct_scanout`, `mirror_of` and `special_workspace`. |
| `keyboards`, `mice`, `switches`, `tablets`, `touch` | array | The input devices Hyprland sees. |
| `binds` | array | The config's key bindings, in order. |
| `global_shortcuts` | array | The shortcuts apps registered, each with `name` and `description`. Run one with [`HYPRLAND_RUN_GLOBAL_SHORTCUT`](/api/websocket/control/#hyprland-control). |
| `screencasts` | array | What's being shared, if anything. |
| `submap` | string | The active submap, or `null`. |
| `group_lock` | boolean | Whether window groups are locked. |
| `config_errors` | array | Errors in Hyprland's config. |
| `config_notices` | array | Deprecated options and dispatchers the config uses, from Hyprland 0.57. |
`omarchy` has:
| Field | Type | Description |
| --- | --- | --- |
| `menus` | array | The Omarchy menu's routes, each with `id` (such as `root` or `trigger.capture`), `name` and `aliases` (other names that open it, such as `capture`). Open one with [`OMARCHY_MENU`](/api/websocket/control/#omarchy-control). |
| `panels` | array | The panels and overlays of the shell's enabled plugins, each with `id` (such as `omarchy.audio`) and `name`. Open one with [`OMARCHY_PANEL`](/api/websocket/control/#omarchy-control). |
| `targets` | array | The shell's IPC targets, each with `name` and `functions`. Each function has `name`, `arguments` (each with `name` and `type`) and `returns`. Types are `string`, `int`, `bool`, `real` or, for `returns`, `void`. |
### `displays`
Returns an array of objects, one per display.
On Linux without an X server, such as under Wayland, the displays come from the kernel's DRM connectors instead. Then `name` is the monitor's model from its EDID, and `is_primary` and `pixel_clock` are `null`. Under Hyprland, the resolution, `refresh_rate` and position are the mode Hyprland set. On other Wayland compositors, the resolution is the monitor's preferred one, and the position and `refresh_rate` are `null`.
| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Display identifier. On Linux, the connector, such as `HDMI-A-2`. |
| `name` | string | Display name. |
| `resolution_horizontal` | number | Horizontal resolution in pixels. |
| `resolution_vertical` | number | Vertical resolution in pixels. |
| `x` | number \| null | X position in the virtual desktop. |
| `y` | number \| null | Y position in the virtual desktop. |
| `width` | number | Physical width in millimetres. Linux only. |
| `height` | number | Physical height in millimetres. Linux only. |
| `is_primary` | boolean | Whether this is the primary display. |
| `pixel_clock` | number | Pixel clock. |
| `refresh_rate` | number | Refresh rate in Hz. |
| `brightness` | number \| null | Brightness in percent, over DDC/CI or from a built-in panel's backlight. `null` when it can't be read. |
| `power_state` | string \| null | `on`, `standby`, `suspend` or `off`, over DDC/CI. On Hyprland, `on` or `off` from its DPMS for a display without DDC/CI. `null` when it can't be read. |
### `gpus`
Returns an array of objects, one per GPU. Full metrics require an NVIDIA GPU; other GPUs report a subset (typically `id`, `name`, and memory).
| Field | Type | Description |
| --- | --- | --- |
| `id` | string | GPU identifier. |
| `name` | string | GPU name. |
| `core_clock` | number | Core clock in MHz. |
| `core_load` | number | Core load percentage. |
| `memory_clock` | number | Memory clock in MHz. |
| `memory_load` | number | Memory load percentage. |
| `memory_free` | number | Free memory. |
| `memory_used` | number | Used memory. |
| `memory_total` | number | Total memory. |
| `power_usage` | number | Power draw in watts. |
| `power_limit` | number | The power limit in watts, from `nvidia-smi` or amdgpu's power cap. |
| `temperature` | number | Temperature in degrees Celsius. |
| `fan_speed` | number | Fan speed in RPM. On Linux, from AMD cards' hwmon. |
| `fan_speed_percent` | number | Fan speed as a percentage of its maximum. On Linux, from `nvidia-smi` or AMD cards' hwmon. |
| `encoder_load` | number | Video encoder use as a percentage. NVIDIA on Linux only. |
| `decoder_load` | number | Video decoder use as a percentage. NVIDIA on Linux only. |
| `performance_state` | string | The performance state, from `P0` (fastest) to `P12`. NVIDIA on Linux only. |
### `media`
Details of the current media session: `title`, `artist`, `album_title`, `album_artist`, `subtitle`, `type`, and `status`; playback state `position`, `duration`, `playback_rate`, `volume`, `shuffle`, `repeat`, and `track_number`; capability flags `is_play_enabled`, `is_pause_enabled`, `is_stop_enabled`, `is_next_enabled`, `is_previous_enabled`, `is_seek_enabled`, `is_fast_forward_enabled`, and `is_rewind_enabled`; a `thumbnail`; and `updated_at`. Available fields vary by operating system and media player.
On Linux, `players` lists every media player, each with an `id`, `name`, `status` (`PLAYING`, `PAUSED` or `STOPPED`), `title` and `artist`, plus the same track, playback, capability and `thumbnail` fields as above, so a client can show any of them. `player` is the `id` of the one the other fields describe, and [`MEDIA_CONTROL`](/api/websocket/control/#media-control) takes an `id` to control another. On Windows, `players` is empty and `player` is `null`.
### `memory`
| Field | Type | Description |
| --- | --- | --- |
| `virtual` | object | Physical memory: `total`, `available`, `percent`, `used`, `free`, `active`, `inactive`, `buffers`, `cached`, `wired`, `shared`. |
| `swap` | object | Swap: `total`, `used`, `free`, `percent`, `sin`, `sout`. |
### `networks`
| Field | Type | Description |
| --- | --- | --- |
| `networks` | array | Interfaces, each with `name`, `addresses`, `stats`, `io`, and `wifi`. |
| `connections` | array | Active connections with `fd`, `family`, `type`, `laddr`, `raddr`, `status`, and `pid`. |
| `io` | object | I/O for all interfaces combined, leaving out loopback: `bytes_sent`, `bytes_recv`, `packets_sent`, `packets_recv`, `errin`, `errout`, `dropin`, `dropout`, `bytes_sent_rate`, `bytes_recv_rate`. |
Each interface address has `address`, `family`, `netmask`, `broadcast`, and `ptp`; interface `stats` has `isup`, `duplex`, `speed`, `mtu`, and `flags`. `speed` is the link speed in Mb/s, read on Linux only. It is `null` where the system doesn't report one, such as wireless, virtual or disconnected interfaces. Interface `io` has the same fields as the combined `io`, for that interface only.
Interface `wifi` is `null` on wired and virtual interfaces. On wireless interfaces it has `ssid` (the network name), `signal` (signal strength in dBm), `signal_percent` (0 to 100, where -50 dBm or stronger is 100) and `link_rate` (the transmit rate in Mb/s). These are `null` while the interface isn't connected. It's read through nl80211 on Linux, so it works with NetworkManager, iwd and wpa_supplicant, and through the WLAN API on Windows. It's always `null` on macOS.
`bytes_sent_rate` and `bytes_recv_rate` are in bytes per second since the previous reading. They are `null` on the first reading, and when a counter resets.
### `processes`
Returns an array of objects, one per process.
| Field | Type | Description |
| --- | --- | --- |
| `id` | number | Process ID. |
| `name` | string | Process name. |
| `cpu_usage` | number | CPU usage percentage. |
| `memory_usage` | number | Memory usage percentage. |
| `created` | number | Creation time. |
| `path` | string | Executable path. |
| `status` | string | Process status. |
| `username` | string | Owning user. |
| `working_directory` | string | Working directory. |
### `sensors`
| Field | Type | Description |
| --- | --- | --- |
| `temperatures` | array | Temperature readings with `key`, `temperature`, `high`, and `critical`. When several chips share a driver, such as NVMe drives or memory modules, the later ones' keys end in a number, such as `nvme_composite_2`. |
| `fans` | array | Fan readings with `key`, `name`, `label`, `speed_rpm`, `speed_min`, and `speed_max`. On Linux this includes hwmon fans and supported Lian Li UNI HID fan controllers when the process can read `/dev/hidraw*`. |
| `windows_sensors` | object | Windows-only hardware and NVIDIA sensor tree. |
### `system`
| Field | Type | Description |
| --- | --- | --- |
| `hostname` | string | Machine hostname. |
| `fqdn` | string | Fully qualified domain name. |
| `platform` | string | Operating system. |
| `platform_version` | string | OS version. |
| `kernel_version` | string | Kernel version. |
| `boot_time` | number | Boot time as a Unix timestamp. |
| `uptime` | number | Uptime in seconds. |
| `ip_address_4` | string | IPv4 address. |
| `ip_address_6` | string | IPv6 address. |
| `mac_address` | string | MAC address. |
| `uuid` | string | Stable machine identifier. |
| `users` | array | Logged-in users with `name`, `active`, `terminal`, `host`, `started`, and `pid`. |
| `version` | string | Installed System Bridge version. |
| `version_latest` | string | Latest available version. Development builds track the `dev` branch, so this is the version a build of its latest commit would have, in the same format as `version`, when there's a newer one. |
| `version_latest_url` | string | URL for the latest release, or the commits since the build for development builds. |
| `version_newer_available` | boolean | Whether a newer version, or a newer commit for development builds, is available. |
| `camera_usage` | array | Apps using the camera. Linux only. |
| `microphone_usage` | array | Apps using the microphone. Linux only. |
| `pending_reboot` | boolean | Whether a reboot is pending. Linux only. |
| `package_updates` | integer | How many package updates are waiting, from `checkupdates` on Arch, apt on Debian and Ubuntu, dnf on Fedora, or winget on Windows. Checked in the background about once an hour, so it's null until the first check finishes or when no supported package manager is found. Linux and Windows only. |
| `package_update_list` | array | Each update `package_updates` counts, with its `name`, the `version` waiting and the `current_version` installed. dnf doesn't say the installed version, so it's `null` there. `null` when `package_updates` is. |
| `failed_units` | array | The systemd units that failed, from the system manager and, when System Bridge runs in your session, your user manager. Each has `name`, `description`, `scope` (`system` or `user`), `load_state`, `result` (why it failed, such as `exit-code`, `signal`, `timeout` or `oom-kill`) and `since` (when it failed, in Unix seconds). Empty when nothing has failed, and `null` without systemd. Linux only. |
| `power_usage` | number | System power draw in watts. Linux only. |
| `power_profile` | string | The active power profile, such as `power-saver`, `balanced` or `performance`, from power-profiles-daemon or tuned-ppd. `null` without either. Linux only. |
| `power_profiles` | array | The profiles [`SYSTEM_SET_POWER_PROFILE`](/api/websocket/control/#system-control) can switch to. Empty without power-profiles-daemon. Linux only. |
| `keep_awake` | boolean | Whether the system is kept from idling, with [`SYSTEM_SET_KEEP_AWAKE`](/api/websocket/control/#system-control). On Omarchy this is the bar's stay awake switch, so it's also `true` when you turned that on. `null` on Windows and macOS. |
| `keep_awake_until` | number | When keeping awake ends, as a Unix timestamp, if it was given a `duration`. Otherwise `null`. |
| `run_mode` | string | How the backend is running. |
| `idle_time` | number | Seconds since the user's last keyboard or mouse input. On Linux this comes from the Wayland compositor where it supports `ext-idle-notify-v1` (such as Hyprland, sway, niri and KDE), otherwise from logind's idle hint. `null` when neither is available. |
| `locked` | boolean | Whether the user's session is locked. On Linux this is logind's `LockedHint`, which GNOME and KDE set but some desktops, such as Omarchy, don't. `null` on macOS. |
```json title="Example: system"
{
"boot_time": 1651433957.3015134,
"fqdn": "Desktop",
"hostname": "Desktop",
"ip_address_4": "1.1.1.1",
"mac_address": "aa:bb:cc:dd:ee:ff",
"platform": "Windows",
"platform_version": "10.0.22000",
"uptime": 7.015625,
"uuid": "abcd-efgh-abcd-efgh-abcd",
"version": "5.0.2",
"version_latest": "5.0.7",
"version_newer_available": false
}
```
---
# Events
Source: https://system-bridge.timmo.dev/api/event
Send one event and get its response, without opening a WebSocket. The Android app's quick settings tiles use it to lock the computer or put it to sleep. It takes the same events, through the same handlers, as the [WebSocket API](/api/websocket/).
Needs a [key](/api/#authentication), as `Authorization: Bearer`.
## Request
```http
POST /api/event
Authorization: Bearer {key}
Content-Type: application/json
{ "event": "POWER_LOCK", "data": {} }
```
`event` is any WebSocket event, such as those under [power control](/api/websocket/control#power-control). `data` is that event's data, and can be left out when it takes none. `REGISTER_DATA_LISTENER` and `UNREGISTER_DATA_LISTENER` get `400`, as they need a WebSocket to send the data down.
## Response
The event's response, as the WebSocket would send it:
```json title="Response"
{ "id": "6f1c…", "type": "POWER_LOCKING", "subtype": "NONE", "data": {} }
```
The status is `200` even when the response's `type` is `ERROR`, as it is for an unknown event.
---
# HTTP API
Source: https://system-bridge.timmo.dev/api/http
The HTTP API handles simple request/response reads: confirming the backend is running and fetching a module's current data. For everything else, use the [WebSocket API](/api/websocket/), which is the primary interface and covers most operations: live data, input, media and power control, notifications, settings, and commands.
:::note
Most endpoints need a key. See [Authentication](/api/#authentication).
:::
## Base URL
By default the backend listens on port `9170`, so the base URL is:
```text
http://{host}:9170
```
Replace `{host}` with the hostname or IP address of the machine running System Bridge. The port can be changed with the `SYSTEM_BRIDGE_PORT` environment variable.
## Endpoints
**[Status and health](/api/status)**
Confirm the backend is running. No key required.
**[Data](/api/data)**
Fetch a module's current data on demand.
**[Media file data](/api/media-file-data)**
Download a media file by base directory and path.
**[Events](/api/event)**
Send one WebSocket event, such as locking the computer.
**[Keys](/api/keys)**
List, make and remove keys, and trade the API token for one.
**[Pairing](/api/pairing)**
Give a phone its own key through a one-time code.
**[Push](/api/push)**
Subscribe a phone or browser to pushes.
**[Releases](/api/releases)**
Get the newest releases and their notes.
---
# Keys
Source: https://system-bridge.timmo.dev/api/keys
Each client signs in with its own [key](/api/#authentication). These routes list the clients with a key, make one by hand and remove one. The web client uses them under **Settings > Devices**.
## List the clients with a key
Needs a key, as `Authorization: Bearer`.
```http
GET /api/keys
Authorization: Bearer {key}
```
```json title="Response"
{
"clients": [
{
"id": "owner",
"name": "Owner",
"kind": "owner",
"scopes": ["all"],
"created": "2026-11-15T18:33:06Z",
"lastUsed": "2026-11-15T18:42:24Z"
},
{
"id": "4c1f…",
"name": "Pixel 9",
"kind": "android",
"scopes": ["all"],
"created": "2026-11-15T19:02:11Z"
},
{
"id": "8b2e…",
"name": "Home Assistant MCP",
"kind": "key",
"scopes": ["all"],
"created": "2026-11-15T19:10:40Z",
"lastUsed": "2026-11-15T19:12:03Z",
"usedInUrl": "2026-11-15T19:11:02Z"
}
]
}
```
`kind` says how the client got its key, such as `android` from pairing, `web` for a browser, `key` for one made by hand, `cli` for one made on the computer, or `owner`. `lastUsed` is left out until the key is used, and is updated at most once a minute. `usedInUrl` is when the key was first sent in a URL, to the [MCP server](/api/mcp), where it can end up in a client's history or logs. A new key for the client clears it. The keys themselves are never listed.
## Make a key
Needs a key. Give the key a name to recognise it by.
```http
POST /api/keys
Authorization: Bearer {key}
Content-Type: application/json
{ "name": "My script" }
```
```json title="Response"
{
"key": "system-bridge_client_…",
"client": { "id": "8b2e…", "name": "My script", "kind": "key" }
}
```
The key is only shown in this answer. Copy it now, as System Bridge keeps only its hash.
## Remove a key
Needs a key. The client signs out at once, and can't connect again until it has another key.
```http
DELETE /api/keys?id={client id}
Authorization: Bearer {key}
```
Answers `204` when removed, or `404` when there's no client with that id.
## Exchange the API token
Before keys, every client used one shared API token. A client that has it trades it for its own key here, once, then uses the key instead. This is the only route that takes the token alone, and it goes when the token does.
Send the token as `Authorization: Bearer`, with the client. The client keeps its `id`, so exchanging again replaces its key rather than adding another.
```http
POST /api/keys/exchange
Authorization: Bearer {token}
Content-Type: application/json
{
"client": { "id": "a3f0…", "name": "Home Assistant", "kind": "home-assistant" }
}
```
```json title="Response"
{
"key": "system-bridge_client_…",
"client": { "id": "a3f0…", "name": "Home Assistant", "kind": "home-assistant" }
}
```
A wrong token, or a key, gets `401`. A client without an `id`, `name` or `kind` gets `400`.
---
# MCP server
Source: https://system-bridge.timmo.dev/api/mcp
System Bridge includes a Model Context Protocol (MCP) server, letting agents and other MCP clients query your system and trigger actions.
The primary endpoint uses Streamable HTTP:
```text
http://{host}:9170/api/mcp
```
Replace `{host}` with the hostname or IP address of the machine running System Bridge. The port can be changed with the `SYSTEM_BRIDGE_PORT` environment variable. Use `https://` when System Bridge is exposed through SSL configuration or TLS termination.
All connections need a [key](/api/#authentication). Make one for the MCP client under **Settings > Devices** in the web client, or with `system-bridge client key create "My agent"`, and send it as a header:
```text
Authorization: Bearer YOUR_KEY
```
A missing or invalid key is rejected with `401 Unauthorized`.
A client that only takes a URL, such as Home Assistant's integration, can put its key in the URL instead:
```text
http://{host}:9170/api/mcp?key=YOUR_KEY
```
Only this endpoint takes a key in its URL, and System Bridge never logs it. A URL can still end up in a client's history or logs, so **Settings > Devices** marks each key that has been sent in one, for you to remove it if it leaks. Prefer the header when the client takes one. The old shared API token also works as `?token=`, until it's removed in a later release.
:::caution
A key gives access to MCP tools that can read system data, send notifications, control media, displays and windows, and run the commands in your allowlist. Keep it secret, give each client its own so you can remove one, and use HTTPS when the connection crosses an untrusted network.
:::
## Home Assistant
Home Assistant's Model Context Protocol integration can connect directly to System Bridge. No command or WebSocket bridge is required.
1. In Home Assistant, go to **Settings** > **Devices & services**.
2. Select **Add integration**, then search for **Model Context Protocol**.
3. Make a key for it with `system-bridge client key create "Home Assistant MCP"`, or under **Settings > Devices** in the web client. Enter the Streamable HTTP URL with the key, for example `http://192.168.1.10:9170/api/mcp?key=YOUR_KEY`. The integration takes only a URL, so the key goes in it.
4. Complete the setup flow.
5. Configure your conversation agent to use the System Bridge MCP tools.
Use a hostname or IP address that Home Assistant can reach. Use `https://` if the endpoint is exposed over HTTPS.
## Other MCP clients
For a remote MCP client, choose its Streamable HTTP transport, use the endpoint and send your key in the `Authorization` header:
```text
http://{host}:9170/api/mcp
Authorization: Bearer YOUR_KEY
```
Client configuration formats and option names vary. Some clients take a custom `Authorization` header, while others take only a URL, which can carry the key as `?key=`. Follow the client's documentation rather than assuming a particular configuration key.
## Legacy WebSocket transport
The SDK-backed WebSocket transport remains available at the same path for compatibility, with the key as a header:
```text
ws://{host}:9170/api/mcp
Authorization: Bearer YOUR_KEY
```
Use `wss://` when connecting through TLS. Streamable HTTP is the primary setup for clients that support remote MCP servers.
For a stdio-only client, `websocat` can bridge the client's standard input and output to the legacy WebSocket:
```bash
websocat -H "Authorization: Bearer YOUR_KEY" "ws://localhost:9170/api/mcp"
```
Configure the client to launch `websocat` with the WebSocket URL as its argument. The exact command and argument fields depend on the client.
## Results and Code Mode
Every tool declares an output schema and returns its result as structured content, with the same JSON as text for clients that only read text. Actions return `{ "success": true, "message": "..." }`. `system_bridge_list_commands` and `system_bridge_list_command_prefabs` wrap their lists in an object, as `commands` and `prefabs`, since structured content has to be an object.
Clients with a Code Mode, such as OpenCode, use the schemas to type each tool, so an agent can chain calls in one script rather than one tool call at a time. For example, with the server named `system-bridge`:
```js
const sb = tools["system-bridge"]
const { processes } = await sb.system_bridge_get_data({ modules: ["processes"] })
const top = processes.toSorted((a, b) => (b.cpu_usage ?? 0) - (a.cpu_usage ?? 0)).slice(0, 3)
await sb.system_bridge_send_notification({
title: "Busiest processes",
message: top.map((p) => `${p.name}: ${(p.cpu_usage ?? 0).toFixed(1)}%`).join("\n"),
})
```
Tools that only read, such as `system_bridge_get_data`, are marked with the `readOnlyHint` annotation, so clients can run them without asking first.
### OpenCode plugin
The OpenCode plugin in `opencode-plugin/` gives OpenCode the same tools as a `system-bridge` Code Mode namespace, without an MCP server entry or a key in your config. Load it from the repository:
```json
{
"plugins": ["github:timmo001/system-bridge#dev::path:opencode-plugin"]
}
```
It reads the tools from `system-bridge agent tools --json` and runs each with `system-bridge agent call`, which calls this server on the local backend with the owner key, so they always match the `system-bridge` on your `PATH`. Tool names drop the `system_bridge_` prefix, so `system_bridge_get_data` is `tools["system-bridge"].get_data`. Tools that change something ask first, and "always allow" on `media_control`, `hyprland_dispatch`, `hyprland_set_option`, `discord_control`, `set_power_profile` or `run_command` covers one action, dispatcher, option, profile or command.
When this computer is [paired with others](/using/cli/#remote-computers), every tool also takes `remote`, naming the paired computer to run it on; leave it out for this one. Allowing a tool on one computer doesn't allow it on another.
## Tools
### `system_bridge_add_command`
Add a [command](/features/commands/) to the allowlist through [`COMMAND_ADD`](/api/websocket/system/), as adding one in the web client does. It's checked the same way, and every connected client gets the new settings. It returns `{ "command": { ... } }`, the saved command with its new `id`.
- `name` (required): What the command is called in lists.
- `command` (optional): The program's full path. Leave it out to run the prefab's program.
- `arguments` (optional): The arguments, one per item, passed without a shell.
- `workingDir` (optional): Where the program runs.
- `prefab` (optional): A prefab's `id` from `system_bridge_list_command_prefabs`.
Give `command` or `prefab`. Example arguments:
```json
{ "name": "Restart audio", "command": "/usr/bin/systemctl", "arguments": ["--user", "restart", "pipewire"] }
```
### `system_bridge_audio_control`
Set an audio output's, input's or app's volume or mute state, make an output or input the default, or move an app to another output. See [audio control](/api/websocket/control/#audio-control) for what each platform supports.
- `id` (required): An `id` from the `audio` module's `outputs`, `inputs` or `apps`.
- `volume` (optional): Volume in percent, 0-100.
- `muted` (optional): `true` to mute it, `false` to unmute it.
- `default` (optional): `true` to make it the default output or input.
- `output` (optional): An output's `id`, to move an app's sound to it. Linux only.
Example arguments:
```json
{ "id": "alsa_output.pci-0000_00_1f.3.analog-stereo", "volume": 40 }
```
### `system_bridge_bluetooth_connect`
Connect a paired Bluetooth device. See [Bluetooth control](/api/websocket/control/#bluetooth-control) for what each platform supports.
- `address` (required): The device's `address` from the `bluetooth` module's `devices`.
### `system_bridge_bluetooth_disconnect`
Disconnect a paired Bluetooth device.
- `address` (required): The device's `address` from the `bluetooth` module's `devices`.
### `system_bridge_bluetooth_forget`
Forget a paired Bluetooth device, unpairing it. It has to be paired again before it can connect.
- `address` (required): The device's `address` from the `bluetooth` module's `devices`.
### `system_bridge_bluetooth_set_power`
Turn Bluetooth on or off.
- `powered` (required): `true` to turn it on, `false` to turn it off.
### `system_bridge_camera_capture`
Take a picture with a webcam, returned as an image and as its base64 JPEG. Needs the `cameras.capture` setting on. See [camera capture](/api/websocket/control/#camera-capture). Linux only.
- `id` (required): The camera's `id` from the `cameras` module.
- `width` and `height`: One of the camera's `sizes` to take it at, instead of its current size.
### `system_bridge_camera_control`
Set one of a webcam's controls, such as its brightness or zoom. See [camera control](/api/websocket/control/#camera-control). Linux only.
- `id` (required): The camera's `id` from the `cameras` module.
- `control` (required): The control's `id` from that camera's `controls`.
- `value` (required): A whole number within the control's range. A boolean's is `0` or `1`, and a menu's is one of its options' `value`.
### `system_bridge_desktop_close_window`
Ask a window to close, as its close button does. See [desktop control](/api/websocket/control/#desktop-control).
- `id` (required): The window's `id` from the `desktop` module's `windows`.
### `system_bridge_desktop_focus_window`
Focus a window, switching to its workspace.
- `id` (required): The window's `id` from the `desktop` module's `windows`.
### `system_bridge_desktop_focus_workspace`
Show and focus a workspace. Not available on Windows.
- `id` (required): The workspace's `id` from the `desktop` module's `workspaces`.
### `system_bridge_desktop_set_keyboard_layout`
Switch the keyboard to one of its layouts. Not available on Wayland desktops other than Hyprland.
- `layout` (required): One of the `desktop` module's `keyboard.layouts`.
### `system_bridge_desktop_set_window_state`
Make a window fullscreen, maximised or minimised, or not. Set any of them together.
- `id` (required): The window's `id` from the `desktop` module's `windows`.
- `fullscreen` (optional): `true` or `false`. Not available on Windows.
- `maximised` (optional): `true` or `false`.
- `minimised` (optional): `true` or `false`. Not available on Hyprland.
Example arguments:
```json
{ "id": "0x555dbf21c9e0", "fullscreen": true }
```
### `system_bridge_discord_control`
Control Discord, which must be [set up](/features/discord/) first. It takes the same actions and fields as [Discord control](/api/websocket/control/#discord-control).
- `action` (required): What to do, such as `JOIN_VOICE_CHANNEL`, `TOGGLE_MUTE` or `PLAY_SOUND`.
- `channel_id`, `user_id`, `sound_id`, `device_id`, `mode` and `value` (optional): What the action needs, with ids from the `discord` module.
Example arguments:
```json
{ "action": "TOGGLE_MUTE" }
```
### `system_bridge_display_control`
Set a display's brightness or power state. See [display control](/api/websocket/control/#display-control) for what each display supports.
- `id` (required): The display's `id` from the `displays` module.
- `brightness` (optional): Brightness in percent, 0-100.
- `power_state` (optional): `on`, `standby`, `suspend` or `off`.
Example arguments:
```json
{ "id": "HDMI-A-2", "brightness": 40 }
```
### `system_bridge_get_clipboard`
Read the text on the clipboard. It takes no arguments. Works on Linux, with wl-clipboard, xclip or xsel, on Windows and on macOS. See [clipboard](/api/websocket/input/#clipboard).
### `system_bridge_get_data`
Get current system information from one or more data modules. The tool returns each requested module's latest data as JSON.
- `modules` (required): An array of module names to fetch.
Available modules:
| Module | Description |
| --- | --- |
| `audio` | Output and input devices, their volume, mute state and which are the defaults. |
| `battery` | Charge level, charging state, and time remaining. |
| `bluetooth` | Paired Bluetooth devices and whether they're connected. |
| `cameras` | Webcams and their settings, such as brightness, zoom and focus. Linux only. |
| `cpu` | Usage, frequency, core counts, and per-core load. |
| `desktop` | Open windows, workspaces, the keyboard layout, on Hyprland its displays, input devices, binds and global shortcuts, and the Omarchy shell's menus and panels. |
| `disks` | Mounted devices, partitions, and used/free space. |
| `displays` | Connected displays, resolution, refresh rate, brightness and power state. |
| `gpus` | GPU model, load, memory, and temperature. |
| `media` | Currently playing media: title, artist, and playback state. |
| `memory` | Physical and virtual memory usage. |
| `networks` | Network interfaces, addresses, and throughput. |
| `processes` | Running processes with CPU and memory usage. |
| `sensors` | Hardware sensors such as temperatures and fan speeds. |
| `system` | Hostname, OS, uptime, users, and version details. |
Example arguments:
```json
{ "modules": ["cpu", "memory", "battery"] }
```
### `system_bridge_get_history`
Get the recent readings System Bridge keeps for its charts, the same as the [`GET_HISTORY`](/api/websocket/data/#getting-history) event. Each series is a list of `{ "time", "value" }` samples, with `time` in Unix milliseconds.
- `since` (optional): Only readings after this time, in Unix milliseconds. Omit it for the whole history.
- `modules` (optional): Only these modules' readings: `battery`, `cpu`, `disks`, `gpus`, `memory`, `networks`, `sensors` or `system`. Omit it for every module.
Example arguments:
```json
{ "since": 1792857600000, "modules": ["cpu", "memory"] }
```
### `system_bridge_hyprland_dispatch`
Run a dispatcher on the focused window on Hyprland, or another window after focusing it, as its bind would. See [Hyprland control](/api/websocket/control/#hyprland-control) for what each does.
- `dispatcher` (required): `center_window`, `cycle_next_window`, `cycle_previous_window`, `group_next`, `group_previous`, `lock_group`, `lock_groups`, `move_focus`, `swap_window`, `toggle_group`, `toggle_split`, `unlock_group` or `unlock_groups`.
- `direction` (optional): `down`, `left`, `right` or `up`. Needed for `move_focus` and `swap_window`.
- `id` (optional): The `id` of a window from the `desktop` module's `windows` to focus first.
### `system_bridge_hyprland_move_window`
Move a window to another workspace on Hyprland, leaving the focus where it is. See [Hyprland control](/api/websocket/control/#hyprland-control).
- `id` (required): The window's `id` from the `desktop` module's `windows`.
- `workspace` (required): The workspace to move it to.
### `system_bridge_hyprland_move_workspace`
Move a workspace to another display on Hyprland.
- `id` (required): The workspace's `id` from the `desktop` module's `workspaces`.
- `display` (required): The display's `id` from the `displays` module.
### `system_bridge_hyprland_reload_config`
Reload Hyprland's config. It takes no arguments.
### `system_bridge_hyprland_rename_workspace`
Rename a workspace on Hyprland.
- `id` (required): The workspace's `id` from the `desktop` module's `workspaces`.
- `name` (optional): The new name. Leave it out to give the workspace back its default name.
### `system_bridge_hyprland_run_global_shortcut`
Trigger a global shortcut an app registered with Hyprland, such as one that opens a panel.
- `name` (required): A `name` from the `desktop` module's `hyprland.global_shortcuts`.
### `system_bridge_hyprland_set_option`
Set any Hyprland config option, such as turning animations off, until the config reloads. Read its type first with `system_bridge_hyprland_get_option`. See [options](/api/websocket/control/#options) for the values each type takes.
- `name` (required): The option, such as `animations.enabled` or `general:layout`.
- `value` (required): `true` or `false`, a number, text, or two numbers as `[5, 10]`, by the option's type. The options in the `desktop` module's `hyprland.options` only take a number of 0 or more.
### `system_bridge_hyprland_get_option`
Read any Hyprland config option: its type, its value, and whether the config sets it rather than leaving the default.
- `name` (required): The option, such as `general.col.active_border` or `general:layout`.
### `system_bridge_hyprland_get_cursor_position`
Get where the pointer is on Hyprland, in pixels across every display. It takes no arguments.
### `system_bridge_hyprland_move_cursor`
Move the pointer on Hyprland.
- `x` and `y` (required): Where to put it, in pixels across every display.
### `system_bridge_hyprland_get_log`
Get the end of Hyprland's log, oldest line first. It takes no arguments.
### `system_bridge_hyprland_send_event`
Send a custom Hyprland event, as a bind to the event dispatcher would. Listeners get it as a [Hyprland event](/api/websocket/data/#hyprland-events).
- `name` (required): The event's text.
### `system_bridge_hyprland_exec`
Run a command through Hyprland, in its environment. Needs the `desktop.hyprlandCode` setting on. See [running code](/api/websocket/control/#running-code).
- `command` (required): The command line, such as `kitty --class scratch`.
### `system_bridge_hyprland_dispatch_raw`
Run any Hyprland dispatch, written as the running config takes it: Lua when the `desktop` module's `hyprland.version.config_provider` is `lua`, otherwise classic. Needs the `desktop.hyprlandCode` setting on.
- `dispatch` (required): The dispatch, such as `hl.dsp.focus({ workspace = "2" })` or `workspace 2`.
### `system_bridge_hyprland_eval`
Run one line of Lua in Hyprland, with a Lua config. Hyprland only replies whether it ran. Needs the `desktop.hyprlandCode` setting on.
- `code` (required): The Lua.
### `system_bridge_hyprland_set_submap`
Switch Hyprland's binds to a submap, such as a resize mode, or back to the default.
- `name` (optional): A submap one of the `desktop` module's `hyprland.binds` is in. Leave it out for the default.
### `system_bridge_hyprland_set_window`
Float or tile a window on Hyprland, pin or unpin it, and move or resize it. Pinning a tiled window floats it first.
- `id` (required): The window's `id` from the `desktop` module's `windows`.
- `floating` (optional): `true` to float the window, `false` to tile it.
- `pinned` (optional): `true` to show it on every workspace, `false` to unpin it.
- `x` and `y` (optional, together): Where to put the window's top-left corner, in pixels across every display.
- `width` and `height` (optional, together): The window's size in pixels.
### `system_bridge_hyprland_kill_window`
Kill a window's app on Hyprland without asking it to close, so anything unsaved is lost. `system_bridge_desktop_close_window` asks it to close instead.
- `id` (required): The window's `id` from the `desktop` module's `windows`.
### `system_bridge_input_status`
Check whether System Bridge can press keys and move the pointer, and which backend it uses: `wayland`, `libei`, `x11` or `robotgo`, or why it can't. It takes no arguments. On GNOME and KDE the first check asks the person at the computer to allow remote control. See [input status](/api/websocket/input/#input-status).
### `system_bridge_keyboard_keypress`
Press a key in whichever window has focus. See [keyboard keypress](/api/websocket/input/#keyboard-keypress).
- `key` (required): The key to press, such as `a`, `enter` or `space`.
- `modifiers` (optional): Keys to hold while pressing it: `shift`, `ctrl`, `alt` or `cmd`.
- `delay` (optional): Milliseconds to wait first.
### `system_bridge_keyboard_text`
Type text in whichever window has focus. See [keyboard text](/api/websocket/input/#keyboard-text).
- `text` (required): The text to type.
- `delay` (optional): Milliseconds to wait first.
### `system_bridge_kill_process`
End a process. See [process control](/api/websocket/control/#process-control).
- `id` (required): The process's `id` from the `processes` module.
- `force` (optional): `true` to end it straight away rather than asking it to stop, losing anything unsaved.
### `system_bridge_list_command_prefabs`
List the [prefab commands](/features/commands/#prefab-commands), with whether each can run on this system, what it would run, and why not. It takes no arguments. A prefab only runs once it's added to your commands, such as with `system_bridge_add_command`.
### `system_bridge_list_commands`
List the [commands](/features/commands/) you've allowed System Bridge to run, with each one's `id`, `name`, `command`, `arguments`, `workingDir` and `prefab`. It takes no arguments.
### `system_bridge_list_files`
List the files and folders in a media directory. See [list files](/api/websocket/system/#list-files).
- `base` (required): The directory's `key` from `system_bridge_list_media_directories`, such as `downloads`.
- `path` (optional): A subfolder of the directory, such as `photos/2026`.
It returns `{ "files": [...] }`, each with its `name`, `path`, `size`, `isDirectory`, `modTime`, `permissions`, and its `contentType` and `extension` when it has them.
### `system_bridge_list_media_directories`
List the directories files can be listed from: your own folders, such as `downloads` and `pictures`, and those added in the media settings. It takes no arguments and returns `{ "directories": [...] }`, each with its `key` and `path`.
### `system_bridge_lock`
Lock the screen. It takes no arguments.
### `system_bridge_media_control`
Control playback of the system's current media session, or another player.
- `action` (required): The action to perform. Must be uppercase.
- `player`: A player's `id` from the `media` module's `players`. Leave it out for the player the module reports.
- `position`: Seconds from the start of the track, for `SEEK`.
- `volume`: 0-1, for `SET_VOLUME`.
- `shuffle`: `true` or `false`, for `SET_SHUFFLE`.
- `repeat`: `NONE`, `TRACK` or `LIST`, for `SET_REPEAT`.
Available actions:
| Action | Effect |
| --- | --- |
| `MUTE` | Toggle mute. |
| `NEXT` | Skip to the next track. |
| `PAUSE` | Pause playback. |
| `PLAY` | Resume playback. |
| `PREVIOUS` | Return to the previous track. |
| `STOP` | Stop playback. |
| `VOLUME_DOWN` | Lower the volume. |
| `VOLUME_UP` | Raise the volume. |
| `SEEK` | Move to `position`. |
| `SET_VOLUME` | Set the player's volume to `volume`. |
| `SET_SHUFFLE` | Turn shuffle on or off. |
| `SET_REPEAT` | Set what repeats. |
On Windows, only the actions up to `VOLUME_UP` work, and not with `player`.
Example arguments:
```json
{ "action": "PAUSE" }
```
```json
{ "action": "SEEK", "player": "vlc", "position": 90 }
```
### `system_bridge_mouse_button`
Hold a mouse button down or release it, such as to drag with `system_bridge_mouse_move` in between. Always release a button you held. See [hold and release](/api/websocket/input/#hold-and-release).
- `action` (required): `down` or `up`.
- `button` (optional): `left`, `right` or `middle`. Defaults to `left`.
### `system_bridge_mouse_click`
Click a mouse button where the pointer is. See [click](/api/websocket/input/#click).
- `button` (optional): `left`, `right` or `middle`. Defaults to `left`.
- `double` (optional): `true` to double-click.
### `system_bridge_mouse_move`
Move the pointer by an amount from where it is. See [move](/api/websocket/input/#move).
- `x` (optional): Pixels to move right, or left when negative, up to 2000.
- `y` (optional): Pixels to move down, or up when negative, up to 2000.
### `system_bridge_mouse_scroll`
Scroll where the pointer is, by mouse wheel notches. See [scroll](/api/websocket/input/#scroll).
- `x` (optional): Notches to scroll right, or left when negative, up to 50.
- `y` (optional): Notches to scroll up, or down when negative, up to 50.
### `system_bridge_omarchy_menu`
Open, close or toggle the Omarchy menu at one of its routes, while the Omarchy shell runs. See [Omarchy control](/api/websocket/control/#omarchy-control).
- `action` (required): `open`, `close` or `toggle`.
- `id` (optional): A menu `id` or one of its `aliases` from the `desktop` module's `omarchy.menus`, such as `root`. Not needed to close the menu.
### `system_bridge_omarchy_panel`
Open, close or toggle a panel or overlay of an Omarchy shell plugin.
- `action` (required): `open`, `close` or `toggle`.
- `id` (required): A panel `id` from the `desktop` module's `omarchy.panels`, such as `omarchy.audio`.
### `system_bridge_open`
Open a URL in the default browser, or a file or folder with its default app. See [open a path](/api/websocket/control/#open-a-path).
- `url` (optional): A URL to open.
- `path` (optional): A file or folder to open.
Give one of them.
### `system_bridge_remove_command`
Take a command off the allowlist through [`COMMAND_REMOVE`](/api/websocket/system/), as removing one in the web client does. Clients can't run it from then on. An `id` that isn't on the allowlist is an error.
- `id` (required): The command's `id` from `system_bridge_list_commands`.
### `system_bridge_run_command`
Run a command from the allowlist and wait for it to finish. It returns the command's `exitCode`, `stdout` and `stderr`, and `error` when it couldn't run or timed out. Commands time out after 5 minutes.
- `id` (required): The command's `id` from `system_bridge_list_commands`.
Example arguments:
```json
{ "id": "backup" }
```
Only commands in the allowlist can run. Power actions such as shutdown and restart aren't available as tools, so an assistant can't trigger them by mistake. Locking is, with `system_bridge_lock`, as it loses nothing.
### `system_bridge_send_notification`
Send a desktop notification to the machine running System Bridge.
- `title` (required): The notification title.
- `message` (required): The notification body text.
- `icon` (optional): An icon name to display with the notification.
- `urgency` (optional): `low`, `normal` or `critical`. Critical notifications stay until dismissed. Linux only.
Example arguments:
```json
{ "title": "Build finished", "message": "All tests passed", "icon": "dialog-information" }
```
### `system_bridge_set_clipboard`
Put text on the clipboard, ready to paste. Linux only, with wl-clipboard, xclip or xsel. See [clipboard](/api/websocket/input/#clipboard).
- `text` (required): The text to put on the clipboard.
### `system_bridge_set_power_profile`
Switch the power profile. Linux with power-profiles-daemon or tuned-ppd only. See [system control](/api/websocket/control/#system-control).
- `profile` (required): One of the `system` module's `power_profiles`, such as `power-saver`, `balanced` or `performance`.
### `system_bridge_set_keep_awake`
Keep the system from idling, so it doesn't lock, blank the screen or sleep for being left alone, or let it idle again. On Omarchy this is the bar's stay awake switch. Linux only.
- `enabled` (required): `true` to keep it awake, `false` to let it idle.
- `duration` (optional): Seconds until it may idle again.
### `system_bridge_update_command`
Change a command on the allowlist through [`COMMAND_UPDATE`](/api/websocket/system/), as editing one in the web client does. Only the fields given change; the rest keep their saved values. The command keeps its `id`, so clients using it carry on working. It returns `{ "command": { ... } }`, the saved command.
- `id` (required): The command's `id` from `system_bridge_list_commands`.
- `name`, `command`, `arguments`, `workingDir`, `prefab` (optional): The new values. An empty `command` goes back to the prefab's program, and an empty `workingDir` to the default.
## Troubleshooting
### Connection refused
- Confirm System Bridge is running. See [Running](/running/).
- Check the port (default `9170`) and `SYSTEM_BRIDGE_PORT` if you changed it.
- Verify the host in your config matches the machine running the backend.
- Confirm the client uses Streamable HTTP unless it explicitly needs the legacy WebSocket transport.
### Unauthorized (`401`)
- The key is missing, wrong or has been removed. Check it's listed under **Settings > Devices**, or make a new one with `system-bridge client key create`.
- Send the key as an `Authorization: Bearer {key}` header, or in the URL as `?key=`. The old API token goes in `?token=` instead.
### Tool execution fails
- Check backend logs for the underlying error.
- For `system_bridge_get_data`, use valid module names (see the table above).
- For `system_bridge_media_control`, actions must be uppercase (`PLAY`, `PAUSE`, and so on).
- For `system_bridge_run_command`, the `id` must be in the allowlist. Get the ids from `system_bridge_list_commands`.
---
# Media file data
Source: https://system-bridge.timmo.dev/api/media-file-data
Download a media file from the machine running System Bridge. The file is returned as-is, so an image request returns the image bytes, an audio request returns the audio, and so on.
## Authentication
Media file URLs hold no key. Ask System Bridge to sign one for a file, and the URL can be handed to another device, such as a cast speaker, without sharing your key. A signed URL only reads the one file it was made for, until it expires. A missing, invalid or expired signature returns `401 Unauthorized`.
### Get a signed URL
Needs a [key](/api/#authentication), as `Authorization: Bearer`.
```http
POST /api/media/file/url
Authorization: Bearer {key}
Content-Type: application/json
{ "base": "music", "path": "albums/song.mp3", "expiresIn": 3600 }
```
```json title="Response"
{
"url": "/api/media/file/data?base=music&expires=1794771735&path=albums%2Fsong.mp3&sig=…",
"expires": 1794771735
}
```
`expiresIn` is in seconds, and 24 hours at most, which is also what you get without it. `url` is relative to System Bridge's address. URLs are signed with a secret made each time System Bridge starts, so they stop working when it restarts too. The Python connector's `HTTPClient.media_file_url()` asks for one for you.
## Request
```http
GET /api/media/file/data?base={base}&path={path}&expires={expires}&sig={sig}
```
- `base`: the base directory to serve from (see below).
- `path`: the path to the file, relative to `base`.
- `expires`: when the URL stops working, in Unix seconds.
- `sig`: the signature.
All four parameters are required.
### Deprecated: the API token
Until the shared API token is removed in a later release, two older ways still work. A URL signed by the client with the token, as the HMAC-SHA256 of `base`, `path` and `expires` joined by newlines, keyed with the token. And the token itself as `token`, in place of `expires` and `sig`, which puts it in the URL, where it can end up on other devices and in their logs. System Bridge logs a warning the first time that's used.
### Base directories
`base` is one of the built-in keys:
- `documents`
- `downloads`
- `home`
- `music`
- `pictures`
- `videos`
You can also use any of your XDG user directories, or a custom directory configured in `media.directories` in your [settings](/api/websocket/system/#settings), by its name.
## Constraints
The endpoint only serves regular files that meet these limits:
- **File type**: the extension must be one of the allowed media types. Images (`jpg`, `jpeg`, `png`, `gif`, `bmp`, `webp`), audio (`mp3`, `wav`, `flac`, `aac`, `ogg`, `m4a`), video (`mp4`, `avi`, `mkv`, `mov`, `wmv`, `webm`), and documents (`txt`, `pdf`, `doc`, `docx`, `xls`, `xlsx`).
- **Size**: files larger than 100 MB are rejected.
- **Path safety**: `path` is resolved inside `base`. Attempts to escape the base directory (for example with `..`) are rejected.
## Response
On success, the file is streamed back with its `Content-Type`, `Content-Length`, and an inline `Content-Disposition` header.
### Errors
Errors return a JSON body of the form `{ "error": "..." }` with one of these status codes:
| Status | Meaning |
| --- | --- |
| `400 Bad Request` | Missing `base` or `path`, an invalid base directory, or the path is not a regular file. |
| `401 Unauthorized` | The signature is missing, invalid or expired, or the deprecated token is wrong. |
| `403 Forbidden` | The path escapes the base directory, or the file type is not allowed. |
| `404 Not Found` | The file does not exist. |
| `413 Payload Too Large` | The file is larger than 100 MB. |
| `405 Method Not Allowed` | The request was not a `GET`. |
---
# Pairing
Source: https://system-bridge.timmo.dev/api/pairing
Pairing connects a phone without typing an address or a key. A client that already has a key, such as the web client, makes a one-time code and shows its link as a QR code. The phone scans it and trades the code for a [key](/api/#authentication) of its own.
Each phone gets its own key, listed under **Settings > Devices** in the web client. A browser pairs the same way: a pairing link opened in one, or the web client opened by System Bridge itself, carries a code in `pair` that the page trades for that browser's own key. Another computer's [CLI](/using/cli/#remote-computers) pairs with the link too, with `platform` `cli`. To stop a phone connecting, remove its key there. Pairing the same phone again replaces its key rather than adding another.
## Make a code
Needs a key, as `Authorization: Bearer`.
```http
POST /api/pair/code
Authorization: Bearer {key}
```
```json title="Response"
{
"code": "MZXW6YTBOI4DQNZXGQ2DGMBQGE3TSNBR",
"link": "http://desk.local:9170/?ip=192.168.1.5&pair=MZXW6YTBOI4DQNZXGQ2DGMBQGE3TSNBR",
"expiresAt": "2026-11-08T18:31:54Z"
}
```
The code works once, for 5 minutes. When the request came to a name, such as `desk.lan`, `link` keeps it. When it came to an address, or `localhost`, `link` uses this computer's mDNS name, such as `desk.local`, which still finds it when its address changes. The address rides along in `ip`, or for `localhost` this computer's IPv4 address on the default route, for a phone that can't resolve the name. The Android app tries the name first, then `ip`, and keeps whichever answers.
## Trade a code for a key
Takes no key, as the code is the credential.
```http
POST /api/pair
Content-Type: application/json
{
"code": "MZXW6YTBOI4DQNZXGQ2DGMBQGE3TSNBR",
"client": { "id": "4c1f…", "name": "Pixel 9", "platform": "android" }
}
```
```json title="Response"
{
"token": "system-bridge_client_…",
"service": { "id": "460a64ce-6fcd-4f32-b7a5-a6f0d3546c87", "name": "desk" }
}
```
`token` is the phone's own key, shown this once. The phone keeps `client.id`, so pairing again replaces its key. `service.id` is the same `uuid` System Bridge advertises over mDNS, so a computer found that way matches the one paired. `service.name` is its hostname.
An unknown, used or expired code gets `401`. Codes are 160 random bits, so they can't practically be guessed.
---
# Push
Source: https://system-bridge.timmo.dev/api/push
System Bridge pushes to phones and browsers while their app is closed, with Web Push and VAPID. The Android app subscribes through UnifiedPush, and the web client, installed as an app, through the browser's push service. Both use the same routes.
Every route needs a [key](/api/#authentication), as `Authorization: Bearer`.
## What gets pushed
| Kind | When |
| --- | --- |
| `notifications` | System Bridge shows a notification, such as one sent with [`NOTIFICATION`](/api/websocket/control#send-notification). |
| `updates` | A new System Bridge release is out. Checked every 6 hours, and pushed once for each release. Development builds never push this. |
Each push carries its `kind`, which the Android app files it under. A notification's push also carries its `notification` id and its buttons as `actions`, each with an `id` and `label`, which the Android app shows and presses with [`NOTIFICATION_PRESS`](/api/websocket/control#press-a-notification-button). When the notification is closed on the computer, by hand or with [`NOTIFICATION_DISMISS`](/api/websocket/control#dismiss-notification), but not when it times out, Android clients are sent `{ "dismiss": "notification-47" }`, with no title, to clear it.
A new subscription gets `updates` only; turn on `notifications` with the [preferences](#choose-what-a-client-gets). Each push's `link` opens a page of the web client, on the address the subscription was made from.
## Get the VAPID key
```http
GET /api/push/vapid-key
```
```json title="Response"
{ "publicKey": "BNc…" }
```
Pass `publicKey` as `applicationServerKey` to `pushManager.subscribe`. System Bridge makes the key pair the first time it starts, and keeps it with the subscriptions in `push.json` in its [config directory](/running#file-locations).
## Subscribe
```http
POST /api/push/subscriptions
Content-Type: application/json
{
"endpoint": "https://push.example.com/…",
"keys": { "p256dh": "BOr…", "auth": "q3c…" },
"client": { "id": "4c1f…", "name": "Pixel 9", "platform": "android" }
}
```
`endpoint` and `keys` are what `PushSubscription.toJSON()` gives. `client.id` should stay the same for each install: subscribing again replaces that client's last subscription and keeps the kinds it chose. Answers `204`.
## Unsubscribe
```http
DELETE /api/push/subscriptions
Content-Type: application/json
{ "endpoint": "https://push.example.com/…" }
```
To remove another client, such as one in the [list](#list-subscriptions), which never shows endpoints, send `{ "clientId": "4c1f…" }` instead.
Answers `204`. A subscription whose push service answers `404` or `410` is dropped too.
## List subscriptions
```http
GET /api/push/subscriptions
```
```json title="Response"
[
{
"client": { "id": "4c1f…", "name": "Pixel 9", "platform": "android" },
"kinds": ["notifications", "updates"],
"created": "2026-11-08T18:20:00Z",
"endpointHost": "push.example.com"
}
]
```
The endpoint URLs and keys are never sent back.
## Choose what a client gets
```http
POST /api/push/preferences
Content-Type: application/json
{ "clientId": "4c1f…", "kinds": ["notifications"] }
```
Sets the kinds that client gets; an empty list turns them all off. Answers `204`, or `404` when that client has no subscription.
---
# Releases
Source: https://system-bridge.timmo.dev/api/releases
Get the newest stable System Bridge releases, with their release notes, marked against the version the computer runs. The web client's [What's new](/using/web-client#whats-new) page uses it.
Needs a [key](/api/#authentication), as `Authorization: Bearer`.
## Request
```http
GET /api/releases
Authorization: Bearer {key}
```
## Response
```json title="Response"
{
"version": "5.28.4",
"releases": [
{
"version": "5.28.5",
"name": "5.28.5",
"publishedAt": "2026-11-10T12:30:17Z",
"url": "https://github.com/timmo001/system-bridge/releases/tag/5.28.5",
"notes": "Lets a Home Assistant dashboard section show several sections…",
"newer": true,
"installed": false
}
],
"more": "https://github.com/timmo001/system-bridge/releases"
}
```
| Field | Description |
| --- | --- |
| `version` | The version the computer runs, as the `system` module reports it. |
| `releases` | Up to the 10 newest stable releases, newest first. Drafts and prereleases are left out. |
| `releases[].notes` | The release notes, in Markdown. |
| `releases[].newer` | Whether the release is newer than the computer's version. A development build counts the release it was built after as not newer. |
| `releases[].installed` | Whether the computer runs this release. Development builds never do. |
| `more` | The page listing every release. |
System Bridge gets the list from GitHub and keeps it for 6 hours. If GitHub can't be reached, it answers with the last list it had, or `502` without one. See [Privacy](/privacy#update-check).
---
# Status and health
Source: https://system-bridge.timmo.dev/api/status
These endpoints report whether the backend is running. Neither requires authentication.
## Status
```http
GET /api
```
Returns a JSON object confirming the API is running:
```json title="Response"
{
"status": "success",
"message": "API is running",
"data": {}
}
```
## Health
```http
GET /api/health
```
Returns the health status, current time and backend version:
```json title="Response"
{
"status": "healthy",
"timestamp": "2025-01-01T12:00:00Z",
"version": "5.0.0"
}
```
---
# WebSocket API
Source: https://system-bridge.timmo.dev/api/websocket
The WebSocket API gives you a single persistent connection to System Bridge for live data and control. Every feature uses the same message envelope, so once you understand the format below, each event page builds on it.
## Sections
- [Data](/api/websocket/data/): Request system data on demand or subscribe to live updates.
- [Input](/api/websocket/input/): Simulate keyboard input on the host.
- [Control](/api/websocket/control/): Control media, notifications, opening paths and URLs, and power state.
- [System](/api/websocket/system/): Browse files, read and update settings, run allowlisted commands, and exit the backend.
## Connecting
Connect to the WebSocket API at:
```http
GET /api/websocket
```
By default this is served on port `9170`, so the full URL is usually `ws://{host}:9170/api/websocket`.
## Signing in
A browser can't set headers on a WebSocket, so the first message signs the connection in with your client's [key](/api/#authentication):
```json title="First message"
{
"type": "auth",
"key": "system-bridge_client_..."
}
```
Nothing is sent back when the key is right. A wrong one is answered with a `BAD_KEY` error, and the connection is closed.
## Request format
Once signed in, every message you send uses the same envelope:
```json title="Request"
{
"id": "abc123",
"event": "EVENT_NAME",
"data": {}
}
```
- `id`: An identifier you choose. It is echoed back on the response so you can match requests to responses.
- `event`: The event to trigger (for example `GET_DATA`).
- `data`: The payload for the event. Use `{}` when the event takes no data.
## Response format
Responses use a different envelope to requests:
```json title="Response"
{
"id": "abc123",
"type": "RESPONSE_TYPE",
"subtype": "NONE",
"data": {},
"message": "Human-readable message",
"module": "system"
}
```
- `id`: The same `id` you sent on the request.
- `type`: The response type (for example `DATA_UPDATE`).
- `subtype`: Extra context. `NONE` on success, or an error code when `type` is `ERROR`.
- `data`: The response payload.
- `message`: A human-readable description.
- `module`: The data module the response relates to, when applicable.
## Errors
When a request fails, the response `type` is `ERROR` and `subtype` describes the cause:
```json title="Error response"
{
"id": "abc123",
"type": "ERROR",
"subtype": "BAD_REQUEST",
"data": {},
"message": "Invalid request"
}
```
Possible error subtypes include:
- `BAD_REQUEST`, `BAD_KEY`, `BAD_TOKEN`, `BAD_JSON`
- `BAD_DIRECTORY`, `BAD_FILE`, `BAD_PATH`
- `INVALID_ACTION`, `MISSING_ACTION`
- `LISTENER_ALREADY_REGISTERED`, `LISTENER_NOT_REGISTERED`
- `MISSING_BASE`, `MISSING_KEY`, `MISSING_MODULES`, `MISSING_PATH`, `MISSING_PATH_URL`
- `MISSING_SETTING`, `MISSING_TEXT`, `MISSING_TITLE`, `MISSING_TOKEN`, `MISSING_VALUE`
- `COMMAND_NOT_FOUND`, `UNKNOWN_EVENT`
---
# Control
Source: https://system-bridge.timmo.dev/api/websocket/control
Control playback, Discord, displays, windows and workspaces, send notifications, open files and URLs, and manage the system's power state and profile.
## Media control
Send the `MEDIA_CONTROL` event with an `action` to control media playback. It controls the player the [`media`](/api/data/#media) data describes, unless you set `player` to another player's `id` from its `players`.
Available actions:
- `PLAY`
- `PAUSE`
- `STOP`
- `NEXT`
- `PREVIOUS`
- `VOLUME_UP`, `VOLUME_DOWN`: change the player's volume by 5%.
- `MUTE`: set the player's volume to 0, or back to where it was when it's already muted.
- `SEEK`: set `position` to the seconds from the start of the track. Check `is_seek_enabled` first.
- `SET_VOLUME`: set `volume` to 0-1.
- `SET_SHUFFLE`: set `shuffle` to `true` or `false`.
- `SET_REPEAT`: set `repeat` to `NONE`, `TRACK` or `LIST`.
On Windows, only the actions up to `MUTE` work, and not with `player`. System Bridge presses the media keys there, so the actions reach whichever app responds to them.
```json title="Request"
{
"id": "abc123",
"event": "MEDIA_CONTROL",
"data": {
"action": "PAUSE"
}
}
```
```json title="Seek a particular player"
{
"id": "abc123",
"event": "MEDIA_CONTROL",
"data": {
"action": "SEEK",
"player": "vlc",
"position": 90
}
}
```
## Discord control
Send the `DISCORD_CONTROL` event with an `action` to join or leave voice channels, open a text channel, toggle your camera or screenshare, play a soundboard sound, or change your Discord voice settings. Discord must be [set up](/features/discord/) first.
Available actions:
- `JOIN_VOICE_CHANNEL`: set `channel_id` to a voice channel's ID. If you're already in a voice channel, this moves you.
- `LEAVE_VOICE_CHANNEL`
- `OPEN_TEXT_CHANNEL`: set `channel_id` to a text channel's ID to show it in Discord. Discord refuses forum channels.
- `MUTE`, `UNMUTE`, `TOGGLE_MUTE`
- `DEAFEN`, `UNDEAFEN`, `TOGGLE_DEAFEN`
- `SET_INPUT_VOLUME`: set `value` to 0-100.
- `SET_INPUT_DEVICE`: set `device_id` to a device `id` from `input.devices` in the [`discord`](/api/data/#discord) data.
- `SET_OUTPUT_VOLUME`: set `value` to 0-200.
- `SET_OUTPUT_DEVICE`: set `device_id` to a device `id` from `output.devices`.
- `SET_VOICE_MODE`: set `mode` to `VOICE_ACTIVITY` or `PUSH_TO_TALK`.
- `SET_VOICE_THRESHOLD`: set `value` to the voice activity sensitivity, -100 to 0 dB.
- `SET_PUSH_TO_TALK_DELAY`: set `value` to the push to talk release delay, 0-2000 milliseconds.
- `ENABLE_QOS`, `DISABLE_QOS`, `TOGGLE_QOS`
- `ENABLE_SILENCE_WARNING`, `DISABLE_SILENCE_WARNING`, `TOGGLE_SILENCE_WARNING`
- `MUTE_USER`, `UNMUTE_USER`, `TOGGLE_USER_MUTE`: set `user_id` to a user's ID. This mutes them for you only. `TOGGLE_USER_MUTE` needs the user to be in your call.
- `SET_USER_VOLUME`: set `user_id`, and set `value` to 0-200. This changes their volume for you only.
- `TOGGLE_VIDEO`: turn your camera on or off.
- `TOGGLE_SCREENSHARE`: start or stop sharing your screen. Starting opens Discord's source picker, so pick a screen or window to share.
- `PLAY_SOUND`: set `sound_id` to a sound `id` from `sounds` in the [`discord`](/api/data/#discord) data. You must be in a call. Discord may refuse a sound from a server other than the one you're in.
The volume values are the percentages that Discord's sliders show. In testing, Discord ignored changes to automatic sensitivity, noise suppression, echo cancellation and automatic gain control made over RPC, so those settings are only available as data.
```json title="Request"
{
"id": "abc123",
"event": "DISCORD_CONTROL",
"data": {
"action": "SET_INPUT_VOLUME",
"value": 80
}
}
```
The response type is `DISCORD_CONTROLLED`. If Discord is not connected, the response is an `ERROR`.
## Audio control
Send the `AUDIO_CONTROL` event to set an audio output's, input's or app's volume or mute state, to make an output or input the default, or to move an app to another output. Set any of them together. See [audio](/features/remote-control/#audio) for what's supported.
- `id` (required): An `id` from the [`audio`](/api/data/#audio) data's `outputs`, `inputs` or `apps`.
- `volume` (optional): Volume in percent, 0-100.
- `muted` (optional): `true` to mute, `false` to unmute.
- `default` (optional): `true` to make it the default output or input.
- `output` (optional): An output's `id`, to move an app's sound to it. Linux only.
```json title="Request"
{
"id": "abc123",
"event": "AUDIO_CONTROL",
"data": {
"id": "alsa_output.pci-0000_00_1f.3.analog-stereo",
"volume": 40,
"muted": false
}
}
```
The response type is `AUDIO_CONTROLLED`, and the audio module updates straight after. An unknown `id`, or something that doesn't apply to it, such as making an app the default, gets an `ERROR` with the subtype `BAD_REQUEST`. A platform that can't control audio gets `INVALID_ACTION`.
## Bluetooth control
Connect, disconnect or forget a paired device, and turn Bluetooth on or off. Addresses are the device `address`es from the [`bluetooth`](/api/data/#bluetooth) data. See [Bluetooth](/features/remote-control/#bluetooth) for what each platform supports.
| Event | Data | Response |
| --- | --- | --- |
| `BLUETOOTH_CONNECT` | `address` | `BLUETOOTH_CONNECTED` |
| `BLUETOOTH_DISCONNECT` | `address` | `BLUETOOTH_DISCONNECTED` |
| `BLUETOOTH_FORGET` | `address` | `BLUETOOTH_FORGOTTEN` |
| `BLUETOOTH_SET_POWER` | `powered`, `true` or `false` | `BLUETOOTH_POWER_SET` |
Forgetting a device unpairs it, so it has to be paired again before it can connect.
```json title="Request"
{
"id": "abc123",
"event": "BLUETOOTH_CONNECT",
"data": {
"address": "80:C3:BA:7B:93:4E"
}
}
```
The response comes once the device has connected, which can take up to 30 seconds, and the bluetooth module updates straight after. An unknown address gets an `ERROR` with the subtype `BAD_REQUEST`, and something the platform can't do gets `INVALID_ACTION`.
## Camera control
Send the `CAMERA_CONTROL` event to set one of a webcam's controls, such as its brightness, zoom or autofocus. It works while another app is using the camera. Linux only.
- `id` (required): The camera's `id` from the [`cameras`](/api/data/#cameras) data.
- `control` (required): The control's `id` from that camera's `controls`.
- `value` (required): A whole number within the control's `minimum` and `maximum`, in its `step`s. A boolean's is `0` or `1`, and a menu's is one of its `options`' `value`.
```json title="Request"
{
"id": "abc123",
"event": "CAMERA_CONTROL",
"data": {
"id": "usb-Insta360_Insta360_Link_2C-video-index0",
"control": "zoom_absolute",
"value": 200
}
}
```
The response type is `CAMERA_CONTROLLED`, and the cameras module updates straight after. An unknown camera or control, a read-only control or a value it can't take gets an `ERROR` with the subtype `BAD_REQUEST`. A control another one sets automatically, such as focus while autofocus is on, can't be set until that one is turned off.
## Camera capture
Send the `CAMERA_CAPTURE` event to take a picture with a webcam. Linux only, and needs ffmpeg.
- `id` (required): The camera's `id` from the [`cameras`](/api/data/#cameras) data.
- `width` and `height` (optional): One of the camera's `sizes` to take it at. Without them, it's taken at the camera's current size. While another app is streaming from the camera through PipeWire, it's taken at that app's size whatever these are.
```json title="Request"
{
"id": "abc123",
"event": "CAMERA_CAPTURE",
"data": {
"id": "usb-Insta360_Insta360_Link_2C-video-index0",
"width": 1920,
"height": 1080
}
}
```
The response type is `CAMERA_CAPTURED`, with the picture as a base64 JPEG:
```json title="Response"
{
"id": "abc123",
"type": "CAMERA_CAPTURED",
"subtype": "NONE",
"data": {
"id": "usb-Insta360_Insta360_Link_2C-video-index0",
"content_type": "image/jpeg",
"image": "/9j/4AAQSkZJRgABAQ..."
},
"message": "Picture taken"
}
```
A camera can see the room it's in, so this only works with the `cameras.capture` setting on. It's off by default, and otherwise gets an `ERROR` with the subtype `INVALID_ACTION`. Turn it on with [`UPDATE_SETTINGS`](/api/websocket/system/).
A camera nothing is using is started for the picture, at the size it's set to, and stopped again, which takes a second or two. While another app streams it through PipeWire, as browsers and most video call apps do, the picture is shared from that stream, which needs GStreamer's PipeWire plugin. An app with the camera open directly has it to itself, so that gets an `ERROR` naming the app. The cameras and [`system`](/api/data/#system) modules update after each picture, as starting the camera shows in `camera_usage`.
## System control
Change system settings. Linux only.
| Event | Data | Response |
| --- | --- | --- |
| `SYSTEM_SET_POWER_PROFILE` | `profile`, one of the [`system`](/api/data/#system) data's `power_profiles` | `SYSTEM_POWER_PROFILE_SET` |
| `SYSTEM_SET_KEEP_AWAKE` | `enabled`, `true` or `false`, and optionally `duration` in seconds | `SYSTEM_KEEP_AWAKE_SET` |
Switching the power profile needs power-profiles-daemon, or tuned-ppd on Fedora.
Keeping awake stops the system idling, so it doesn't lock, blank the screen or sleep for being left alone. With a `duration`, it lets the system idle again after that many seconds. On Omarchy it turns on the bar's stay awake switch. Elsewhere it holds a logind idle inhibitor, which most desktops and idle daemons, such as hypridle, follow, until it's turned off or System Bridge stops.
```json title="Request"
{
"id": "abc123",
"event": "SYSTEM_SET_POWER_PROFILE",
"data": {
"profile": "performance"
}
}
```
The system module updates straight after. A profile that isn't in `power_profiles` gets an `ERROR`.
## Desktop control
Focus, close and change windows, show a workspace, and switch the keyboard layout. Window and workspace IDs are the `id`s from the [`desktop`](/api/data/#desktop) data. See [desktop](/features/remote-control/#desktop) for what each desktop supports.
| Event | Data | Response |
| --- | --- | --- |
| `DESKTOP_CLOSE_WINDOW` | `id` | `DESKTOP_WINDOW_CLOSED` |
| `DESKTOP_FOCUS_WINDOW` | `id` | `DESKTOP_WINDOW_FOCUSED` |
| `DESKTOP_FOCUS_WORKSPACE` | `id` | `DESKTOP_WORKSPACE_FOCUSED` |
| `DESKTOP_SET_KEYBOARD_LAYOUT` | `layout`, one of the keyboard's `layouts` | `DESKTOP_KEYBOARD_LAYOUT_SET` |
| `DESKTOP_SET_WINDOW_STATE` | `id`, and any of `fullscreen`, `maximised` and `minimised` as `true` or `false` | `DESKTOP_WINDOW_STATE_SET` |
Closing a window asks it to close, as its close button does, so an app may ask to save first.
```json title="Request"
{
"id": "abc123",
"event": "DESKTOP_SET_WINDOW_STATE",
"data": {
"id": "0x555dbf21c9e0",
"fullscreen": true
}
}
```
The desktop module updates straight after. An unknown window, workspace or layout gets an `ERROR` with the subtype `BAD_REQUEST`, and something the desktop can't do gets `INVALID_ACTION`.
## Display control
Send the `DISPLAY_CONTROL` event to set a display's brightness, its power state, or both. See [displays](/features/remote-control/#displays) for what's supported.
- `id` (required): The display's `id` from the [`displays`](/api/data/#displays) data.
- `brightness` (optional): Brightness in percent, 0-100.
- `power_state` (optional): `on`, `standby`, `suspend` or `off`. External monitors only, except on Hyprland, which turns any display on or off.
```json title="Request"
{
"id": "abc123",
"event": "DISPLAY_CONTROL",
"data": {
"id": "HDMI-A-2",
"brightness": 40
}
}
```
The response type is `DISPLAY_CONTROLLED`, and the displays module updates straight after. A display that can't be controlled that way gets an `ERROR` with the subtype `INVALID_ACTION`.
## Hyprland control
On Hyprland, float, pin, move, resize and kill windows, rename workspaces and move them between displays, run dispatchers on the focused window, trigger global shortcuts, switch the submap, read and set any config option, read and move the cursor, read the log, send custom events, and reload the config. With the `desktop.hyprlandCode` setting on, run commands, any dispatch and Lua too. Anywhere else these get an `ERROR` with the subtype `INVALID_ACTION`.
| Event | Data | Response |
| --- | --- | --- |
| `HYPRLAND_DISPATCH` | `dispatcher`, a `direction` for `move_focus` and `swap_window`, and optionally the `id` of a window to run it on | `HYPRLAND_DISPATCHED` |
| `HYPRLAND_DISPATCH_RAW` | `dispatch`, written as the running config takes it | `HYPRLAND_RAW_DISPATCHED` |
| `HYPRLAND_EVAL` | `code`, one line of Lua | `HYPRLAND_EVALUATED` |
| `HYPRLAND_EXEC` | `command` | `HYPRLAND_EXECUTED` |
| `HYPRLAND_GET_CURSOR_POSITION` | None | `HYPRLAND_CURSOR_POSITION`, with `x` and `y` |
| `HYPRLAND_GET_LOG` | None | `HYPRLAND_LOG`, with `lines`, oldest first |
| `HYPRLAND_GET_OPTION` | `name`, any option | `HYPRLAND_OPTION`, with the option's value |
| `HYPRLAND_KILL_WINDOW` | `id` | `HYPRLAND_WINDOW_KILLED` |
| `HYPRLAND_MOVE_CURSOR` | `x` and `y`, in pixels across every display | `HYPRLAND_CURSOR_MOVED` |
| `HYPRLAND_MOVE_WINDOW` | `id`, and the `workspace` to move it to | `HYPRLAND_WINDOW_MOVED` |
| `HYPRLAND_MOVE_WORKSPACE` | `id`, a workspace `id`, and the `display` to move it to, from the [`displays`](/api/data/#displays) data | `HYPRLAND_WORKSPACE_MOVED` |
| `HYPRLAND_RELOAD_CONFIG` | None | `HYPRLAND_CONFIG_RELOADED` |
| `HYPRLAND_RENAME_WORKSPACE` | `id`, a workspace `id`, and its new `name`, or none for the default | `HYPRLAND_WORKSPACE_RENAMED` |
| `HYPRLAND_RUN_GLOBAL_SHORTCUT` | `name`, from the `global_shortcuts` in the [`desktop`](/api/data/#desktop) data's `hyprland` | `HYPRLAND_GLOBAL_SHORTCUT_RUN` |
| `HYPRLAND_SEND_EVENT` | `name`, the event's text | `HYPRLAND_EVENT_SENT` |
| `HYPRLAND_SET_OPTION` | `name`, any option, and its `value` | `HYPRLAND_OPTION_SET` |
| `HYPRLAND_SET_SUBMAP` | `name`, a submap the `binds` in the [`desktop`](/api/data/#desktop) data's `hyprland` are in, or none for the default | `HYPRLAND_SUBMAP_SET` |
| `HYPRLAND_SET_WINDOW` | `id`, and any of `floating` and `pinned` as `true` or `false`, `x` and `y`, and `width` and `height` | `HYPRLAND_WINDOW_SET` |
Moving a window leaves the focus where it is. Hyprland only pins floating windows, so pinning a tiled window floats it first, and tiling a pinned window unpins it. `x` and `y` place the window's top-left corner in pixels across every display, and `width` and `height` size it, each as a pair. Hyprland only places a floating window exactly, so float it in the same request. Killing a window ends its app without asking, unlike `DESKTOP_CLOSE_WINDOW`, so anything unsaved is lost. Only the global shortcuts apps have registered and the dispatchers below can run, unless the [`desktop.hyprlandCode`](#running-code) setting is on.
```json title="Request"
{
"id": "abc123",
"event": "HYPRLAND_RUN_GLOBAL_SHORTCUT",
"data": {
"name": "omarchy:panel.omarchy.clock"
}
}
```
### Dispatchers
The dispatchers act on the focused window, as their binds would. With an `id`, that window is focused first:
| Dispatcher | Effect |
| --- | --- |
| `center_window` | Center the window. Floating windows only. |
| `cycle_next_window` | Focus the next window on the workspace. |
| `cycle_previous_window` | Focus the previous window on the workspace. |
| `group_next` | Show the next window in the window's group. |
| `group_previous` | Show the previous window in the window's group. |
| `lock_group` | Lock the window's group, so windows can't be moved in or out. |
| `lock_groups` | Lock every group. |
| `move_focus` | Move the focus to the window in a `direction`. |
| `swap_window` | Swap the window with the one in a `direction`. |
| `toggle_group` | Turn the window into a group, or break up its group. |
| `toggle_split` | Switch the split the window is in between horizontal and vertical, in the dwindle layout. |
| `unlock_group` | Unlock the window's group. |
| `unlock_groups` | Unlock every group. |
The direction is `down`, `left`, `right` or `up`. When Hyprland refuses, such as centring a tiled window, you get an `ERROR` with its reason.
```json title="Request"
{
"id": "abc123",
"event": "HYPRLAND_DISPATCH",
"data": {
"dispatcher": "move_focus",
"direction": "left"
}
}
```
### Options
Option names take dots or colons, such as `general.col.active_border` or `general:layout`. An option Hyprland doesn't have gets an `ERROR` with the subtype `NOT_FOUND`. `HYPRLAND_OPTION` replies with its `name`, its `type`, `set` for whether the config sets it rather than leaving the default, and its value in the field for its type: `bool`, `int`, `float`, `vec2` as two numbers, or `string` for `string`, `css`, `gradient` and `custom` options.
```json title="Request"
{
"id": "abc123",
"event": "HYPRLAND_GET_OPTION",
"data": { "name": "general.col.active_border" }
}
```
```json title="Response"
{
"id": "abc123",
"type": "HYPRLAND_OPTION",
"subtype": "NONE",
"data": {
"name": "general.col.active_border",
"type": "gradient",
"set": true,
"bool": null,
"int": null,
"vec2": [],
"float": null,
"string": "66cccccc 0deg"
}
}
```
`HYPRLAND_SET_OPTION` reads the option's type first, then takes a `value` to match: `true` or `false` for `bool`, a whole number for `int`, any number for `float`, and text for `string`. A `vec2` takes two numbers, as `"5 10"` or `[5, 10]`, a `css` option up to four whole numbers, such as `"5 10"`, and a `gradient` colours and an optional angle, as `HYPRLAND_OPTION` reports them, such as `"ff33ccff 00ff99ee 45deg"`. A value set this way lasts until Hyprland's config reloads.
The [`desktop`](/api/data/#desktop) data's `hyprland.options` reports `animations.enabled`, `decoration.blur.enabled`, `decoration.dim_inactive`, `decoration.rounding`, `decoration.shadow.enabled`, `general.border_size`, `general.gaps_in`, `general.gaps_out`, `input.touchpad.natural_scroll` and `misc.vrr` as they change. Those only take a number of 0 or more.
```json title="Request"
{
"id": "abc123",
"event": "HYPRLAND_SET_OPTION",
"data": {
"name": "animations.enabled",
"value": false
}
}
```
### Running code
`HYPRLAND_EXEC`, `HYPRLAND_DISPATCH_RAW` and `HYPRLAND_EVAL` can do anything you can, so they only run with the `desktop.hyprlandCode` setting on. It's off by default, and otherwise they get an `ERROR` with the subtype `INVALID_ACTION`. Turn on **Run commands, dispatches and Lua through Hyprland** on the web client's **Desktop** page, or use [`UPDATE_SETTINGS`](/api/websocket/system/).
- `HYPRLAND_EXEC` runs a command in Hyprland's environment, as a bind to `exec` would.
- `HYPRLAND_DISPATCH_RAW` runs any dispatch, written as the running config takes it: Lua such as `hl.dsp.focus({ workspace = "2" })` when the `desktop` data's `hyprland.version.config_provider` is `lua`, otherwise classic such as `workspace 2`.
- `HYPRLAND_EVAL` runs one line of Lua, with a Lua config. Hyprland only replies whether it ran, not what it returned.
```json title="Request"
{
"id": "abc123",
"event": "HYPRLAND_EVAL",
"data": { "code": "hl.notification.create({ text = \"Hi\" })" }
}
```
## Omarchy control
While the Omarchy shell runs, open, close or toggle its menu and the panels of its plugins. Otherwise these get an `ERROR` with the subtype `INVALID_ACTION`.
| Event | Data | Response |
| --- | --- | --- |
| `OMARCHY_MENU` | `action`, and the `id` of a menu to open or toggle | `OMARCHY_MENU_CHANGED` |
| `OMARCHY_PANEL` | `action` and the `id` of a panel | `OMARCHY_PANEL_CHANGED` |
The action is `open`, `close` or `toggle`. The ids are in the [`desktop`](/api/data/#desktop) data's `omarchy`. A menu also opens by one of its `aliases`, so `capture` opens `trigger.capture`. An id the shell doesn't have gets an `ERROR` with the subtype `BAD_REQUEST`.
```json title="Request"
{
"id": "abc123",
"event": "OMARCHY_PANEL",
"data": {
"action": "toggle",
"id": "omarchy.audio"
}
}
```
## Send notification
Send the `NOTIFICATION` event to show a desktop notification. `title` and `message` are required; the rest are optional.
```json title="Request"
{
"id": "abc123",
"event": "NOTIFICATION",
"data": {
"title": "Hello",
"message": "World"
}
}
```
Available fields:
- `title` (required): The notification title.
- `message` (required): The notification body.
- `icon` (optional): The icon name.
- `duration` (optional): How long to show the notification, in milliseconds.
- `actionUrl` (optional): A URL to open when the notification is clicked.
- `actionPath` (optional): A file or folder path to open when the notification is clicked.
- `sound` (optional): Path to a sound file to play with the notification.
- `urgency` (optional): `low`, `normal` or `critical`. Critical notifications stay until they're dismissed. Linux only.
- `buttons` (optional): Up to 3 buttons, each with an `id` and a `label`. The `id` can be anything but `default`. Linux and Windows only.
The response type is `NOTIFICATION_SENT`, and its data is what was sent with the notification's `id` added. Use the `id` to dismiss it, and to match the events about it. It's `0` where the notification can't be followed, such as on Windows.
```json title="A notification with buttons"
{
"id": "abc123",
"event": "NOTIFICATION",
"data": {
"title": "Washing machine",
"message": "The wash has finished",
"urgency": "critical",
"buttons": [
{ "id": "snooze", "label": "Remind me in 10 minutes" },
{ "id": "done", "label": "Done" }
]
}
}
```
### Notification events
Every connected client is sent an event when a notification System Bridge sent is sent, clicked or closes, whichever client, or the CLI or MCP server, sent it. So a notification can be followed by its `id` from start to finish, even one sent by a client that gets no `id` back.
| Type | Data |
| --- | --- |
| `NOTIFICATION_SENT` | `id`, `title` and `message`, and `buttons` when it has any, each with its `id` and `label`, so a `NOTIFICATION_ACTION` can be matched to the button's label. The `id` is `0` where the notification can't be followed |
| `NOTIFICATION_ACTION` | `id`, and `action`: the button's `id`, or `default` when the notification itself was clicked. Linux and Windows only |
| `NOTIFICATION_CLOSED` | `id`, and `reason`: `expired`, `dismissed` (by you) or `closed` (with `NOTIFICATION_DISMISS`). Linux only |
These come with the `id` `system`, as they don't answer a request. That tells the sent event apart from the `NOTIFICATION_SENT` reply to your own `NOTIFICATION` request, which has your request's `id`. The sender gets both.
### Dismiss notification
Send the `NOTIFICATION_DISMISS` event with a notification's `id` to close it. The response type is `NOTIFICATION_DISMISSED`. Linux only, and only for notifications System Bridge sent.
```json title="Request"
{
"id": "abc123",
"event": "NOTIFICATION_DISMISS",
"data": {
"id": 47
}
}
```
### Press a notification button
Send the `NOTIFICATION_PRESS` event with a notification's `id` and a button's `action` to press it from somewhere else, as the [Android app](/using/android/) does for a pushed notification. Every client gets the same `NOTIFICATION_ACTION` as pressing it on the computer, even once it has timed out there, and it closes if it's still open. The response type is `NOTIFICATION_PRESSED`. Linux only, and only for notifications System Bridge sent.
```json title="Request"
{
"id": "abc123",
"event": "NOTIFICATION_PRESS",
"data": {
"id": 47,
"action": "unlock"
}
}
```
## Open a path
Send the `OPEN` event with a `path` to open a file or folder with the default application.
```json title="Request"
{
"id": "abc123",
"event": "OPEN",
"data": {
"path": "C:\\users\\user\\Downloads\\example.txt"
}
}
```
## Open a URL
Send the `OPEN` event with a `url` to open it in the default browser.
```json title="Request"
{
"id": "abc123",
"event": "OPEN",
"data": {
"url": "https://timmo.dev"
}
}
```
## Process control
Send the `PROCESS_KILL` event to end a process. It's asked to stop, as closing it would, unless you `force` it.
- `id` (required): The process's `id` from the [`processes`](/api/data/#processes) data.
- `force` (optional): `true` to end it straight away, losing anything unsaved.
```json title="Request"
{
"id": "abc123",
"event": "PROCESS_KILL",
"data": {
"id": 12345
}
}
```
The response type is `PROCESS_KILLED`, and the processes module updates straight after. A process that doesn't exist, or System Bridge itself, gets an `ERROR` with the subtype `BAD_REQUEST`, and one the backend's user isn't allowed to end gets an `ERROR` with the system's reason.
## Power control
Control the system power state with one of the following events. Each takes empty `data`.
- `POWER_HIBERNATE`
- `POWER_LOCK`
- `POWER_LOGOUT`
- `POWER_RESTART`
- `POWER_SHUTDOWN`
- `POWER_SLEEP`
```json title="Request"
{
"id": "abc123",
"event": "POWER_SLEEP",
"data": {}
}
```
### Power state changes
Every connected client gets a `POWER_STATE_CHANGED` message with the `id` `system` just before the system sleeps or shuts down, and again when it wakes, whatever started it. `data.state` is one of:
| State | When |
| --- | --- |
| `sleeping` | Before sleep or hibernate |
| `shutting_down` | Before power off or restart. Linux only; elsewhere the connection just closes |
| `resumed` | After waking |
```json title="Response"
{
"id": "system",
"type": "POWER_STATE_CHANGED",
"subtype": "NONE",
"data": {
"state": "sleeping"
}
}
```
On waking, System Bridge also announces itself over mDNS again, so clients that discover it, such as Home Assistant, hear it's back.
The TypeScript connector has them as the `powerStateChanges` stream, and the Python connector passes them to `listen()`'s `power_state_callback`.
---
# Data
Source: https://system-bridge.timmo.dev/api/websocket/data
Request system data on demand, subscribe to live updates, and handle the messages the backend sends back.
## Requesting data
To request data, send a message with the `GET_DATA` event listing each module to receive data from.
```json title="Request"
{
"id": "abc123",
"event": "GET_DATA",
"data": {
"modules": ["system"]
}
}
```
## Registering as a listener
To receive data whenever it changes, send the `REGISTER_DATA_LISTENER` event with each module you want to subscribe to.
```json title="Request"
{
"id": "abc123",
"event": "REGISTER_DATA_LISTENER",
"data": { "modules": ["cpu", "memory", "system"] }
}
```
The backend replies with a `DATA_LISTENER_REGISTERED` response, then sends a [`DATA_UPDATE`](#receiving-data) message whenever a subscribed module changes.
Most modules refresh once a minute. These also update as soon as something changes on the system:
| Module | Updates when | Platforms |
| --- | --- | --- |
| `audio` | An output or input's volume, mute or default changes | Linux, Windows |
| `battery` | The charger is plugged in or removed, or a battery's charge or state changes | Linux, Windows |
| `bluetooth` | A device is paired, removed, connected, disconnected or renamed | Linux, Windows |
| `cameras` | A camera is connected or removed | Linux |
| `discord` | Anything changes in Discord | All |
| `displays` | A display is connected or removed. On Linux, also when a built-in panel's brightness changes | Linux, Windows |
| `media` | The track or playback state changes | Linux |
| `networks` | An interface comes up or goes down, gains or loses an address, or joins or leaves a Wi-Fi network | Linux, Windows |
| `system` | The session is locked or unlocked, the user goes away (a minute without input) or comes back, or a systemd unit fails or recovers (Linux) | Linux, Windows |
Readings such as CPU, memory and network traffic are measurements, so they follow the refresh.
To stop receiving updates, send the `UNREGISTER_DATA_LISTENER` event. It takes no data and responds with the `DATA_LISTENER_UNREGISTERED` type.
```json title="Request"
{
"id": "abc123",
"event": "UNREGISTER_DATA_LISTENER",
"data": {}
}
```
## Receiving data
After a `GET_DATA` request or while registered as a listener, you receive messages with the `DATA_UPDATE` type.
This will look something like this:
```json title="Response"
{
"id": "abc123",
"type": "DATA_UPDATE",
"subtype": "NONE",
"data": {
"boot_time": 1651433957.3015134,
"fqdn": "Desktop",
"hostname": "Desktop",
"ip_address_4": "1.1.1.1",
"mac_address": "aa:bb:cc:dd:ee:ff",
"platform": "Windows",
"platform_version": "10.0.22000",
"uptime": 7.015625,
"uuid": "abcd-efgh-abcd-efgh-abcd",
"version": "5.0.2",
"version_latest": "5.0.7",
"version_newer_available": false
},
"message": "Data received",
"module": "system"
}
```
## Hyprland events
While registered as a listener for the `desktop` module on Hyprland, you also receive each custom event Hyprland sends. A bind sends one with Hyprland's event dispatcher, so a key can trigger an automation:
```lua title="hyprland.lua"
hl.bind("SUPER + F12", hl.dsp.event("dock"))
```
With a classic config, bind to `event, dock`, or send one from a script with `hyprctl dispatch event dock`. A client can send one with [`HYPRLAND_SEND_EVENT`](/api/websocket/control/#hyprland-control). Each arrives with the `HYPRLAND_EVENT` type, and `data` is what the bind passed:
```json title="Response"
{
"id": "system",
"type": "HYPRLAND_EVENT",
"subtype": "NONE",
"data": { "data": "dock" },
"module": "desktop"
}
```
The TypeScript connector has them as the `hyprlandEvents` stream, and the Python connector passes them to `listen()`'s `hyprland_event_callback`.
## Getting history
System Bridge keeps up to the last 24 hours of the graphed readings and keeps them through restarts. It records about one a minute of each:
- CPU usage, temperature, frequency, power and load average
- Memory, swap and battery
- System power
- Network and disk rates, and each disk's temperature
- Each GPU's core and memory load, temperature and power
- Each temperature sensor and fan speed
Readings a system doesn't report are left out.
Send the `GET_HISTORY` event to get them. With no data it returns everything it holds. Both of these are optional:
- `since`, in Unix milliseconds, returns only readings taken after that time, such as the newest one you already have.
- `modules` returns only those modules' readings: `cpu`, `memory`, `battery`, `system`, `networks`, `disks`, `gpus` or `sensors`. The other series come back as empty lists. Any other module is answered with a `BAD_REQUEST` error.
```json title="Request"
{
"id": "abc123",
"event": "GET_HISTORY",
"data": { "since": 1761300000000, "modules": ["cpu", "gpus"] }
}
```
It responds with the `HISTORY` type. Each series is a list of readings, oldest first, with `time` in Unix milliseconds. Usage and loads are percentages, temperatures are in °C, frequency is in MHz, power is in watts and fan speeds are in RPM. Network and disk values are rates in bytes per second. Disks are listed by name, and sensors and fans by their key.
```json title="Response"
{
"id": "abc123",
"type": "HISTORY",
"subtype": "NONE",
"data": {
"cpu": [
{ "time": 1761300060000, "value": 12.5 },
{ "time": 1761300120000, "value": 18.2 }
],
"cpu_temperature": [{ "time": 1761300060000, "value": 61 }],
"cpu_frequency": [{ "time": 1761300060000, "value": 4850 }],
"cpu_power": [{ "time": 1761300060000, "value": 65.2 }],
"load_average": [{ "time": 1761300060000, "value": 1.8 }],
"memory": [{ "time": 1761300060000, "value": 48.1 }],
"swap": [],
"battery": [],
"system_power": [],
"network_receive": [{ "time": 1761300060000, "value": 20480 }],
"network_send": [{ "time": 1761300060000, "value": 5120 }],
"disk_read": [],
"disk_write": [],
"disk_temperatures": [
{
"id": "nvme0n1",
"samples": [{ "time": 1761300060000, "value": 42 }]
}
],
"gpus": [
{
"id": "gpu0",
"core_load": [{ "time": 1761300060000, "value": 7 }],
"memory_load": [{ "time": 1761300060000, "value": 31.5 }],
"temperature": [{ "time": 1761300060000, "value": 48 }],
"power": [{ "time": 1761300060000, "value": 21.4 }]
}
],
"temperatures": [],
"fans": [
{
"id": "nct6799_fan2",
"samples": [{ "time": 1761300060000, "value": 1180 }]
}
]
},
"message": "Got history"
}
```
To save the history to a file, use [`system-bridge client history export`](/using/cli/#export-history) or the web client's Export menu, on the overview or a module's page. The TypeScript connector's `historyToCsv` and the Python connector's `MetricHistory.to_csv()` write the same CSV.
## Getting diagnostics
Send the `GET_DIAGNOSTICS` event, with no data, to see how the app is doing. It's meant for bug reports, so it holds no paths, names or command lines: settings are summarised as counts and switches, and errors have the home directory shown as `~` and the user name as ``.
```json title="Request"
{
"id": "abc123",
"event": "GET_DIAGNOSTICS"
}
```
It responds with the `DIAGNOSTICS` type:
- `started_at` and every `last_error_at` and `time` are in Unix seconds.
- `modules` lists each data module. `updated` is when it last succeeded, in RFC 3339, or `null` if it never has. `failures` counts the failed updates in a row and goes back to 0 on a success, while `last_error` stays until the next failure.
- `settings` is `null` when the settings can't be read.
- `recent_errors` holds up to the last 20 warnings and errors from the log, oldest first.
```json title="Response"
{
"id": "abc123",
"type": "DIAGNOSTICS",
"subtype": "NONE",
"data": {
"version": "5.24.0",
"platform": "linux",
"architecture": "amd64",
"started_at": 1761300000,
"log_level": "INFO",
"modules": [
{
"name": "cpu",
"has_data": true,
"updated": "2025-10-24T10:01:00Z",
"failures": 0,
"last_error": null,
"last_error_at": null
},
{
"name": "gpus",
"has_data": false,
"updated": null,
"failures": 3,
"last_error": "failed to get GPU info",
"last_error_at": 1761300060
}
],
"settings": {
"autostart": false,
"system_tray": true,
"hotkeys": 0,
"commands": 2,
"media_directories": 1,
"allowed_secondary_mount_points": 0,
"cameras_capture": false,
"desktop_window_titles": false,
"desktop_hyprland_code": false
},
"recent_errors": [
{
"time": 1761300060,
"level": "WARN",
"message": "Task processing error for module",
"error": "failed to get GPU info",
"module": "gpus",
"event": null
}
]
},
"message": "Got diagnostics"
}
```
The [`system-bridge client diagnostics`](/using/cli/#diagnostics) command prints the same, and the connectors have it as `getDiagnostics` in TypeScript and `get_diagnostics()` in Python.
---
# Input
Source: https://system-bridge.timmo.dev/api/websocket/input
Simulate keyboard and mouse input on the host machine, or read or put text on its clipboard. See [remote control](/features/remote-control/#how-input-reaches-the-desktop) for how input reaches each desktop.
## Input status
Send the `GET_INPUT_STATUS` event to check whether System Bridge can press keys and move the pointer, and how. It responds with the `INPUT_STATUS` type.
```json title="Request"
{
"id": "abc123",
"event": "GET_INPUT_STATUS"
}
```
```json title="Response"
{
"id": "abc123",
"type": "INPUT_STATUS",
"subtype": "NONE",
"data": {
"available": true,
"backend": "wayland",
"reason": null
},
"message": "Input status"
}
```
- `available`: Whether keys and the mouse can be sent.
- `backend`: How they're sent: `wayland`, `libei`, `x11` or `robotgo`. `null` when they can't be.
- `reason`: Why they can't be, or `null`.
On GNOME and KDE, the first check asks the person at the computer to allow remote control, so it can take a while to reply.
## Keyboard keypress
Send the `KEYBOARD_KEYPRESS` event with a `key` to press a single key. It responds with the `KEYBOARD_KEY_PRESSED` type.
```json title="Request"
{
"id": "abc123",
"event": "KEYBOARD_KEYPRESS",
"data": {
"key": "a",
"modifiers": ["ctrl", "shift"],
"delay": 100
}
}
```
Available fields:
- `key` (required): The key to press.
- `modifiers` (optional): Modifier keys to hold while pressing `key`. Recognised values are `shift`, `ctrl` (or `control`), `alt`, and `cmd` (or `command`). Unrecognised modifiers are ignored.
- `delay` (optional): Time to wait before pressing the key, in milliseconds.
For example, to send Ctrl+C, set `key` to `c` and `modifiers` to `["ctrl"]`.
## Keyboard text
Send the `KEYBOARD_TEXT` event with a `text` string to type text. It responds with the `KEYBOARD_TEXT_SENT` type.
```json title="Request"
{
"id": "abc123",
"event": "KEYBOARD_TEXT",
"data": {
"text": "hello",
"delay": 100
}
}
```
Available fields:
- `text` (required): The text to type.
- `delay` (optional): Time to wait before typing, in milliseconds.
## Mouse
The mouse events act where the pointer is, as a trackpad would. They have no `delay`, and reply as soon as the input is sent.
### Move
Send the `MOUSE_MOVE` event to move the pointer by an amount from where it is. It responds with the `MOUSE_MOVED` type.
```json title="Request"
{
"id": "abc123",
"event": "MOUSE_MOVE",
"data": {
"x": 40,
"y": -10
}
}
```
- `x`: Pixels to move right, or left when negative.
- `y`: Pixels to move down, or up when negative.
Each is capped at 2000 either way.
### Click
Send the `MOUSE_CLICK` event to click a button. It responds with the `MOUSE_CLICKED` type.
```json title="Request"
{
"id": "abc123",
"event": "MOUSE_CLICK",
"data": {
"button": "left",
"double": false
}
}
```
- `button` (optional): `left`, `right` or `middle`. Defaults to `left`.
- `double` (optional): `true` to double-click.
### Hold and release
Send the `MOUSE_BUTTON` event to hold a button down or release it, such as to drag with `MOUSE_MOVE` in between. It responds with the `MOUSE_BUTTON_SET` type.
```json title="Request"
{
"id": "abc123",
"event": "MOUSE_BUTTON",
"data": {
"button": "left",
"action": "down"
}
}
```
- `button` (optional): `left`, `right` or `middle`. Defaults to `left`.
- `action` (required): `down` to hold the button, `up` to release it.
Always release a button you held, or it stays down on the computer.
### Scroll
Send the `MOUSE_SCROLL` event to scroll by mouse wheel notches. It responds with the `MOUSE_SCROLLED` type.
```json title="Request"
{
"id": "abc123",
"event": "MOUSE_SCROLL",
"data": {
"x": 0,
"y": -3
}
}
```
- `x`: Notches to scroll right, or left when negative.
- `y`: Notches to scroll up, or down when negative.
Each is capped at 50 either way.
## Clipboard
Send the `CLIPBOARD_SET_TEXT` event with a `text` string to put it on the clipboard, ready to paste. It responds with the `CLIPBOARD_TEXT_SET` type. Linux only.
```json title="Request"
{
"id": "abc123",
"event": "CLIPBOARD_SET_TEXT",
"data": {
"text": "hello"
}
}
```
It uses `wl-copy` from wl-clipboard on Wayland, or `xclip` or `xsel` on X11, so one of those needs to be installed.
Send the `CLIPBOARD_GET_TEXT` event to read the clipboard's text. It responds with the `CLIPBOARD_TEXT` type, with an empty `text` when nothing has been copied. It works on Linux, with `wl-paste` or `xclip` or `xsel`, on Windows and on macOS.
```json title="Request"
{
"id": "abc123",
"event": "CLIPBOARD_GET_TEXT"
}
```
```json title="Response"
{
"id": "abc123",
"type": "CLIPBOARD_TEXT",
"subtype": "NONE",
"data": {
"text": "hello"
},
"message": "Got clipboard"
}
```
---
# System
Source: https://system-bridge.timmo.dev/api/websocket/system
Browse the filesystem, read and update settings, run allowlisted commands, and shut down the backend.
## Files & directories
These events let you browse the base directories System Bridge exposes, list and inspect files within them, and validate paths.
The available base directory keys are `documents`, `downloads`, `home`, `music`, `pictures` and `videos`, plus any custom directories configured in `media.directories` in your [settings](#settings).
### List directories
Send the `GET_DIRECTORIES` event to list the available base directories. It takes no data and responds with the `DIRECTORIES` type.
```json title="Request"
{
"id": "abc123",
"event": "GET_DIRECTORIES",
"data": {}
}
```
### Get a directory
Send the `GET_DIRECTORY` event with the base directory key to look up a single directory. It responds with the `DIRECTORY` type.
```json title="Request"
{
"id": "abc123",
"event": "GET_DIRECTORY",
"data": {
"base": "documents"
}
}
```
### List files
Send the `GET_FILES` event with a base directory, and optionally a relative `path` within it, to list files. It responds with the `FILES` type.
```json title="Request"
{
"id": "abc123",
"event": "GET_FILES",
"data": {
"base": "documents",
"path": "subfolder"
}
}
```
### Get a file
Send the `GET_FILE` event with the absolute `path` to a file to get its information. It responds with the `FILE` type.
```json title="Request"
{
"id": "abc123",
"event": "GET_FILE",
"data": {
"path": "/home/user/Documents/example.txt"
}
}
```
To read the contents of a media file, use the [Media File Data](/api/media-file-data/) HTTP endpoint instead.
### Validate a directory
Send the `VALIDATE_DIRECTORY` event with a `path` to check whether it exists and is a directory. It responds with the `DIRECTORY_VALIDATED` type and a `data.valid` boolean.
```json title="Request"
{
"id": "abc123",
"event": "VALIDATE_DIRECTORY",
"data": {
"path": "/home/user/Music"
}
}
```
### Get disk mounts
Send the `GET_DISK_MOUNTS` event to list mounted disks, categorised into primary and secondary (bind and squashfs) mounts. It takes no data and responds with the `DISK_MOUNTS` type.
```json title="Request"
{
"id": "abc123",
"event": "GET_DISK_MOUNTS",
"data": {}
}
```
## Settings
Read and update the backend settings over the WebSocket connection.
### Get settings
Send the `GET_SETTINGS` event to retrieve the current settings. It takes no data and responds with the `SETTINGS_RESULT` type.
```json title="Request"
{
"id": "abc123",
"event": "GET_SETTINGS",
"data": {}
}
```
### Update settings
Send the `UPDATE_SETTINGS` event with the settings object to update. It responds with the `SETTINGS_UPDATED` type and the updated settings.
```json title="Request"
{
"id": "abc123",
"event": "UPDATE_SETTINGS",
"data": {
"autostart": true,
"logLevel": "INFO"
}
}
```
`UPDATE_SETTINGS` replaces the whole `commands.allowlist`, so two clients saving at once can undo each other's commands. To change one command, use the events below.
### Add, change or remove a command
Each of these changes one command in `commands.allowlist` and leaves the rest as they're saved, then responds with the updated settings.
| Event | Data | Response type |
| --- | --- | --- |
| `COMMAND_ADD` | The command, as in [`commands.allowlist`](#settings-keys) | `COMMAND_ADDED` |
| `COMMAND_UPDATE` | The command with its new values, matched by `id` | `COMMAND_UPDATED` |
| `COMMAND_REMOVE` | `{ "id": "..." }` | `COMMAND_REMOVED` |
```json title="Request"
{
"id": "abc123",
"event": "COMMAND_UPDATE",
"data": {
"id": "9ef69bc3-62f8-4d86-952d-5f498bbddf0f",
"name": "Say hi",
"command": "/usr/bin/echo",
"arguments": ["hi"],
"workingDir": "",
"prefab": ""
}
}
```
Adding a command whose ID is already on the list, or changing one that isn't (such as one another client removed), returns an `ERROR` response. Removing a command that isn't on the list does nothing. A command is checked the same way as through `UPDATE_SETTINGS`.
### Settings changes
Whenever the settings are saved, through any of the events above, every connected client gets a `SETTINGS_CHANGED` message with the `id` `system` and the new settings as its data, so it can show them without asking again.
### Settings keys
| Key | Type | Description |
| --- | --- | --- |
| `autostart` | boolean | Start the backend automatically when you log in. |
| `logLevel` | string | One of `DEBUG`, `INFO`, `WARN`, `ERROR`. Defaults to `WARN`. |
| `hotkeys` | array | List of `{ name, key }` hotkey bindings. |
| `commands.allowlist` | array | Commands that can be run via [Execute Command](#execute-command). Each entry is `{ id, name, command, workingDir, arguments, prefab }`. `prefab` is a [prefab](#list-command-prefabs)'s ID, or empty. With a prefab and an empty `command`, the prefab's program runs. |
| `disks.allowedSecondaryMountPoints` | array | Secondary mount points to include in disk data. |
| `media.directories` | array | Custom media directories as `{ name, path }`, exposed as [base directories](#files--directories). |
| `theme` | string | The web client's own theme, as a Groundwork theme document's JSON text, so every client of this host gets it. Empty when there's none. |
:::note
Changing `autostart` or `logLevel` is applied immediately by the backend.
:::
## Discord setup
Read and save the Discord application System Bridge signs in with. See [Discord](/features/discord/) for creating the application.
### Get the Discord setup
Send the `GET_DISCORD_SETUP` event to see how far Discord is set up. It takes no data and responds with the `DISCORD_SETUP` type. The client secret is never sent back.
```json title="Request"
{
"id": "abc123",
"event": "GET_DISCORD_SETUP",
"data": {}
}
```
```json title="Response data"
{
"configured": true,
"clientId": "123456789012345678",
"redirectUri": "http://localhost",
"running": true,
"connected": true,
"authenticated": false,
"error": ""
}
```
| Key | Description |
| --- | --- |
| `configured` | Valid credentials are saved. |
| `clientId` | The saved client ID, or empty. |
| `redirectUri` | The redirect to add on the application's **OAuth2** page. |
| `running` | The Discord desktop app can be reached. |
| `connected` | System Bridge is connected to Discord. |
| `authenticated` | You've approved System Bridge in Discord. |
| `error` | Why the last attempt to connect or sign in failed, or empty. |
### Update the Discord setup
Send the `UPDATE_DISCORD_SETUP` event with the application's `clientId` and `clientSecret`. System Bridge saves them to `discord.json`, readable only by your user, then connects to Discord straight away. Changing the application drops the saved Discord token, so Discord asks you to approve it again. It responds with the `DISCORD_SETUP_UPDATED` type and the [setup](#get-the-discord-setup).
```json title="Request"
{
"id": "abc123",
"event": "UPDATE_DISCORD_SETUP",
"data": {
"clientId": "123456789012345678",
"clientSecret": "YOUR_CLIENT_SECRET"
}
}
```
A client ID that isn't the long number from the **OAuth2** page, or a missing secret, returns an `ERROR` response with the `BAD_REQUEST` subtype.
## Execute command
Run a command from the allowlist defined in your [settings](#settings).
Send the `COMMAND_EXECUTE` event with the `commandID` of an allowlisted command:
```json title="Request"
{
"id": "abc123",
"event": "COMMAND_EXECUTE",
"data": {
"commandID": "my-command"
}
}
```
The command runs asynchronously. You receive a `COMMAND_EXECUTING` response immediately, followed by a `COMMAND_COMPLETED` response once it finishes.
:::caution
Only commands present in `commands.allowlist` can be executed. Requesting an unknown command returns an `ERROR` response with the `COMMAND_NOT_FOUND` subtype.
:::
### List command prefabs
Send the `GET_COMMAND_PREFABS` event to list the [prefab commands](/features/commands/#prefab-commands) and whether each can run on this system. It takes no data and responds with the `COMMAND_PREFABS` type. A prefab only runs once it's added to `commands.allowlist`.
```json title="Request"
{
"id": "abc123",
"event": "GET_COMMAND_PREFABS",
"data": {}
}
```
```json title="Response data"
[
{
"id": "lock",
"name": "Lock screen",
"description": "Lock the screen",
"available": true,
"command": "/usr/bin/loginctl",
"arguments": ["lock-session"],
"reason": ""
}
]
```
| Key | Description |
| --- | --- |
| `available` | A program for it was found on this system. |
| `command`, `arguments` | What it would run, or empty when it isn't available. |
| `reason` | Why it isn't available, such as which tool to install, or empty. |
## Exit application
Send the `EXIT_APPLICATION` event to shut down the backend. It takes empty `data`.
```json title="Request"
{
"id": "abc123",
"event": "EXIT_APPLICATION",
"data": {}
}
```
---
# Developing
Source: https://system-bridge.timmo.dev/developing
This guide covers the contributor workflow for building and running System Bridge locally. End-user install steps are on the [Install](/install/) page.
## Prerequisites
1. Install [`mise`](https://mise.jdx.dev/installing-mise.html) (recommended). `mise.toml` pins the Go, Bun, and Node versions used by local development and CI.
2. Clone the [repository](https://github.com/timmo001/system-bridge) and install toolchains:
```bash
git clone https://github.com/timmo001/system-bridge.git
cd system-bridge
mise install
```
3. Install dependencies:
```bash
mise run deps
```
:::note
**Building without mise:** `mise run` tasks require `mise`. If you cannot install it, put compatible versions of `go`, `bun`, and `node` (see `mise.toml`) on your `PATH` and run the underlying commands from the `[tasks]` section directly.
:::
## Build
Build everything (web client and backend binary):
```bash
mise run build:all
```
On Linux this produces `system-bridge-linux` in the repo root. On Windows it produces `system-bridge.exe`.
Common component tasks:
| Task | Purpose |
| --- | --- |
| `mise run build:client:web` | Build the Lit + Vite web client into `client/web/dist/` |
| `mise run generate:schemas` | Regenerate Zod schemas after changing Go types in `types/` |
List every task with `mise tasks`.
## Run during development
### Foreground (all platforms)
`mise run run` builds the project and starts the Vite dev server and backend together in the foreground. Use this when you want live reload and logs in one terminal.
| Task | What it starts |
| --- | --- |
| `mise run run` | Vite dev server + backend (via `concurrently`) |
| `mise run run:client:web` | Vite dev server only (default port `5173`) |
| `mise run run:backend` | Backend only on port `9170` |
| `mise run run:backend-dev` | Build and run the backend with console output |
When using the Vite dev server, open `http://localhost:5173` and connect to the backend at port `9170`. Make a key for it with [`system-bridge client key create`](/using/cli/#keys).
### Background with pitchfork (Linux)
On Linux, [pitchfork](https://pitchfork.jdx.dev) can supervise dev servers in the background. Install it once:
```bash
mise use -g pitchfork
```
Then use the `serve:*` tasks (defined in `pitchfork.toml`):
| Task | Purpose |
| --- | --- |
| `mise run serve:all` | Start backend and web dev servers |
| `mise run serve:backend` | Start the backend dev server only |
| `mise run serve:web` | Start the Vite dev server only |
| `mise run serve:status` | Show daemon PIDs, ports, and state |
| `mise run serve:logs` | Follow backend logs |
| `mise run serve:restart` | Restart backend and web daemons |
| `mise run serve:stop` | Stop backend and web daemons |
:::caution
The backend daemon owns port `9170` and is also at `https://backend.system-bridge.localhost`. On start, `.scripts/linux/pitchfork-backend-prep.sh` stops any production `system-bridge` process using that port (systemd user service, compositor autostart, or a manual shell process). When the dev backend stops, `.scripts/linux/pitchfork-backend-restore.sh` brings it back. Plan for a brief interruption to your running instance while developing.
:::
Prefer `serve:*` for long-running background work (agents, repeated UI checks). Use `run:*` for foreground debugging or on platforms where pitchfork is not set up.
## Test data modules locally
Data modules live under `data/module/`. After building, exercise a module without starting the full backend:
```bash
mise run cli -- client data list
mise run cli -- client data run --module cpu --pretty
```
Or with `go run` before a full build:
```bash
go run . client data run --module cpu --pretty
```
OS-specific module code belongs in build-tagged files inside subpackages (for example `data/module/system/system_linux.go`). See `.agents/architecture.md` in the repository for the required pattern.
## Schema and type changes
When you change Go types under `types/`, regenerate the TypeScript connector's Effect schemas:
```bash
mise run generate:schemas
```
Do not hand-edit `connector/typescript/src/generated/modules.ts`; it is generated output.
## Quality checks
| Task | Purpose |
| --- | --- |
| `mise run test` | Build the web client if needed, then run Go tests (`go test ./...`) |
| `mise run lint:all` | Go format check and vet, web client Oxlint and typecheck |
| `mise run check` | `lint:all` plus tests, run in parallel |
| `mise run format:go` | Format Go code |
`lint:go` checks formatting without changing files. After editing Go code, run `mise run format:go`.
Pass several tasks to one run to execute them in parallel, for example `mise run check ::: build:all`. The schema and web client builds are skipped when their sources haven't changed.
## Documentation site
Docs live in `docs/`, built with [Blume](https://github.com/haydenbleasel/blume) and [`@timmo001/docs-kit`](https://github.com/timmo001/docs-kit). From the repo root:
```bash
mise run docs:dev # dev server
mise run docs:build # production build, failing on content errors
mise run docs:validate # check every link and anchor
mise run docs:lint # lint the Markdown
```
See `docs/AGENTS.md` for authoring conventions.
## Configuration paths
During development, settings and keys use the same per-user locations as a normal install:
| Platform | Settings / keys | Logs |
| --- | --- | --- |
| Linux | `~/.local/share/system-bridge/v5/` | `~/.local/state/system-bridge/YYYY-MM-DD.log` |
| Windows | `%LOCALAPPDATA%\system-bridge\v5\` | `%LOCALAPPDATA%\system-bridge\logs\YYYY-MM-DD.log` |
| macOS | `~/Library/Application Support/system-bridge/v5/` | `~/Library/Logs/system-bridge/YYYY-MM-DD.log` |
The backend port defaults to `9170` and can be overridden with `SYSTEM_BRIDGE_PORT`. Override the settings and log directories with `SYSTEM_BRIDGE_CONFIG_DIR` and `SYSTEM_BRIDGE_LOG_DIR` (both must be absolute paths). See [Running → Configuration](/running/#configuration) for the full list of environment variables.
## Next steps
- Read the [API overview](/api/) and [MCP server](/api/mcp/) docs for integration work.
- Use the [CLI](/using/cli/) reference for key, data, and completion commands.
- Open the [web client](/using/web-client/) against your dev backend once it is running.
---
# Commands
Source: https://system-bridge.timmo.dev/features/commands
Commands let a client run a program on the machine running System Bridge, such as restarting a service, starting a backup or running a script. Only commands you add to the allowlist can run. A client picks a command by its ID and can't change the program or its arguments.
## Adding a command
1. In the [web client](/using/web-client/), open the **System** page and scroll to **Commands**.
2. Under **Add a command**, fill in:
- **Name**: what the command is called in lists, such as "Restart audio".
- **Command**: the program's full path, such as `/usr/bin/systemctl` or `C:\Scripts\backup.ps1`.
- **Arguments**: anything to pass to the program, separated by commas, such as `--user, restart, pipewire`.
- **Working directory**: where the program runs. Optional.
3. Select **Add**.
The command appears in the list with its ID. Select the copy button next to the ID to use it from another client.
System Bridge checks a command when it's added and again before each run:
- The command must be a full path to a file that exists.
- On Linux and macOS the file must be executable. On Windows it must end in `.exe`, `.bat`, `.cmd` or `.ps1`.
- The working directory, when set, must exist.
The program runs directly, not through a shell, so pipes, `&&` and variables such as `$HOME` aren't expanded. To use them, put them in a script and add the script.
Other clients can add commands too, with the same checks:
- **CLI**: [`system-bridge client command add`](/using/cli/#commands), with the program and its arguments after `--`. Add `--remote` to add it on a paired computer.
- **API**: send [`COMMAND_ADD`](/api/websocket/system/) with the command.
- **MCP**: an assistant can add one with [`system_bridge_add_command`](/api/mcp/#system_bridge_add_command).
## Prefab commands
Prefabs are ready-made commands for common tasks. Each one picks the right program for the platform and desktop, so you don't need its path.
1. Under **Add a command**, pick the prefab from **Type**. Its name and the program it would run fill in.
2. Leave **Command** empty to use that program, and select **Add**.
System Bridge looks for the program each time the command runs, so installing or moving a tool later doesn't need the command adding again. A prefab whose tools aren't installed is greyed out, with the tool to install. If one you've added stops being available, the reason shows under it and **Run** is turned off.
To use your own program instead, such as a script of yours, fill in **Command** and **Arguments**. The command keeps the prefab's name and its ID, so clients using it carry on working.
On Windows and macOS each prefab has one way to run:
| Prefab | Windows | macOS |
| --- | --- | --- |
| **Lock screen** (`lock`) | `rundll32.exe user32.dll,LockWorkStation` | `pmset displaysleepnow` |
| **Sleep** (`sleep`) | `rundll32.exe powrprof.dll,SetSuspendState 0,1,0` | `pmset sleepnow` |
| **Log out** (`logout`) | `shutdown.exe /l` | `osascript`, telling System Events to log out |
| **Open the file manager** (`file-manager`) | `explorer.exe` at your home folder | `open` at your home folder |
| **Open a terminal** (`terminal`) | `wt.exe` (Windows Terminal) | `open -a Terminal` |
| **Screenshot** (`screenshot`) | Built in, capturing every display | `screencapture` |
| **Screenshot of a window** (`screenshot-window`) | Built in, capturing the focused window | `screencapture`, which asks you to pick the window |
| **Screenshot of a region** (`screenshot-region`) | Not available | `screencapture` |
On Linux, System Bridge works out which desktop is running, even when it's started outside it such as from systemd, and uses the first program in the list that suits that desktop and is installed. Each desktop's own tools come first, with Omarchy's ahead of the rest on Hyprland, then popular tools that work on more than one desktop.
| Prefab | Hyprland and Omarchy | KDE Plasma | GNOME | Other Wayland | X11 |
| --- | --- | --- | --- | --- | --- |
| **Lock screen** | `omarchy-system-lock`, `loginctl` | `loginctl` | `loginctl` | `loginctl` | `loginctl` |
| **Sleep** | `systemctl suspend` | `systemctl suspend` | `systemctl suspend` | `systemctl suspend` | `systemctl suspend` |
| **Log out** | `omarchy-system logout`, `hyprctl dispatch 'hl.dsp.exit()'` with a Lua config or `hyprctl dispatch exit`, `loginctl` | `qdbus6` or `qdbus`, `loginctl` | `gnome-session-quit`, `loginctl` | `loginctl` | `loginctl` |
| **Open the file manager** | `omarchy-launch-nautilus`, `xdg-open` | `xdg-open` | `xdg-open` | `xdg-open` | `xdg-open` |
| **Open a terminal** | `omarchy-launch-terminal`, `xdg-terminal-exec` | `konsole`, `xdg-terminal-exec` | `kgx` or `gnome-terminal`, `xdg-terminal-exec` | `xdg-terminal-exec` | `xdg-terminal-exec`, `x-terminal-emulator` |
| **Screenshot** | `omasnap`, `grimblast`, `grim`, `flameshot`, portal | `spectacle`, `flameshot`, portal | `gnome-screenshot`, `flameshot`, portal | `grim`, `flameshot`, portal | `flameshot`, `scrot`, `maim`, portal |
| **Screenshot of a window** | `omasnap`, `grimblast`, `hyprshot` | `spectacle` | `gnome-screenshot` | | `scrot` |
| **Screenshot of a region** | `omasnap`, `grimblast`, `hyprshot`, `flameshot` | `spectacle`, `flameshot` | `gnome-screenshot`, `flameshot` | `flameshot` | `flameshot`, `scrot`, `maim` |
On Omarchy, **Screenshot** captures the focused monitor, and **Screenshot of a window** asks you to pick the window, as Omarchy's own screenshot tool does.
With more than one monitor connected, **Type** also lists a screenshot of each monitor, such as **Screenshot of DP-1** (`screenshot-monitor:DP-1`), so you can capture the one you want. On Linux these use `grim`, on Hyprland and other wlroots desktops, and on Windows they're built in, numbered from **display 1**. If the monitor is unplugged later, the command stays and says the monitor isn't connected until it's back.
When none of these is installed, **Screenshot** asks the desktop portal instead, which most Linux desktops have. GNOME and KDE ask you to allow it the first time.
**Open the file manager** and **Open a terminal** return as soon as the app starts, and the app stays open after the command finishes. To read or set the clipboard, use the [clipboard events](/features/remote-control/#clipboard) instead.
Like any other command, a prefab only runs once it's on your list.
### Omarchy shell calls
On Omarchy, **Omarchy shell call** (`omarchy-ipc`) calls one of the Omarchy shell's IPC functions, such as `media playPause` or `notifications dismissAll`, so you can allow just the calls you want. Pick it from **Type**, then pick a **Target** and a **Function** from the ones the shell answers to. If the function takes arguments, fill them in, separated by commas, in the order shown. Whatever the function answers is the command's output.
The command's arguments hold the target, the function, then the function's own arguments, so through the [API](/api/websocket/system/#settings-keys) the entry for `media playPause` has `"prefab": "omarchy-ipc"` and `"arguments": ["media", "playPause"]`. The call fails, saying so, if the shell isn't running or no longer has that function.
### Screenshots
Screenshots are saved as PNGs to a **Screenshots** folder in your pictures folder (`$XDG_PICTURES_DIR` when it's set, or `Pictures` in your home folder), named by the time they were taken, such as `screenshot-20261025-143000.png`. Tools that name their own files, such as `omasnap`, keep their name. When one finishes, its output is the file's full path. If the program finishes without saving anything, such as when you cancel picking a region, the command reports that nothing was saved.
Prefabs that ask you to pick a window or region need someone at the computer.
When you give a screenshot prefab your own program, put these in its arguments where the file should go:
| Placeholder | Becomes |
| --- | --- |
| `{output}` | The file's full path |
| `{outputDir}` | The folder it's saved in |
| `{outputName}` | The file's name |
Only commands added from a prefab have their placeholders filled in. A program that picks its own file name works too, as long as it saves into the folder: the newest file it saves there becomes the output.
## Running a command
- **Web client**: select **Run** next to the command. When it finishes, the exit code shows under it, with anything the command printed.
- **API**: send [`COMMAND_EXECUTE`](/api/websocket/system/#execute-command) with the command's ID. You get `COMMAND_EXECUTING` straight away, then `COMMAND_COMPLETED` with the exit code and output once it finishes.
- **MCP**: an assistant can list the commands with [`system_bridge_list_commands`](/api/mcp/#system_bridge_list_commands), see the prefabs with [`system_bridge_list_command_prefabs`](/api/mcp/#system_bridge_list_command_prefabs), and run one with [`system_bridge_run_command`](/api/mcp/#system_bridge_run_command), which waits for it to finish.
A command can run for up to 5 minutes before System Bridge stops it. Output over 1 MB is cut off. Stopping System Bridge also stops any commands still running.
## Editing a command
Each part of a command in the list is a button: its name, the program, the arguments and the working directory. Select one to change just that part in a small popover, then select **Save**. The command keeps its ID, so clients using it carry on working.
Changing a prefab command's program gives it your own program in place of the prefab's. Leave the program empty to go back to the prefab's. System Bridge checks a new program or working directory the same way as when a command is added.
From the CLI, use `system-bridge client command update` with the command's ID and the parts to change. An assistant can use [`system_bridge_update_command`](/api/mcp/#system_bridge_update_command), and the API takes `COMMAND_UPDATE`.
## Removing a command
Select the bin button next to the command. Clients can't run it from then on.
From the CLI, use `system-bridge client command remove` with the command's ID. An assistant can use [`system_bridge_remove_command`](/api/mcp/#system_bridge_remove_command), and the API takes `COMMAND_REMOVE`.
## Security
Any client with a key can run every command on the allowlist, so only add commands you're happy for them to run. An attempt to run a command that isn't on the list is logged as a warning. At the `INFO` log level, each run is logged too, with its command, arguments and the connection that asked for it. See [privacy and security](/privacy/).
---
# Discord
Source: https://system-bridge.timmo.dev/features/discord
System Bridge connects to the Discord desktop app on the same machine. It shows your voice state and call, and lets you mute, deafen, change your audio devices and volumes, adjust other people's volume, and play soundboard sounds from the web client or the API.
Discord only lets apps you own read and change your voice settings, so you set it up once with your own Discord application.
## Setting it up
1. Go to the [Discord Developer Portal](https://discord.com/developers/applications) and create an application. Any name works.
2. On its **OAuth2** page, copy the **Client ID** and **Client Secret**.
3. On the same page, add `http://localhost` as a redirect and save.
4. In the [web client](/using/web-client/), open the **Discord** page and scroll to **Setup**. Enter the client ID and secret, then select **Save and connect**.
5. Make sure the Discord desktop app is open. Discord shows a prompt asking to let System Bridge in. Approve it with the account that owns the application.
**Setup** shows each step as it happens: the application saved, Discord running, connected, and signed in. Once you're signed in, your Discord status and the controls appear above it.
The client secret is stored only on that machine, in `discord.json`, readable only by your user. It's never shown again or sent back to a client. To change the application, enter the new client ID and secret and select **Save and reconnect**. Discord asks you to approve the new one.
### Without the web client
Send [`UPDATE_DISCORD_SETUP`](/api/websocket/system/#discord-setup) with the client ID and secret, or create `discord.json` in the [settings directory](/running/#file-locations) yourself:
```json
{
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET"
}
```
System Bridge checks for the file every 30 seconds.
## Using it
The **Discord** page shows your status and call first, then the controls.
- **Voice**: mute, deafen, turn your camera on or off, share your screen, and leave the call. Mute and deafen are highlighted while they're on. Video and screen share need you to be in a call. Starting a screen share opens Discord's picker, so choose what to share there.
- **Audio**: pick your input and output devices, and set their volumes. Volumes match Discord's sliders: 0-100% for input and 0-200% for output.
- **Voice settings**: switch between voice activity and push to talk, and set the voice activity sensitivity or the push to talk release delay. While automatic sensitivity is on in Discord, Discord sets the sensitivity itself. Turn quality of service and the silence warning on or off.
- **In the call**: mute anyone in your call, or change their volume, for you only.
- **Soundboard**: play any sound you can use. Sounds play in your call, so you need to be in one.
A slider sends its value when you let go. If Discord refuses a change, the control goes back to how Discord has it, and the page says what went wrong.
Some settings, such as noise suppression and echo cancellation, are shown but can't be changed: Discord ignores changes to them from other apps.
### From your own code
- The [`discord`](/api/data/#discord) data module has everything the page shows, and updates as soon as anything changes in Discord.
- [`DISCORD_CONTROL`](/api/websocket/control/#discord-control) does everything the controls do, and can also join a voice channel or open a text channel by its ID.
For example, a script on a desk button could toggle deafen, or mute you when a meeting starts.
## Troubleshooting
**Setup** in the web client shows where it stopped and any problem Discord reports.
| What you see | What to do |
| --- | --- |
| **Discord running** isn't done | Open the Discord desktop app on the same machine, signed in. The web version of Discord can't be reached. |
| "The client ID should be the long number from the OAuth2 page" | Copy the **Client ID** again from the application's **OAuth2** page. |
| "Invalid Client ID" | Discord doesn't recognise the application. Check you copied the client ID from the right application. |
| **Signed in** never finishes | Check Discord for the prompt, and approve it with the account that owns the application. Check `http://localhost` is saved as a redirect. |
| You declined the prompt, or it timed out | System Bridge asks again after 5 minutes. To try straight away, select **Save and reconnect**. |
To sign in again from scratch, delete `discord-token.json` from the [settings directory](/running/#file-locations). Discord also asks again when a System Bridge update needs new permissions. The [privacy page](/privacy/#discord-permissions) lists each permission and what it's used for.
---
# Media
Source: https://system-bridge.timmo.dev/features/media
System Bridge shows what's playing on your machine, lets you control it, and shares folders of media so other clients can browse and play them.
## What's playing
The `media` module reports the title, artist, album, artwork, position, length, volume, shuffle and repeat of what's playing.
| Platform | Where it comes from |
| --- | --- |
| Linux | Any player that supports MPRIS, such as Spotify, VLC, mpv and most browsers. System Bridge reads them over D-Bus, so nothing needs installing. |
| Windows | The current Windows media session, read by the `NowPlaying` helper that comes with System Bridge. |
With several players open on Linux, System Bridge shows the first one playing, then the first one paused, preferring one with a track loaded. It also lists every player in `players`, so clients can show and control the others.
## Controlling playback
### In the web client
Open the **Media** page in the [web client](/using/web-client/). The player at the top shows what's playing, with:
- Previous, play or pause, and next in the middle.
- Stop on the left, with shuffle and repeat beside it when the player has them. Repeat moves from off to all to one.
- The volume on the right. Hover over it, or focus it with the keyboard, to show volume down, mute and volume up. On a touch screen they're always shown.
- The position, which you can drag to seek when the player supports it.
A button is greyed out when the player says it can't do that, such as skipping on the last track.
On Linux, with more than one player open, a picker at the top of the player chooses which one it shows and controls. **Automatic** follows the one System Bridge picks, and your choice is kept in this browser. The other players sit below as smaller cards, each with play or pause and **Show** to pick it.
### Elsewhere
- **Home Assistant**: the integration's media player shows and controls what's playing, for machines running Windows. See [Home Assistant](/using/home-assistant/#media-player).
- **API**: send [`MEDIA_CONTROL`](/api/websocket/control/#media-control) with `PLAY`, `PAUSE`, `STOP`, `NEXT`, `PREVIOUS`, `VOLUME_UP`, `VOLUME_DOWN` or `MUTE`. On Linux, it also takes `SEEK`, `SET_VOLUME`, `SET_SHUFFLE` and `SET_REPEAT`, and a `player` to control a player other than the one shown.
- **Agents**: the [MCP server](/api/mcp/)'s `system_bridge_media_control` tool takes the same actions.
- **CLI**: `system-bridge client media pause`, or `system-bridge client media seek 90 --player vlc`.
### How each platform controls it
| Platform | How |
| --- | --- |
| Linux | System Bridge controls the player the Media module shows over MPRIS. Volume up and down change its volume by 5%. Mute sets it to 0, or back to where it was when it's already muted. Some players, such as Chromium, ignore volume changes. |
| Windows | System Bridge presses the media keys, so it controls whichever app responds to them. |
## Sharing media folders
Media directories are folders you share with clients that browse files, such as the Home Assistant [media source](/using/home-assistant/#media-source). Your documents, downloads, home, music, pictures and videos folders are always shared. Add others for things like a recordings folder or a second drive.
1. In the web client, open the **Media** page and scroll to **Media directories**.
2. Under **Add a directory**, enter a **Name**, such as "Recordings", and the folder's **Path**. The folder must already exist.
3. Select **Add**.
To stop sharing a folder, select the bin button next to it.
Clients list a shared folder's files with [`GET_FILES`](/api/websocket/system/#list-files), and download them from [`/api/media/file/data`](/api/media-file-data/). Only common image, audio, video and document types up to 100 MB can be downloaded, and only from inside a shared folder.
---
# Monitoring
Source: https://system-bridge.timmo.dev/features/monitoring
System Bridge reads your system's state into data modules and keeps them up to date. Every way of using System Bridge reads the same modules, so pick whichever suits you.
## What it reports
| Module | What's in it |
| --- | --- |
| `system` | Hostname, platform, uptime, signed-in users, versions, failed systemd units, and which apps are using the camera or microphone. |
| `processes` | Running processes with their CPU and memory use. |
| `cpu` | Usage, frequency, temperature, power and each core's load. |
| `memory` | Physical memory and swap. |
| `gpus` | Load, memory, clocks, temperature and power for each GPU. |
| `sensors` | Temperatures and fan speeds. |
| `battery` | Charge, whether it's charging, and time remaining. |
| `bluetooth` | Paired Bluetooth devices and whether they're connected. |
| `cameras` | Webcams and their settings, such as brightness, zoom and focus (Linux). |
| `displays` | Resolution, position, refresh rate, brightness and power state of each display. |
| `audio` | Output and input devices, their volume, whether they're muted and which are the defaults. |
| `disks` | Partitions, used and free space, and read and write activity. |
| `networks` | Interfaces, addresses, traffic and connections. |
| `media` | What's playing and its position. |
| `discord` | Your Discord voice state and call, once [Discord](/features/discord/) is set up. |
System Bridge updates most modules about once a minute. Discord pushes its changes as they happen. The [data reference](/api/data/) lists every field.
## In the web client
The [web client](/using/web-client/) has a page for each module, grouped in the menu into **System**, **Hardware**, **Storage and network** and **Apps**.
- The **Overview** shows gauges for CPU, memory, GPU, CPU temperature and battery, graphs of CPU, memory and network use, storage, and what's playing. Select a card to open its module.
- Each module's page has a dashboard of cards and graphs. Graphs start with the first readings after you open the page.
- Processes and network connections are in tables you can search, sort and page through. The search, sort and page are kept in the address, so a reload or a shared link shows the same rows.
- Select **JSON** at the top of a module's page to see its raw data, as an app or script would get it.
### Choosing which disks to show
The Disks module always reports your primary mounts. Bind mounts, such as btrfs subvolumes, and squashfs mounts, such as snaps, are left out unless you pick them. On the **Disks** page, under **Disk mounts**, tick the mounts you want reported. Each change saves straight away.
## In Home Assistant
The [Home Assistant integration](/using/home-assistant/) turns the modules into sensors, such as CPU usage, memory used, disk space and battery level. Use them in dashboards, history graphs and automations, for example to notify you when a disk is nearly full.
## From the terminal
Print a module's current data as JSON:
```bash
system-bridge client data run --module cpu --pretty
```
Pick out one value with `jq`:
```bash
system-bridge client data run --module memory | jq '.virtual.percent'
```
Stream updates from the running backend, one JSON line per update:
```bash
system-bridge client data watch --module cpu --module memory
```
See the [CLI](/using/cli/#data) for every option.
## From your own code
- Fetch a module over HTTP from [`/api/data/{module}`](/api/data/).
- Get a module, or subscribe to its updates, over the [WebSocket](/api/websocket/data/).
- Let an agent read modules with the [MCP server](/api/mcp/)'s `system_bridge_get_data` tool.
---
# Notifications
Source: https://system-bridge.timmo.dev/features/notifications
System Bridge shows notifications through your desktop's own notifications, so they look and behave like any other app's. Use them for things like a backup finishing, a door opening, or a reminder to take a break.
## Sending one
### In the web client
1. Open the **System** page in the [web client](/using/web-client/) and scroll to **Notifications**.
2. Enter a **Title** and **Message**.
3. Optionally add:
- **Icon**: the path to an image on that machine.
- **Link**: a URL to open when the notification is clicked.
- **Sound**: the path to a sound file on that machine.
- **Urgency**: low, normal or critical. Critical notifications stay until they're dismissed. Linux only.
- **Buttons**: up to 3, each with an id and a label. Linux and Windows only.
4. Select **Send**. **Clear** empties the form.
### From the terminal
```bash
system-bridge client notification --title "Backup finished" --message "All files were copied"
```
The [CLI](/using/cli/#notification) also takes `--icon`, `--sound`, `--action-url` and `--action-path`.
### From Home Assistant
The integration can send notifications to your machine, so an automation can tell you when something happens at home. See [Home Assistant](/using/home-assistant/#notifications) and the [integration's documentation](https://www.home-assistant.io/integrations/system_bridge) for the action to use.
### From your own code or an agent
- Send [`NOTIFICATION`](/api/websocket/control/#send-notification) over the WebSocket. It also takes a `duration` in milliseconds, an `actionPath` to open a file or folder when clicked, an `urgency`, and up to 3 `buttons`.
- Agents can use the [MCP server](/api/mcp/)'s `system_bridge_send_notification` tool.
## Following a notification
Every connected client gets a [`NOTIFICATION_SENT`](/api/websocket/control/#notification-events) event when System Bridge sends a notification, with its `id`, title, message and buttons, whoever sent it. The events below carry the same `id`, so a notification can be followed from being sent to being clicked or closed, even one sent from Home Assistant, which gets no `id` back. The web client lists the recent ones this way, under **Notifications** on the **System** page.
## Buttons, clicks and dismissing
On Linux and Windows, a notification can have up to 3 buttons, such as **Snooze** and **Done**. When one is pressed, or the notification itself is clicked, every connected client gets a [`NOTIFICATION_ACTION`](/api/websocket/control/#notification-events) event with the notification's `id` and which button it was. So an automation can react to the answer. On Linux, a `NOTIFICATION_CLOSED` event follows when it closes, saying whether it expired or was dismissed. Windows sends no event when a notification closes.
Clients can also close a notification they sent with [`NOTIFICATION_DISMISS`](/api/websocket/control/#dismiss-notification), such as once the door it was about has closed again.
Set `urgency` to `critical` for a notification that stays until it's dismissed, or `low` for one that matters less. How each looks is up to your notification daemon.
## What each platform supports
| | Linux | Windows |
| --- | --- | --- |
| Title and message | Yes | Yes |
| Icon | An icon name, such as `dialog-information`, or a path to an image | A path to an image |
| Duration | Shown for the time you set, if your notification daemon allows it | Short, or long from 7 seconds |
| Open a link or path when clicked | Yes | No |
| Sound | Played with `paplay` or `aplay` | Windows plays its own notification sound |
| Urgency | Yes | No |
| Buttons, and events when clicked | Yes | Yes |
| Event when closed | Yes | No |
| Event when sent | Yes | Yes |
| Dismissing | Yes | No |
On Linux, notifications need a notification daemon, which most desktops include.
---
# Remote control
Source: https://system-bridge.timmo.dev/features/remote-control
System Bridge can act on the machine it runs on: open a website or file, type text or press keys, move and click the mouse, focus and arrange windows, set an audio device's volume, set a display's brightness, and change its power state. Home Assistant automations use these to, for example, open a dashboard on a wall display in the morning or lock the computer when you leave.
## The Remote page
The [web client](/using/web-client/#remote)'s **Remote** page puts the controls for using the computer from somewhere else on one page, ready for a phone:
- A trackpad, with left and right buttons under it.
- A box to type into, and Enter, Backspace, Tab, Delete and the arrow keys.
- Shortcuts: Alt+Tab, Super, Esc, copy, paste, cut, undo, select all and F1 to F12. On a Mac they use Cmd.
- The open windows and workspaces, to focus one or switch to it.
- The clipboard: send text to it, or get what's on it.
- **Open**, for a URL or a file.
- Your saved [commands](/features/commands/), with how each run went, and a link to change them.
- Links to the Media, Audio, Displays, Desktop, Bluetooth and System pages, which each link back.
When keys and the mouse can't be sent, the trackpad, keyboard and shortcuts say why, with **Try again**. The rest of the page still works.
## Opening a URL or file
### In the web client
1. Open the **System** page in the [web client](/using/web-client/) and scroll to **Open**.
2. Choose **URL** or **Path**.
3. Enter a URL, such as `https://example.com`, or a path to a file or folder on that machine.
4. Select **Open**.
A URL opens in the default browser. A file opens in the app it's set to open with, and a folder opens in the file manager. A path that doesn't exist shows an error, rather than nothing happening.
### Elsewhere
- **Home Assistant**: the integration has actions to open a URL or a path. See [Home Assistant](/using/home-assistant/#actions).
- **API**: send [`OPEN`](/api/websocket/control/#open-a-path) with a `url` or a `path`.
## Typing and pressing keys
The Remote page, Home Assistant and the API can type text and press keys, as if on the machine's own keyboard. They go to whichever window has focus.
- Type text with [`KEYBOARD_TEXT`](/api/websocket/input/#keyboard-text), such as a search or a message.
- Press a key with [`KEYBOARD_KEYPRESS`](/api/websocket/input/#keyboard-keypress), optionally holding `shift`, `ctrl`, `alt` or `cmd`. For example, `space` with no modifiers to pause a video, or `l` with `ctrl` to focus a browser's address bar.
Both take an optional `delay` in milliseconds before they start, which helps when something else has to open first.
## Moving and clicking the mouse
Move the pointer, click, hold a button to drag, and scroll from the Remote page's trackpad, the API with the [mouse events](/api/websocket/input/#mouse), or the [MCP server](/api/mcp/)'s `system_bridge_mouse_*` tools. Moves are by an amount from where the pointer is, as on a trackpad, so they work across any number of displays.
## How input reaches the desktop
Keys and the mouse go through the first of these that works, checked the first time they're needed. Check which with [`GET_INPUT_STATUS`](/api/websocket/input/#input-status) or the MCP server's `system_bridge_input_status` tool.
| Backend | Used on |
| --- | --- |
| `wayland` | Wayland desktops with the wlroots virtual keyboard and pointer, such as Hyprland and Sway |
| `libei` | Other Wayland desktops with the RemoteDesktop portal, such as GNOME and KDE Plasma |
| `x11` | X11 desktops |
| `robotgo` | Windows and macOS |
- **GNOME and KDE Plasma** ask once to allow remote control, the first time input is needed, such as when the Remote page opens. Allow it on the computer. System Bridge remembers it, so it doesn't ask again.
- **On `wayland`**, typed text uses a US keyboard layout and only plain ASCII characters, whatever layout the computer uses.
- **On macOS**, allow System Bridge under **Privacy & Security > Accessibility**.
## Clipboard
On Linux, put text on the clipboard, ready to paste, with [`CLIPBOARD_SET_TEXT`](/api/websocket/input/#clipboard), the MCP server's `system_bridge_set_clipboard` tool, or the CLI:
```bash title="Terminal"
system-bridge client clipboard set "Some text"
echo "Some text" | system-bridge client clipboard set
```
It needs wl-clipboard on Wayland, or xclip or xsel on X11.
Read the clipboard's text with [`CLIPBOARD_GET_TEXT`](/api/websocket/input/#clipboard), the MCP server's `system_bridge_get_clipboard` tool, or `system-bridge client clipboard get`. Reading works on Windows and macOS too, and uses the same tools on Linux.
## Power
Sleep, hibernate, lock, log out, restart or shut down the machine from Home Assistant or the [API](/api/websocket/control/#power-control). System Bridge doesn't ask for confirmation, so these happen straight away.
| Action | Linux | Windows |
| --- | --- | --- |
| Sleep | `systemctl suspend` | Sleeps, turning hibernation off first so it doesn't hibernate instead |
| Hibernate | `systemctl hibernate` | Hibernates, turning hibernation on first |
| Lock | `loginctl lock-session` | Locks the workstation |
| Log out | Ends your login session | `shutdown /l` |
| Restart | `systemctl reboot` | `shutdown /r` |
| Shut down | `systemctl poweroff` | `shutdown /s` |
On Linux, hibernating needs swap set up for it. Depending on your distribution's polkit rules, suspending or shutting down may ask for a password when System Bridge runs as a service.
### Power profiles
On Linux with power-profiles-daemon, or tuned-ppd on Fedora, the system data reports the active `power_profile` and the `power_profiles` available, usually `power-saver`, `balanced` and `performance`. Switch between them from the **Power** card on the [web client](/using/web-client/)'s **System** page, with [`SYSTEM_SET_POWER_PROFILE`](/api/websocket/control/#system-control), the MCP server's `system_bridge_set_power_profile` tool, or `system-bridge client system power-profile`. A change made anywhere else, such as from your desktop's power menu, shows up straight away.
### Keeping awake
On Linux, the **Power** card on the web client's **System** page, [`SYSTEM_SET_KEEP_AWAKE`](/api/websocket/control/#system-control), the MCP server's `system_bridge_set_keep_awake` tool, or `system-bridge client system keep-awake on` stop the system idling, so it doesn't lock, blank the screen or sleep while you're away. Give it a duration to let it idle again after that long. The system data's `keep_awake` and `keep_awake_until` show whether it's on and when it ends.
On Omarchy, this is the bar's stay awake switch, so turning either on shows in both. On other desktops System Bridge holds a logind idle inhibitor, which GNOME, KDE and idle daemons such as hypridle follow.
## Audio
Set an output's, input's or app's volume, mute or unmute it, or make a device the default, from the [web client](/using/web-client/)'s **Audio** page, the API with [`AUDIO_CONTROL`](/api/websocket/control/#audio-control), the [MCP server](/api/mcp/)'s `system_bridge_audio_control` tool, or the CLI:
```bash title="Terminal"
system-bridge client audio alsa_output.pci-0000_00_1f.3.analog-stereo --volume 40
system-bridge client audio alsa_output.pci-0000_00_1f.3.analog-stereo --mute
system-bridge client audio alsa_output.pci-0000_00_1f.3.analog-stereo --default
```
The id is the device's `id` from the [`audio`](/api/data/#audio) data, which reports each device's `volume`, `muted` and `default`.
On Linux, each app playing sound is listed too, in the data's `apps` and in an **Apps** card on the **Audio** page. Turn one up, down or mute it on its own, or move it to another output, by its id:
```bash title="Terminal"
system-bridge client audio app:120 --volume 50
system-bridge client audio app:120 --output alsa_output.pci-0000_00_1f.3.hdmi-stereo
```
- **Linux** uses `pactl`, so it needs PulseAudio or PipeWire with `pipewire-pulse`.
- **Windows** uses the system's audio endpoints.
macOS isn't supported yet, so it reports no devices.
Changes made elsewhere, such as with your volume keys or another mixer, show up straight away on Linux and within a second on Windows.
## Bluetooth
Connect, disconnect or forget paired devices, and turn Bluetooth on or off, from the [web client](/using/web-client/)'s **Bluetooth** page, the API with [Bluetooth control](/api/websocket/control/#bluetooth-control), the [MCP server](/api/mcp/)'s `system_bridge_bluetooth_*` tools, or the CLI:
```bash title="Terminal"
system-bridge client bluetooth connect 80:C3:BA:7B:93:4E
system-bridge client bluetooth disconnect 80:C3:BA:7B:93:4E
system-bridge client bluetooth forget 80:C3:BA:7B:93:4E
system-bridge client bluetooth power off
```
The address is the device's `address` from the [`bluetooth`](/api/data/#bluetooth) data, which also reports whether Bluetooth is `powered`. Pairing a new device isn't supported, as it usually needs a code confirmed on both sides.
| Action | Linux | Windows |
| --- | --- | --- |
| Connect or disconnect a device | Yes | No |
| Forget a device | Yes | Yes |
| Turn Bluetooth on or off | Yes | No |
Linux uses BlueZ, and turning Bluetooth on or off applies to every adapter. macOS isn't supported yet.
## Desktop
Focus, close, maximise and make windows fullscreen, show a workspace and switch the keyboard layout from the [web client](/using/web-client/)'s **Desktop** page, the API with [desktop control](/api/websocket/control/#desktop-control), the [MCP server](/api/mcp/)'s `system_bridge_desktop_*` tools, or the CLI:
```bash title="Terminal"
system-bridge client desktop focus 0x555dbf21c9e0
system-bridge client desktop state 0x555dbf21c9e0 --fullscreen
system-bridge client desktop close 0x555dbf21c9e0
system-bridge client desktop workspace 2
system-bridge client desktop layout us
```
The ids are the window and workspace `id`s from the [`desktop`](/api/data/#desktop) data.
| Action | Hyprland | Other Wayland desktops | Windows |
| --- | --- | --- | --- |
| Focus or close a window | Yes | Yes | Yes |
| Fullscreen | Yes | Yes | No |
| Maximise | Yes | Yes | Yes |
| Minimise | No | Yes | Yes |
| Show a workspace | Yes | Yes | No |
| Switch keyboard layout | Yes | Sway and niri | Yes |
Wayland has no standard way to read or switch keyboard layouts, so on other Wayland desktops they come from the compositor's own IPC, which Sway and niri have. There, layouts are named as xkb describes them, such as `English (UK)`, rather than by their codes.
### Hyprland
On Hyprland you can also float, pin and move windows, move the focus and run other dispatchers on the focused window, trigger the global shortcuts apps have registered, and reload the config, from the same places or the CLI:
```bash title="Terminal"
system-bridge client hyprland set 0x555dbf21c9e0 --floating --pinned
system-bridge client hyprland move 0x555dbf21c9e0 2
system-bridge client hyprland dispatch move_focus left
system-bridge client hyprland shortcut omarchy:panel.omarchy.clock
system-bridge client hyprland reload
```
System Bridge only runs these actions and [dispatchers](/api/websocket/control/#hyprland-control). It can't send Hyprland any other command.
### Omarchy
While the Omarchy shell runs, open, close or toggle its menu at any of its routes, and the panels of its plugins, from the same places or the CLI:
```bash title="Terminal"
system-bridge client omarchy menu open capture
system-bridge client omarchy menu close
system-bridge client omarchy panel toggle omarchy.audio
```
The menus, panels and the shell's IPC targets are in the [`desktop`](/api/data/#desktop) data's `omarchy`. To call other IPC functions, add them to your [commands](/features/commands/).
## Displays
Set a display's brightness, or turn a monitor off and on, from the API with [`DISPLAY_CONTROL`](/api/websocket/control/#display-control), the [MCP server](/api/mcp/)'s `system_bridge_display_control` tool, or the CLI:
```bash title="Terminal"
system-bridge client display HDMI-A-2 --brightness 40
system-bridge client display HDMI-A-2 --power off
```
The [`displays`](/api/data/#displays) data reports each display's `brightness` and `power_state`.
- **External monitors** are controlled over DDC/CI, which most monitors support, though some turn it off by default in their own menu. On Linux this needs [ddcutil](https://www.ddcutil.com/), and access to `/dev/i2c-*`, usually by being in the `i2c` group. On Windows it works through the monitor's driver.
- **Built-in laptop panels** use their backlight for brightness. On Linux, System Bridge sets the backlight through logind, so it needs to run in, or as the user of, an active login session.
- **On Hyprland**, displays without DDC/CI, built-in panels included, are turned on and off with Hyprland's DPMS. It only has `on` and `off`, so `standby` and `suspend` turn the display off.
Not every monitor answers DDC/CI. Outside Hyprland, those report `null`, and controlling them returns an error. macOS isn't supported yet.
## Cameras
Set a webcam's controls, such as its brightness, zoom, pan or autofocus, from the [web client](/using/web-client/)'s Cameras page, the API with [`CAMERA_CONTROL`](/api/websocket/control/#camera-control), the [MCP server](/api/mcp/)'s `system_bridge_camera_control` tool, or the CLI:
```bash title="Terminal"
system-bridge client camera control usb-Insta360_Insta360_Link_2C-video-index0 zoom_absolute 200
```
The [`cameras`](/api/data/#cameras) data lists each camera's controls with their ranges and options. Controls can be set while another app is using the camera. Linux only, through V4L2.
With the `cameras.capture` setting on, which is **Take pictures** on the web client's Cameras page, take a picture there, with [`CAMERA_CAPTURE`](/api/websocket/control/#camera-capture), the MCP server's `system_bridge_camera_capture` tool, or the CLI, which saves it as a JPEG, or writes it to the output with `-`:
```bash title="Terminal"
system-bridge client camera capture usb-Insta360_Insta360_Link_2C-video-index0 picture.jpg
```
Pictures are taken at the camera's current size, or at one of its other [`sizes`](/api/data/#cameras), such as with `--size 1920x1080` in the CLI. A camera another app is streaming from through PipeWire is always pictured at that app's size.
Pictures need ffmpeg, and GStreamer's PipeWire plugin to share a camera another app is using through PipeWire.
## Processes
End a process from the [`processes`](/api/data/#processes) data with [`PROCESS_KILL`](/api/websocket/control/#process-control), the [MCP server](/api/mcp/)'s `system_bridge_kill_process` tool, or the CLI:
```bash title="Terminal"
system-bridge client process kill 12345
system-bridge client process kill 12345 --force
```
A process is asked to stop, as closing it would, so it can save first. `--force` ends it straight away. System Bridge can only end processes its own user may, and won't end itself.
## Security
Any client with a key can do all of this, including shutting the machine down. Keep keys private, remove those you no longer use under **Settings > Devices**, and see [privacy and security](/privacy/).
---
# Download and install
Source: https://system-bridge.timmo.dev/install
Download the package for your platform from the [releases page](https://github.com/timmo001/system-bridge/releases).
Each release ships these assets:
- Arch Linux: `system-bridge-*-x86_64.pkg.tar.zst` (stable releases only)
- Debian / Ubuntu: `system-bridge__.deb`
- Fedora / RHEL: `system-bridge-..rpm`
- Flatpak: `system-bridge-.flatpak`
- Linux archive: `system-bridge--linux-x86_64.tar.gz`
- Windows: `system-bridge--setup.exe`
- Windows archive: `system-bridge--windows-x86_64.zip`
The archives hold just the executable, for [mise](https://mise.jdx.dev) and manual installs. Prefer a package where there is one, as the archives don't set up a service, shortcuts or dependencies.
:::note
Stable builds are attached to the releases page. Development builds from the latest `dev` branch are also available as workflow artifacts on the [GitHub Actions runs](https://github.com/timmo001/system-bridge/actions), which require a GitHub account to download.
:::
**Linux**
Install the package that matches your distribution's package manager, or use mise or the archive on any distribution.
**Arch Linux**
Install from the `timmo` pacman repository, which has ready-built, signed packages, or build from the AUR.
**From the pacman repository**
Add its signing key, check the fingerprint is `F94469C08E3B717014E2815FA026A3671E9151DA`, then trust it:
```bash
curl -fsSLO https://packages.timmo.dev/timmo-arch-repo.asc
sudo pacman-key --add timmo-arch-repo.asc
sudo pacman-key --finger F94469C08E3B717014E2815FA026A3671E9151DA
sudo pacman-key --lsign-key F94469C08E3B717014E2815FA026A3671E9151DA
```
Add the repository to `/etc/pacman.conf`, above the other repositories:
```ini title="/etc/pacman.conf"
[timmo]
SigLevel = PackageRequired DatabaseOptional TrustedOnly
Server = https://packages.timmo.dev/$arch
```
For the latest stable release, install `system-bridge`:
```bash
sudo pacman -Syu system-bridge
```
For the development branch, install `system-bridge-git`. It's built from the latest `dev` branch, and rebuilt on every commit that changes the app:
```bash
sudo pacman -Syu system-bridge-git
```
`pacman -Syu` keeps it up to date with the rest of your system. These are unofficial packages, not supported by Arch Linux.
**From the AUR**
The same packages build from source with an AUR helper such as [yay](https://github.com/Jguer/yay). For the latest stable release, use the [system-bridge](https://aur.archlinux.org/packages/system-bridge) package:
```bash
yay -S system-bridge
```
For the development branch, use the [system-bridge-git](https://aur.archlinux.org/packages/system-bridge-git) package. This builds and installs the application from the latest `dev` branch:
```bash
yay -S system-bridge-git
```
**From a release**
Install the `.pkg.tar.zst` from the releases page or downloaded workflow asset directly:
```bash
sudo pacman -U system-bridge-*-x86_64.pkg.tar.zst
```
**Debian / Ubuntu**
Install the `.deb` asset with `apt` so dependencies are resolved automatically:
```bash
sudo apt install ./system-bridge__.deb
```
You can also install it with `dpkg`:
```bash
sudo dpkg -i system-bridge__.deb
```
**Fedora / RHEL**
Install the `.rpm` asset with `dnf`:
```bash
sudo dnf install ./system-bridge-..rpm
```
**Flatpak**
Install the `.flatpak` bundle:
```bash
flatpak install system-bridge-.flatpak
```
Then run it with:
```bash
flatpak run dev.timmo.system-bridge
```
**NixOS**
The repository is a Nix flake that builds System Bridge from source on x86_64 Linux, from the latest `dev` branch. Run it without installing:
```bash
nix run github:timmo001/system-bridge -- backend --open-web-client
```
Or add it to your NixOS configuration as a flake input:
```nix
{
inputs.system-bridge.url = "github:timmo001/system-bridge";
outputs = { nixpkgs, system-bridge, ... }: {
nixosConfigurations. = nixpkgs.lib.nixosSystem {
modules = [
{
environment.systemPackages = [
system-bridge.packages.x86_64-linux.default
];
}
];
};
};
}
```
`system-bridge-full` is the same package with most of the [optional dependencies](#optional-dependencies) added to its `PATH`: `lm_sensors`, `pciutils`, `pipewire`, `pulseaudio` (for `pactl` and `paplay`, which work with PipeWire's `pipewire-pulse` too), `alsa-utils`, `zenity` and `ddcutil`. Use `system-bridge.packages.x86_64-linux.system-bridge-full` instead of `default` to get them, or add whichever you want to `environment.systemPackages` with the plain package.
The rest come from NixOS options, with either package:
- `nvidia-smi` comes with the NVIDIA driver, from `hardware.nvidia` and `services.xserver.videoDrivers = [ "nvidia" ]`, so it always matches the driver that's running.
- Bluetooth devices need `hardware.bluetooth.enable = true`.
- `ddcutil` needs `hardware.i2c.enable = true`, with your user in the `i2c` group.
If you run System Bridge from `systemd.user.services` in your configuration, NixOS gives the service a minimal `PATH`, so it won't find tools from `environment.systemPackages`. Use `system-bridge-full`, or list the tools in the service's `path`.
**mise**
[mise](https://mise.jdx.dev) installs the Linux archive from the latest release, through the [aqua registry](https://github.com/aquaproj/aqua-registry):
```bash
mise use -g aqua:timmo001/system-bridge
```
Pin a version with `aqua:timmo001/system-bridge@`; the archives start at 5.20.0. mise checks the download against the release's [GitHub attestation](https://docs.github.com/actions/security-for-github-actions/using-artifact-attestations). [aqua](https://aquaproj.github.io) itself works too, with `aqua g -i timmo001/system-bridge` and then `aqua i`.
The executable needs `libx11`, `libxtst`, `libxkbcommon` and `libxkbcommon-x11` (`libx11-6`, `libxtst6`, `libxkbcommon0` and `libxkbcommon-x11-0` on Debian / Ubuntu), even without a desktop. Nothing starts it for you: run `system-bridge backend`, or add your own service or autostart entry. See [Running](/running).
**Archive**
Download the archive with the [GitHub CLI](https://cli.github.com) and put `system-bridge` somewhere on your `PATH`:
```bash
gh release download -R timmo001/system-bridge -p '*-linux-x86_64.tar.gz'
tar -xzf system-bridge-*-linux-x86_64.tar.gz -C ~/.local/bin system-bridge
```
Check the download first with `gh attestation verify system-bridge-*-linux-x86_64.tar.gz -R timmo001/system-bridge`.
The executable needs the same libraries as with mise, and nothing starts it for you. See [Running](/running).
**Windows**
**Installer**
Run the `system-bridge--setup.exe` installer to install the application. After installation completes, you can start System Bridge from the Start Menu shortcut.
**mise**
[mise](https://mise.jdx.dev) installs the Windows archive from the latest release, through the [aqua registry](https://github.com/aquaproj/aqua-registry):
```powershell
mise use -g aqua:timmo001/system-bridge
```
Pin a version with `aqua:timmo001/system-bridge@`; the archives start at 5.20.0. aqua itself works too, with `aqua g -i timmo001/system-bridge` and then `aqua i`. mise checks the download against the release's [GitHub attestation](https://docs.github.com/actions/security-for-github-actions/using-artifact-attestations). Nothing starts it for you: run `system-bridge backend`. See [Running](/running).
**Archive**
Download the archive with the [GitHub CLI](https://cli.github.com):
```powershell
gh release download -R timmo001/system-bridge -p '*-windows-x86_64.zip'
Expand-Archive system-bridge-*-windows-x86_64.zip "$env:LOCALAPPDATA\Programs\system-bridge"
```
Add that folder to your `PATH`, and keep the `now-playing` folder beside `system-bridge.exe`, as the [media](/api/data/#media) module needs it. Nothing starts it for you: run `system-bridge backend`. See [Running](/running).
### Code signing policy
Free code signing provided by [SignPath.io](https://about.signpath.io), certificate by [SignPath Foundation](https://signpath.org).
The Windows executable and installer are built from this repository on GitHub Actions and signed through SignPath, so Windows shows SignPath Foundation as the publisher. The NowPlaying helper bundled with them comes from [dotnet-now-playing](https://github.com/timmo001/dotnet-now-playing) and isn't signed.
- Committers and reviewers: [Aidan Timson (timmo001)](https://github.com/timmo001)
- Approvers: [Aidan Timson (timmo001)](https://github.com/timmo001)
Pull requests from anyone else are reviewed by a committer before they're merged, and every release is approved by hand before it's signed.
System Bridge doesn't send any information to other networked systems unless you ask it to, apart from what's listed on [Privacy and security](/privacy).
**macOS**
macOS is not officially supported and has no prebuilt packages. You can still build it from source and test it for yourself.
See [Developing](/developing) for the full build, run, and test workflow from source.
:::note
Please do not submit feedback or bug reports for macOS, as it is not supported. Contributions are welcome if you would like to help improve macOS support.
:::
## Updating
On Linux, System Bridge restarts itself within a minute of a package update replacing it, so the new version runs without you restarting it. Flatpak keeps running the version it started with, so restart System Bridge after updating it there.
The same goes for replacing the Linux executable from an archive by hand. mise installs each version to its own folder instead, so restart System Bridge after `mise upgrade`, and after updating from the Windows archive.
## Optional dependencies
System Bridge reads most hardware metrics directly from the kernel, so these tools aren't required. On Linux, installing them improves detection on some systems:
| Package | Tool | What it adds |
| --- | --- | --- |
| `lm_sensors` (Arch, Fedora), `lm-sensors` (Debian / Ubuntu) | `sensors` | The full set of temperature and fan sensors on some boards. Run `sudo sensors-detect` once to load the relevant modules. |
| `nvidia-utils` | `nvidia-smi` | NVIDIA GPU metrics. Intel and AMD GPUs use the kernel `drm`/`hwmon` interfaces and need nothing extra. |
| `pciutils` | `lspci` | Friendly GPU model names. GPUs are still detected without it, but fall back to a generic name. |
| `pipewire` (Arch), `pipewire-bin` (Debian / Ubuntu), `pipewire-utils` (Fedora) | `pw-dump` | Names the apps using the microphone or camera. Without it, microphone usage falls back to ALSA, which names the sound server instead of the app. |
| `zenity` | `zenity` | The confirmation before **Quit** or **Hide system tray**. Without it, those actions can't be confirmed, so they don't run. |
| `libpulse` (Arch), `pulseaudio-utils` (Debian / Ubuntu, Fedora) | `pactl`, `paplay` | Audio devices and [audio controls](/features/remote-control/#audio), and notification sounds. Needs PulseAudio 16 or later, or PipeWire with `pipewire-pulse`. |
| `alsa-utils` | `aplay` | Notification sounds when `paplay` isn't installed. |
| `bluez` | `bluetoothd` | Bluetooth devices and [Bluetooth controls](/features/remote-control/#bluetooth). |
| `ddcutil` | `ddcutil` | Brightness and power for [external monitors](/features/remote-control/#displays) over DDC/CI. Needs access to `/dev/i2c-*`, usually by being in the `i2c` group. |
The `.deb` and `.rpm` packages recommend `pciutils`, PipeWire, `zenity` and `pulseaudio-utils`, so `apt` and `dnf` install them by default. The Arch package lists all of these as optional dependencies, which `pacman` shows but doesn't install.
The [command prefabs](/features/commands/#prefab-commands) run tools for the desktop you're on, such as `grim` for screenshots. A prefab that can't run says which tools it looks for. [Reading and setting the clipboard](/features/remote-control/#clipboard) needs `wl-clipboard`, or `xclip` or `xsel` on X11.
On Windows, the waiting package update count needs [winget](https://learn.microsoft.com/windows/package-manager/winget/), which Windows 11 includes. Nothing else is needed.
## Power readings on Linux
CPU power, integrated Intel GPU power and, on laptops, system power come from the kernel's RAPL energy counters. Since [CVE-2020-8694](https://nvd.nist.gov/vuln/detail/CVE-2020-8694) the kernel lets only root read them, so the Arch, `.deb` and `.rpm` packages install a udev rule, `60-system-bridge-rapl.rules`, that makes them readable by every local user.
:::warning
Readable counters let local programs measure power use, which CVE-2020-8694 showed can leak data from the CPU, mostly from SGX enclaves. If that matters on your system, delete or override the rule with an empty `/etc/udev/rules.d/60-system-bridge-rapl.rules`. Those readings then stay empty; on battery, system power still comes from the battery.
:::
mise, the archive and Flatpak can't install the rule. Add it yourself, then apply it without a reboot:
```ini title="/etc/udev/rules.d/60-system-bridge-rapl.rules"
SUBSYSTEM=="powercap", KERNEL=="intel-rapl:*|intel-rapl-mmio:*", ACTION=="add|change", RUN+="/bin/chmod a+r /sys%p/energy_uj"
```
```bash
sudo udevadm control --reload
sudo udevadm trigger --subsystem-match=powercap --action=change
```
On NixOS, add the package to `services.udev.packages` as well.
## Next steps
- Start System Bridge: see [Running](/running).
- Monitor and control your system from the [web client](/using/web-client).
- Explore the [CLI](/using/cli) and make [keys](/using/cli#keys).
- Connect it to [Home Assistant](/using/home-assistant).
---
# Docs for agents
Source: https://system-bridge.timmo.dev/llms
These docs are published in forms an agent can read directly, so it can answer questions about System Bridge or write code against it.
| URL | Use |
| --- | --- |
| [`/llms.txt`](https://system-bridge.timmo.dev/llms.txt) | An index of every page, so the agent can pick what it needs |
| [`/llms-full.txt`](https://system-bridge.timmo.dev/llms-full.txt) | Every page in one file |
| `/{page}.md` | One page as Markdown, such as [`/features/commands.md`](https://system-bridge.timmo.dev/features/commands.md) |
| [`/mcp`](https://system-bridge.timmo.dev/mcp) | An MCP server for these docs, with search, page and navigation tools |
They're generated from the docs when the site is built, so they always match it.
## Docs MCP server
Connect an agent to `https://system-bridge.timmo.dev/mcp` with the Streamable HTTP transport. It has `search_docs`, `get_page`, `list_pages` and `get_navigation` tools, and needs no token. For example, with Claude Code:
```bash
claude mcp add --transport http system-bridge-docs https://system-bridge.timmo.dev/mcp
```
Each page's menu also has **Connect to MCP**, with the setup for Claude Code, Codex, Cursor and VS Code, and actions to copy the page as Markdown or open it in a chat.
## The docs MCP server and System Bridge's MCP server
The docs MCP server only reads these docs. System Bridge's own [MCP server](/api/mcp) runs on your machine and lets an agent read live data and control it. Use both to have an agent that knows how System Bridge works and can use it.
---
# Privacy and security
Source: https://system-bridge.timmo.dev/privacy
System Bridge has no accounts, telemetry, analytics or crash reporting, and it never sends your system data anywhere. Clients on your machine or network fetch it from System Bridge, and only with a key. To be found on your local network, System Bridge does share your hostname and IP address there without a key (see [Network discovery](#network-discovery)).
This page lists every way the app communicates, so you can decide what to allow.
## Summary
| Connection | Direction | Where | When |
| --- | --- | --- | --- |
| [API server](#api-server) | Incoming | Port `9170` | Always |
| [Network discovery](#network-discovery) | Both | mDNS | Always |
| [Update check](#update-check) | Outgoing | `api.github.com` | Up to 12 an hour |
| [DNS lookups](#dns-lookups) | Outgoing | Your DNS server | Every minute |
| [Discord](#optional-discord) | Outgoing | `discord.com` | [If set up](/features/discord/) |
"Always" means whenever the backend runs. The API server and network discovery are reachable from your local network. Apart from Discord, which only runs if you set it up, none of these can currently be turned off.
Nothing else leaves your machine unless you ask for it, for example by opening a URL.
## API server
The backend listens on port `9170` on every network interface, so other devices on your network can reach it. Change the port with `SYSTEM_BRIDGE_PORT`.
The API uses plain HTTP and WebSocket, without TLS. Anyone who can see your network traffic can read the data and the keys as they pass. Use it on networks you trust, or put it behind a TLS proxy or VPN.
### What needs a key
Each client has its own [key](/api/#authentication), from pairing or made by hand, listed under **Settings > Devices** in the web client. A key is shown once, when it's made. System Bridge keeps only its SHA-256 hash, in the `keys.json` file in the [settings directory](/running/#file-locations), which only your user can read. Remove a client's key to sign it out. Keys are never logged.
These need no key, and only show that System Bridge is running:
- `/api`: a fixed status message.
- `/api/health`: the status, current time and System Bridge version.
- The [web client](/using/web-client/) files. The web client asks for a key before it shows any data.
Everything else needs a key:
| Endpoint | How the key is sent |
| --- | --- |
| HTTP routes, such as `/api/data/{module}` and `/api/quit` | `Authorization: Bearer` header |
| `/api/media/file/data` | No key: a URL System Bridge signs for one file, which only reads that file until it expires |
| `/api/websocket` | The first message, `{"type": "auth", "key": "..."}`. A wrong key closes the connection, as does no valid message within 10 seconds. |
| `/api/mcp` | `Authorization: Bearer` header, or the `key` query parameter for clients that only take a URL. System Bridge never logs that URL, and **Settings > Devices** marks each key that has been sent in one. |
The WebSocket and MCP endpoints accept connections from any web origin, so the key is their only protection.
Before keys, every client used one shared API token, a random UUID in the `token` file. Until it's removed in a later release, it still works where it did, including in the `X-API-Token` header, each WebSocket message's `token` field and the `token` query parameter of the MCP and media file endpoints, and a client can [trade it for its own key](/api/keys#exchange-the-api-token).
### What a client with a key can do
Every key can do everything, so treat each like a password. A client with one can:
- Read every [data module](/api/data/). These include your hostname, IP and MAC addresses, logged-in users, running processes, what's playing, which apps are using your camera or microphone, and your Discord voice state and latest notification.
- List files and read file details anywhere your user can access, starting from your user directories and any media directories you add.
- Download media files from your user directories and media directories.
- Open any file your user can access, open URLs, send notifications, and type keys and text.
- Run commands from your command allowlist, and nothing else. The allowlist is empty by default.
- Lock, sleep, restart or shut down your machine, or log you out.
- Read and change System Bridge settings.
- Mute, deafen, change volumes, toggle your camera and screenshare, and play soundboard sounds in Discord, if you've set it up.
System Bridge only sends system data to clients that have connected with a key and asked for it.
## Network discovery
System Bridge announces itself on your local network over mDNS so apps like [Home Assistant](/using/home-assistant/) can find it. These messages stay on your local network and aren't routed to the internet.
System Bridge advertises the `_system-bridge._tcp` service with your hostname, IP addresses, API port and system UUID, and answers mDNS queries for it. Home Assistant uses these to find it and tell machines apart.
The `system-bridge client discovery` command also sends mDNS queries for `_system-bridge._tcp` and `_http._tcp` to find other System Bridge instances.
## Update check
The `system` module reports whether a newer version is available. To find out, System Bridge requests the latest release from:
```text
https://api.github.com/repos/timmo001/system-bridge/releases/latest
```
- The request is a plain `GET` with Go's default `User-Agent`. It sends no version, identifier or system data.
- The result is cached for 5 minutes, so the request runs about 12 times an hour at most, with a hard limit of 30.
- GitHub sees your public IP address, as with any web request.
- The request uses the proxy in your `HTTPS_PROXY` environment variable, if set.
When you open **What's new** in the web client, System Bridge also requests the newest release notes from:
```text
https://api.github.com/repos/timmo001/system-bridge/releases?per_page=10
```
This request is the same kind of plain `GET`, through the same proxy. Its result is cached for 6 hours, and it only runs when a client asks for the notes.
## DNS lookups
When it updates the `system` module, System Bridge looks up your machine's full domain name: it looks up your hostname, then does a reverse lookup on the addresses it gets back. These lookups go to the DNS server your system uses.
To find your main IPv4 and IPv6 addresses, System Bridge asks the operating system which local address it would use to reach `8.8.8.8` and `2001:4860:4860::8888`. It does this with a UDP connect, which sends no packets, so nothing reaches those addresses.
## Local-only features
These only talk to your operating system and other apps on your machine:
- Media status and control use your system's media controls.
- Notifications use your desktop's notification system.
- Keyboard input, power actions, and opening files and URLs go through your operating system. Opening a URL launches your default browser, which then loads the page.
- The **Documentation** item in the system tray opens this site in your browser.
- The [CLI](/using/cli/) only connects to the backend on `127.0.0.1`.
## Data stored on your machine
System Bridge keeps these files in the [settings directory](/running/#file-locations):
| File | Contents |
| --- | --- |
| `settings.json` | Your settings, including the command allowlist and media directories |
| `keys.json` | Each client's name, kind, key hash, when it was made and last used, and when its key was first sent in a URL. Never the keys. Readable only by your user |
| `owner-key` | The owner key the CLI signs in with, readable only by your user |
| `token` | The old shared API token, until it's removed. Readable only by your user |
| `data/{module}.json` | The latest data for each module, rewritten on every update |
| `data/history.json` | Up to the last 24 hours of the readings the web client graphs, such as CPU, memory, temperatures and network rates, saved every 5 minutes. Readable only by your user |
| `discord.json` | Your Discord application's credentials, if you set up Discord. Readable only by your user when saved from the web client or the API |
| `discord-token.json` | Your Discord access token, readable only by your user |
The web client stores the host, port and its key in your browser's local storage, along with the graphs' time range. When System Bridge opens the web client for you, the host, port and a one-time pairing code are passed in the URL, and the page trades the code for its own key, then takes them off the address. The code works once, for 5 minutes.
### Logs
System Bridge writes one log file a day to the [logs directory](/running/#file-locations). Only your user can read them, and they're deleted after 7 days.
The default `WARN` level only logs warnings and errors. If you raise it to `INFO`, logs also include:
- The contents of notification, open, command, power and settings requests.
At `DEBUG`, logs also include the contents of other requests, such as the text in keyboard text requests.
Discord setup requests are never logged with their contents, so your Discord client secret stays out of the logs at every level. The backend never sends the secret back to clients either, and the Python connector hides it in its own logs.
Logs stay on your machine, and never hold a key, a pairing code or the API token. Before you share them in a bug report, check them for anything else you'd rather keep private.
## Optional: Discord
Nothing happens until you save your Discord application in the web client or create `discord.json` in the settings directory. Until then, System Bridge only checks for that file every 30 seconds. It doesn't connect to Discord, and the `discord` module doesn't exist.
Once you've set it up:
- System Bridge connects to the Discord desktop app through its local socket, or a named pipe on Windows. This connection stays on your machine. System Bridge uses it to read and change your voice settings, camera and screenshare, play soundboard sounds, and read your latest notification.
- When you first authorise, and whenever the access token expires, System Bridge sends a request to `https://discord.com/api/oauth2/token`. The request contains your application's client ID and client secret, plus the authorisation code or refresh token. Discord replies with an access token.
- The access token is stored in `discord-token.json` in the settings directory, and only your user can read it. Delete it to authorise again.
### Discord permissions
When you authorise, Discord asks you to grant these scopes:
| Scope | What System Bridge uses it for |
| --- | --- |
| `rpc` | Reading your voice settings and call, joining, leaving and opening channels, changing your mute, deafen, volume and voice settings, and changing other users' volume and mute for you |
| `rpc.voice.write` | Playing soundboard sounds |
| `rpc.video.read`, `rpc.video.write` | Reading whether your camera is on, and turning it on or off |
| `rpc.screenshare.read`, `rpc.screenshare.write` | Reading whether you're sharing your screen, and starting or stopping it |
| `rpc.notifications.read` | Reading your latest Discord notification: its channel, title, body and icon |
If an update adds a scope, Discord asks you to authorise again.
What Discord does with these requests is covered by [Discord's privacy policy](https://discord.com/privacy).
---
# Running
Source: https://system-bridge.timmo.dev/running
## Linux
### Desktop
If you installed System Bridge from a Linux package (deb, rpm, Arch or Flatpak), an application menu entry called "System Bridge" is added during installation. Launch it from your desktop's app launcher to start the backend and open the [web client](/using/web-client/).
### Terminal
You can launch the app via the terminal:
```bash
system-bridge backend
```
### Autostart
To start System Bridge automatically when you log in, you have a couple of options:
- **Autostart desktop file:** Enable autostart in the application settings, which writes `~/.config/autostart/system-bridge.desktop`. You can also create this file yourself:
```ini title="~/.config/autostart/system-bridge.desktop"
[Desktop Entry]
Name=System Bridge
Comment=System Bridge
Exec=system-bridge backend
Icon=system-bridge
Type=Application
Categories=Utility;
X-GNOME-Autostart-enabled=true
```
- **Compositor autostart:** If your window manager or compositor handles its own startup, add `system-bridge backend` to its autostart configuration instead. For Hyprland, see the [Hyprland autostart docs](https://wiki.hypr.land/Configuring/Basics/Autostart/).
:::tip
For a service that survives logout and restarts on failure, use a user systemd service (see [User service](#user-service-recommended) below) instead.
:::
### Systemd
:::caution
Not supported with Flatpak.
You will need to configure the service
manually to the correct path.
:::
#### User service (recommended)
Run System Bridge as a user service so it shares your login session. This gives it access to your display, audio, notifications and media, and it reads its configuration from your home directory without any extra setup.
The Arch packages (`system-bridge` and `system-bridge-git`) ship this service for your desktop session, so you only need to enable it. Each upgrade restarts it while it's running:
```bash
systemctl --user enable --now system-bridge
```
On other installs, set it up yourself:
1. Create a user service file at `~/.config/systemd/user/system-bridge.service`:
```ini title="~/.config/systemd/user/system-bridge.service"
[Unit]
Description=System Bridge
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/system-bridge backend
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
```
:::note
Adjust `ExecStart` if `system-bridge` is installed somewhere other than `/usr/bin` (for example a manual install under `~/.local/bin`). Check the path with `which system-bridge`.
:::
2. Reload the user systemd daemon:
```bash
systemctl --user daemon-reload
```
3. Enable and start the service:
```bash
systemctl --user enable --now system-bridge
```
4. Check the service status:
```bash
systemctl --user status system-bridge
```
To follow the logs:
```bash
journalctl --user -u system-bridge -f
```
:::tip
User services only run while you are logged in. To keep System Bridge running at boot and after you log out, enable lingering for your user:
```bash
sudo loginctl enable-linger $USER
```
:::
#### System service
For headless or multi-user setups, you can run System Bridge as a system-wide service managed by root.
1. Create a systemd service file at `/etc/systemd/system/system-bridge.service`:
```ini title="/etc/systemd/system/system-bridge.service"
[Unit]
Description=System Bridge
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/system-bridge backend
Restart=on-failure
RestartSec=5
StandardOutput=journal
StandardError=journal
SyslogIdentifier=system-bridge
Environment="HOME=/root"
[Install]
WantedBy=multi-user.target
```
:::caution
The `Environment="HOME=/root"` setting is required for System Bridge to locate its configuration directory. Without this, the service will fail to start with a configuration path error.
:::
2. Reload the systemd daemon:
```bash
sudo systemctl daemon-reload
```
3. Enable and start the service:
```bash
sudo systemctl enable --now system-bridge
```
4. Check the service status:
```bash
sudo systemctl status system-bridge
```
### Keys
Each client connects with its own [key](/api/#authentication). Pair the Android app, make a key under **Settings > Devices** in the web client, or make one on the computer with:
```bash
system-bridge client key create "My script"
```
:::note
Keys are stored per user, so run this command as the same user that runs the backend. If you run System Bridge as a system service under root, switch to that user first:
```bash
sudo su -
system-bridge client key create "My script"
```
:::
See [keys in the CLI](/using/cli/#keys) for listing and removing them, and the owner key the CLI uses. The old shared API token still works until it's removed in a later release: print it with `system-bridge client token`.
## Windows
After installation, System Bridge can be started from the Start Menu shortcut that gets created during installation. Look for "System Bridge" in your Start Menu.
:::note
The Start Menu shortcut may not appear immediately after installation until Windows indexes it. If you cannot find it, try searching for "System Bridge" in the Start Menu or restart Windows Explorer.
:::
Alternatively, you can start System Bridge from a terminal:
```powershell
cd "C:\Program Files\System Bridge"
.\system-bridge.exe backend
```
:::caution
Simply double-clicking `system-bridge.exe` will not start the application visibly. You must use the `backend` command or the Start Menu shortcut.
:::
You can enable autostart in the settings. This may require restarting the application to apply.
## macOS
:::caution
macOS is not officially supported. There are no prebuilt packages, so you need to [build it from source](/install/) first.
:::
Once built, start System Bridge from a terminal:
```bash
system-bridge backend
```
## Configuration
### Environment variables
System Bridge reads the following environment variables at startup. All are optional and fall back to the defaults below.
| Variable | Default | Description |
| --- | --- | --- |
| `SYSTEM_BRIDGE_PORT` | `9170` | Port for the HTTP and WebSocket API. Must be between `1` and `65535`; invalid values fall back to the default. |
| `SYSTEM_BRIDGE_CONFIG_DIR` | Per-OS path (see [File locations](#file-locations)) | Absolute path to override the directory holding settings, keys and stored data. |
| `SYSTEM_BRIDGE_LOG_DIR` | Per-OS path (see [File locations](#file-locations)) | Absolute path to override the directory where log files are written. |
:::note
`SYSTEM_BRIDGE_CONFIG_DIR` and `SYSTEM_BRIDGE_LOG_DIR` must be absolute paths, otherwise the backend fails to start.
:::
When running as a systemd service, set variables with `Environment=` lines in the unit file, for example:
```ini
[Service]
Environment="SYSTEM_BRIDGE_PORT=9171"
```
### File locations
By default, settings, keys and logs are stored in per-user directories:
| Platform | Settings / keys / data | Logs |
| --- | --- | --- |
| Linux | `~/.local/share/system-bridge/v5/` | `~/.local/state/system-bridge/YYYY-MM-DD.log` |
| Windows | `%LOCALAPPDATA%\system-bridge\v5\` | `%LOCALAPPDATA%\system-bridge\logs\YYYY-MM-DD.log` |
| macOS | `~/Library/Application Support/system-bridge/v5/` | `~/Library/Logs/system-bridge/YYYY-MM-DD.log` |
The settings directory holds `keys.json`, with a hash of each client's key, and `owner-key`, the key the CLI signs in with. The old shared API token is in a `token` file there until it's removed in a later release. See [Data stored on your machine](/privacy/#data-stored-on-your-machine) for every file. Override these locations with `SYSTEM_BRIDGE_CONFIG_DIR` and `SYSTEM_BRIDGE_LOG_DIR`.
### Discord
System Bridge can show and change your Discord voice settings once you connect it to the Discord desktop app with your own Discord application. See [Discord](/features/discord/) to set it up. Its files, `discord.json` and `discord-token.json`, are kept in the settings directory above.
## Next steps
- Open the [web client](/using/web-client/) to monitor and control your system.
- Use the [CLI](/using/cli/) and make [keys](/using/cli/#keys).
- Connect to the [API and WebSocket](/api/) to read data and control your system.
- Integrate with [Home Assistant](/using/home-assistant/).
---
# Android app
Source: https://system-bridge.timmo.dev/using/android
The System Bridge app puts each paired computer's [web client](/using/web-client/) on your phone, and adds what a phone does best: notifications while the app is closed, media controls on the lock screen, quick settings tiles, shortcuts, and sharing to the computer.
## Installing
The app isn't on Google Play. Install it in one of these ways:
- **F-Droid**: add the repository `https://android.timmo.dev/repo` in F-Droid or a client such as Droid-ify, then install **System Bridge**. It updates with every System Bridge release.
- **Obtainium**: add `https://github.com/timmo001/system-bridge`, and it installs the APK from each release.
- **Directly**: download `system-bridge-.apk` from the [latest release](https://github.com/timmo001/system-bridge/releases/latest) and open it.
It needs Android 14 or later.
:::warning
If you have the old System Bridge app from Google Play, uninstall it first. The new app is signed with a different key, so Android won't install it over the old one.
:::
## Pairing a computer
Pairing gives the phone its own key to the computer, so anyone with the phone can control the computer, as with any client that has a key. To stop a phone connecting, remove its key under **Settings > Devices** in the web client. A phone paired before keys trades the old API token for its own key the next time it opens.
On Android 17, the app asks for **local network access** first. It needs it to reach the computer at all. If you refuse, the app explains why and asks again when you tap **Allow**.
Then pair in one of three ways:
1. **Scan the QR code**
On the computer, open the web client, go to **Settings**, **Devices**, and select **Make a pairing code**. In the app, tap **Scan the code** and point the camera at it. A code works once, for 5 minutes.
2. **Pick it from your network**
Tap **Look for computers** to list those running System Bridge on your network, then **Use** one to fill in its address. Add a key for the phone, which you can make with `system-bridge client key create "My phone"`, or under **Settings > Devices** in the web client.
3. **Enter it yourself**
Type the computer's address, port (`9170`) and a key for the phone.
Once paired, the app opens the computer's web client.
## Several computers
Pair as many computers as you like. In the app, **Computers** in the header opens the list: tap one to switch to it, or use its **⋮** menu to edit its name, address or token, or remove it. Pair another from the same page. It takes the place of the web client's connection page, which the app doesn't show. The tiles and media controls act on the computer that's open.
Swipe down at the top of a page to reload it. When the computer can't be reached, the same swipe tries it again.
## Notifications
Open **Settings**, **Devices** in the app and turn on **Get pushes**. The computer then pushes to the phone, even with the app closed, through [UnifiedPush](https://unifiedpush.org/). Install a distributor app such as [ntfy](https://f-droid.org/packages/io.heckel.ntfy/) to receive them. Without one, the app falls back to Firebase, which needs Google Play services, so on a phone without them you won't get pushes until you install a distributor. Choose which of these you get:
- **Notifications**: the [notifications](/features/notifications/) System Bridge shows on the computer. Off until you turn it on.
- **Updates**: when a new System Bridge release is out
Each notification names the computer it came from. In the phone's notification settings for the app, each computer has its own group, with **Notifications** and **Updates** in it, so you can silence one computer, or just its updates. A notification's buttons show on the phone too, and pressing one presses it on the computer. When you close the notification on the computer, it goes from the phone as well; one that only times out there stays. Buttons and closing follow the computer's own notifications, which only Linux has.
Each phone chooses for itself. **Devices getting pushes** on the same page lists every phone and browser, with **Remove** to stop pushing to it.
## Media controls
Turn on **Media controls** under **This phone** on the **Computers** page to show what's playing on the current computer in the notifications and on the lock screen, with play, pause, skip and seek where its player allows them. Tap them to open the computer's **Media** page.
They start when you open the app and stay connected while something plays. After 10 minutes with nothing playing, or when the computer can't be reached, they stop until you next open the app.
## Tiles
Add these tiles to quick settings to control a computer without opening the app. Each tile shows the computer's name.
- **Lock** and **Sleep** lock the current computer or put it to sleep, and show whether it worked.
- **Keep awake**, **Mute** and **Play/pause** show whether the current computer is kept awake, its default output is muted, or it's playing media, and a tap switches it. A tile is unavailable when the computer can't say, such as keep awake on a computer that doesn't support it.
- **Send clipboard** copies the phone's clipboard to the computer's. With more than one computer paired, it goes to the one in use, the one you were last active on. Copying to the clipboard works on Linux.
## Shortcuts
Long press the app's icon for the pages you open most, across your computers, with recent visits counting for more. Until there are enough, it shows a starting set from the computer that's open. With more than one computer paired, each names its computer.
To keep a page on the home screen, open it and tap **Add to home screen** in its header. A shortcut finds its computer even when its address changes. Removing a computer greys out its shortcuts.
## Sharing
Share a link or text from any app to System Bridge. A link asks whether to open it on the computer or copy it to its clipboard; plain text goes straight to the clipboard. Copying to the clipboard works on Linux.
Each computer also has its own entry in the share sheet's row of direct targets, which sends to that computer. Shared to the app itself, with more than one computer paired, it goes to the one in use, the one you were last active on, and **Send to** lets you pick another.
## Theme
The app offers your phone's colours as a theme, under **Phone** in the theme picker, beside System Bridge's own.
## Without the app
The web client also installs as an app from the browser, and gets the same notifications, when you reach it over HTTPS. Browsers only allow both on secure addresses, so over plain HTTP on your network, use the Android app instead.
---
# CLI
Source: https://system-bridge.timmo.dev/using/cli
The System Bridge CLI provides commands to interact with the System Bridge backend. Most commands live under the `system-bridge client` subcommand, while `backend`, `agent`, `version` and `completions` are top-level commands. Running `system-bridge` without a subcommand shows help.
## Keys
Each client signs in with its own [key](/api/#authentication). Make one for a client, such as a script or another app, with:
```bash
system-bridge client key create "My script"
```
The key is printed once. Copy it then, as System Bridge keeps only its hash. List the clients with a key, or remove one by its id, with:
```bash
system-bridge client key list
system-bridge client key remove {id}
```
The CLI signs itself in with the owner key, which System Bridge writes to the `owner-key` file in the [settings directory](/running/#file-locations) on first start. If it's lost, or removed from the list, make a new one with:
```bash
system-bridge client key owner --replace
```
:::note
Keys are stored per user, so run these commands on the computer, as the same user that runs the backend. If you run System Bridge as a system service under root, switch to that user first:
```bash
sudo su -
system-bridge client key list
```
:::
### Token
Before keys, every client used one shared API token. It still works until it's removed in a later release, so a client that has it can [trade it for its own key](/api/keys#exchange-the-api-token). Print it with:
```bash
system-bridge client token
```
## Remote computers
The `client` and `agent` commands can call another computer's System Bridge instead of this one's. Pair with it first, the same way as a phone: make a one-time code under **Settings > Devices** in that computer's web client, or with `system-bridge client remote code` there, and pass its link to:
```bash
system-bridge client remote pair 'http://desk.local:9170/?ip=192.168.1.5&pair=MZXW6YTBOI4DQNZXGQ2DGMBQGE3TSNBR'
```
The code works once, for 5 minutes. It's traded for a key of this computer's own, listed under **Settings > Devices** there, and kept with the computer's address in the `remotes.json` file in the [settings directory](/running/#file-locations), which only you can read. With only the code, give the address too, with `--host`, and `--port` or `--ssl` if they differ from `9170` over HTTP. Pairing the same computer again replaces its key.
Then add `--remote` with its name, address or ID to send a command there:
```bash
system-bridge client --remote desk clipboard get
system-bridge client data watch --module cpu --remote desk
```
Or set `SYSTEM_BRIDGE_REMOTE` to send every command there. List and forget paired computers with:
```bash
system-bridge client remote list
system-bridge client remote remove desk
```
Forgetting one leaves its key on that computer until you remove it under **Settings > Devices**. If that key is removed, pair again.
`client key`, `client token`, `client quit` and `client data run` only work on this computer, so they refuse `--remote`. `client data list` lists this build's modules.
## Notification
To send a notification, use the following command:
```bash
system-bridge client notification --title "Title" --message "Message" --icon "icon-name"
```
Available flags:
- `--title`: The title of the notification (default: "System Bridge")
- `--message`: The message of the notification (default: "Hello, world!")
- `--icon`: The icon of the notification (default: "system-bridge")
- `--sound`: Path to a sound file to play with the notification (Linux only)
- `--action-url`: URL to open when the notification is clicked (Linux only)
- `--action-path`: File/folder path to open when the notification is clicked (Linux only)
## Web client
Open the web client in your browser, already connected to this system:
```bash
system-bridge client open
```
It asks the running backend for a one-time [pairing code](/api/pairing), signed in with the owner key, and opens the web client with it. The page trades the code for a key of its own, listed under **Settings > Devices**, so opening it again in the same browser replaces that key rather than adding another.
Add `--settings` to open General Settings, or `--path` to open any page, including a section of one:
```bash
system-bridge client open --path /media#media-controls
```
With `--remote`, it opens a [paired computer's](#remote-computers) web client instead.
## Quit
Quit the local backend. It asks for confirmation first, unless you add `--yes`:
```bash
system-bridge client quit --yes
```
## Audio
Set an output's or input's volume in percent, mute or unmute it, or make it the default:
```bash
system-bridge client audio alsa_output.pci-0000_00_1f.3.analog-stereo --volume 40 --mute=false
```
The id is the device's `id` from the [`audio`](/api/data/#audio) data. Use `--mute` to mute it and `--default` to make it the default output or input. See [audio](/features/remote-control/#audio) for what each platform supports.
## Bluetooth
Connect, disconnect or forget a paired device, or turn Bluetooth on or off:
```bash
system-bridge client bluetooth connect 80:C3:BA:7B:93:4E
system-bridge client bluetooth disconnect 80:C3:BA:7B:93:4E
system-bridge client bluetooth forget 80:C3:BA:7B:93:4E
system-bridge client bluetooth power on
```
The address is the device's `address` from the [`bluetooth`](/api/data/#bluetooth) data. See [Bluetooth](/features/remote-control/#bluetooth) for what each platform supports.
## Clipboard
Put text on the backend system's clipboard, as an argument or piped in:
```bash
system-bridge client clipboard set "Some text"
echo "Some text" | system-bridge client clipboard set
```
It needs wl-clipboard on Wayland, or xclip or xsel on X11. Linux only.
## Commands
List the [commands](/features/commands/) on your list and the prefabs, and run one by its ID:
```bash
system-bridge client command list
system-bridge client command prefabs
system-bridge client command run 9ef69bc3-62f8-4d86-952d-5f498bbddf0f
```
`run` waits for the command to finish, prints its output, and exits with its exit code, so scripts can check it. Add `--json` to `list` or `prefabs` for JSON.
Add a command with a name and the program's full path, followed by its arguments after `--`, or from a prefab. Change one by its ID, giving only what changes, or remove it:
```bash
system-bridge client command add --name "Restart audio" -- /usr/bin/systemctl --user restart pipewire
system-bridge client command add --name "Lock" --prefab lock
system-bridge client command update 9ef69bc3-62f8-4d86-952d-5f498bbddf0f --name "Restart sound"
system-bridge client command remove 9ef69bc3-62f8-4d86-952d-5f498bbddf0f
```
`add` and `update` print the command with its ID, or the saved command with `--json`. With `update`, a program after `--` replaces the program and its arguments. System Bridge checks the program and working directory as it does in the [web client](/features/commands/#adding-a-command).
## Desktop
Focus, close or change a window, show a workspace, or switch the keyboard layout:
```bash
system-bridge client desktop focus 0x555dbf21c9e0
system-bridge client desktop close 0x555dbf21c9e0
system-bridge client desktop state 0x555dbf21c9e0 --fullscreen --maximised=false
system-bridge client desktop workspace 2
system-bridge client desktop layout us
```
The ids are the window and workspace `id`s from the [`desktop`](/api/data/#desktop) data. `state` takes `--fullscreen`, `--maximised` and `--minimised`, each turned off with `=false`. See [desktop](/features/remote-control/#desktop) for what each desktop supports.
## Discord
Control Discord voice, once [Discord is set up](/features/discord/):
```bash
system-bridge client discord toggle_mute
```
Actions that need nothing else work here, such as `mute`, `unmute`, `toggle_mute`, `deafen`, `undeafen`, `toggle_deafen`, `leave_voice_channel`, `toggle_video` and `toggle_screenshare`. Use the web client or the API for actions that take a channel, user, device or value.
## Displays
Set a display's brightness in percent, its power state, or both:
```bash
system-bridge client display HDMI-A-2 --brightness 40 --power on
```
The id is the display's `id` from the [`displays`](/api/data/#displays) data. The power state is one of `on`, `standby`, `suspend` or `off`. See [displays](/features/remote-control/#displays) for what each display supports.
## Hyprland
On Hyprland, float, pin, place, resize or kill a window, move it to another workspace, run a dispatcher on the focused window, trigger a global shortcut an app registered, rename a workspace or move it to another display, switch the submap, read or set any config option, read or move the cursor, read the log, send a custom event, or reload the config:
```bash
system-bridge client hyprland set 0x555dbf21c9e0 --floating --pinned
system-bridge client hyprland set 0x555dbf21c9e0 --floating --x 100 --y 100 --width 800 --height 600
system-bridge client hyprland kill 0x555dbf21c9e0
system-bridge client hyprland move 0x555dbf21c9e0 2
system-bridge client hyprland dispatch swap_window right
system-bridge client hyprland shortcut omarchy:panel.omarchy.clock
system-bridge client hyprland workspace rename 2 Music
system-bridge client hyprland workspace move 2 HDMI-A-1
system-bridge client hyprland submap resize
system-bridge client hyprland option general.col.active_border
system-bridge client hyprland option animations.enabled false
system-bridge client hyprland cursor
system-bridge client hyprland cursor 960 540
system-bridge client hyprland log
system-bridge client hyprland event dock
system-bridge client hyprland reload
```
`set` takes `--floating` and `--pinned`, each turned off with `=false`, `--x` and `--y` to place the window, and `--width` and `--height` to size it, in pixels. `kill` ends the window's app without asking it to close. The dispatcher is one of `center_window`, `cycle_next_window`, `cycle_previous_window`, `group_next`, `group_previous`, `lock_group`, `lock_groups`, `move_focus`, `swap_window`, `toggle_group`, `toggle_split`, `unlock_group` or `unlock_groups`, and `move_focus` and `swap_window` take `down`, `left`, `right` or `up`. `--window` focuses a window first and runs the dispatcher on it. Shortcut names are in the [`desktop`](/api/data/#desktop) data's `hyprland.global_shortcuts`. `submap` with no name goes back to the default. `option` prints any config option by its name, such as `general.gaps_in` or `general:layout`, and with a value sets it until the config reloads. See [options](/api/websocket/control/#options) for the values each type takes. `cursor` prints the pointer's position, or moves it to x and y in pixels across every display.
With the `desktop.hyprlandCode` setting on, run a command through Hyprland, any dispatch written as the running config takes it, or a line of Lua with a Lua config. See [running code](/api/websocket/control/#running-code):
```bash
system-bridge client hyprland exec kitty
system-bridge client hyprland raw 'hl.dsp.focus({ workspace = "2" })'
system-bridge client hyprland eval 'hl.notification.create({ text = "Hi" })'
```
## Omarchy
While the Omarchy shell runs, open, close or toggle its menu or a panel:
```bash
system-bridge client omarchy menu open capture
system-bridge client omarchy menu close
system-bridge client omarchy panel toggle omarchy.audio
```
The action is `open`, `close` or `toggle`. Closing the menu needs no id. Menu and panel ids are in the [`desktop`](/api/data/#desktop) data's `omarchy`, and a menu also opens by one of its aliases.
## Media
Control what's playing on the backend's system:
```bash
system-bridge client media pause
system-bridge client media seek 90
system-bridge client media set_volume 0.5 --player vlc
```
The action is one of `play`, `pause`, `next`, `previous`, `stop`, `volume_up`, `volume_down` or `mute`. On Linux, it can also be `seek` with seconds, `set_volume` with 0-1, `set_shuffle` with `true` or `false`, or `set_repeat` with `none`, `track` or `list`. `--player` takes a player's `id` from the [`media`](/api/data/#media) data's `players`; without it, the action goes to the player the data describes.
## Processes
End a process by its id from the [`processes`](/api/data/#processes) data:
```bash
system-bridge client process kill 12345
system-bridge client process kill 12345 --force
```
It's asked to stop, so it can save first. `--force` ends it straight away.
## System
Switch the power profile to one of the [`system`](/api/data/#system) data's `power_profiles`:
```bash
system-bridge client system power-profile performance
```
This needs power-profiles-daemon, or tuned-ppd on Fedora. Linux only.
Keep the system from idling, for a while or until you turn it off:
```bash
system-bridge client system keep-awake on --for 2h
system-bridge client system keep-awake off
```
On Omarchy this is the bar's stay awake switch. Linux only.
## Discovery
### List Services
To list discovered services on the network, run:
```bash
system-bridge client discovery list
```
This will scan for available System Bridge instances and display them with their hostname, IP, port, and type.
## Data
### List Modules
To list all available data modules, run:
```bash
system-bridge client data list
```
By default, this outputs as a simple list. You can also use:
```bash
system-bridge client data list --json
```
To output as a JSON array.
Available flags:
- `--json`: Output as a JSON array
- `--table`: Output as a table (default)
### Run Modules
To run a specific data module and get its data as JSON, use:
```bash
system-bridge client data run --module cpu
```
For example, to get CPU data:
```bash
system-bridge client data run --module cpu
```
To run all modules and get a JSON object with all data:
```bash
system-bridge client data run --all
```
To pretty-print the JSON output:
```bash
system-bridge client data run --module cpu --pretty
```
Available flags:
- `--module` or `-m`: Module name (e.g., cpu, memory)
- `--all`: Run all modules
- `--pretty`: Pretty-print JSON output
### Watch Modules
To stream module updates from the running backend, repeat `--module` or `-m` for each module:
```bash
system-bridge client data watch --module cpu --module memory
```
The command signs in to the local backend with the owner key. Each `DATA_UPDATE` response is written to standard output as one line of newline-delimited JSON (NDJSON). The key is never written to standard output.
The `--module` flag is required and may be repeated. Unknown module names are rejected before connecting. Stop the stream with Ctrl+C; the client closes the WebSocket normally and does not reconnect.
## History
### Export History
The backend keeps up to the last 24 hours of the readings it graphs. To export them from the running backend:
```bash
system-bridge client history export --output history.csv
```
Available flags:
- `--format` or `-f`: `csv` (the default) or `json`
- `--since` or `-s`: Only readings from this long ago, such as `1h` or `30m`
- `--module` or `-m`: Only this module's readings. Repeat it for more. History is kept for `cpu`, `memory`, `battery`, `system`, `networks`, `disks`, `gpus` and `sensors`
- `--output` or `-o`: Write to this file instead of standard output
For example, the last 6 hours of CPU and GPU readings as JSON:
```bash
system-bridge client history export --module cpu --module gpus --since 6h --format json
```
The CSV has a row per reading with the columns `time`, `metric`, `id`, `value` and `unit`. Times are in UTC, and `id` names the GPU, disk, sensor or fan for the readings that have one. The JSON is the history as the [`GET_HISTORY`](/api/websocket/data/#getting-history) event returns it. The web client has the same export in the Export menu on the overview and on each module's page. It lists every module with history as a checkbox, ticked to start for the modules that page graphs: all of them on the overview, and the page's own module elsewhere, plus the CPU and GPUs on the System page, whose power graph shows theirs too. The TypeScript and Python connectors can write the same CSV.
## Diagnostics
To see how the running backend is doing, for a bug report:
```bash
system-bridge client diagnostics
```
It prints the [`GET_DIAGNOSTICS`](/api/websocket/data/#getting-diagnostics) reply as indented JSON: the version, platform, when the backend started, each data module's failures and last error, a summary of the settings and up to the last 20 warnings and errors. Your home directory shows as `~` and your user name as ``, so it's safe to share.
## Backend
To run the backend server, use:
```bash
system-bridge backend
```
Add `--open-web-client` to open the [web client](/using/web-client/) once the backend has started:
```bash
system-bridge backend --open-web-client
```
See [Running](/running/) for autostart and service setup.
## Agent
The top-level `agent` commands are for agent plugins, such as the [OpenCode plugin](/api/mcp/#opencode-plugin). They expose the [MCP server's tools](/api/mcp/#tools) without the `system_bridge_` prefix:
```bash
system-bridge agent tools --json
echo '{"modules":["cpu"]}' | system-bridge agent call get_data
```
`agent tools` prints every tool with its input schema and whether it only reads, and whether this machine has an owner key, without needing the backend. `agent call` checks the input against the tool's schema, runs it on the local backend and prints its result as JSON.
Add `--remote`, or set `SYSTEM_BRIDGE_REMOTE`, to run the tools on a [paired computer](#remote-computers) instead. `agent tools` then names it in `remote`, and each tool's `argv` keeps the `--remote`. Without it, `agent tools` lists the paired computers in `remotes`, and the OpenCode plugin adds a `remote` input to every tool, so one session can reach this computer and each paired one. Setting the variable where OpenCode starts points the whole `system-bridge` namespace at one computer instead. The tools are this build's, so a computer on an older release may not have them all.
## Version
To get the version of System Bridge, run:
```bash
system-bridge version
```
## Completions
System Bridge can generate shell completion scripts for the CLI, so you get tab-completion of commands, flags and data module names.
On Linux, the DEB, RPM and Arch packages install completions for bash, zsh and fish automatically. Start a new shell after installing and completion works with no extra setup.
To enable completions yourself, or on another shell, generate a script with:
```bash
system-bridge completions
```
Supported shells are `bash`, `zsh`, `fish` and `pwsh` (PowerShell). Source the output to load completion into your shell:
```bash
# bash (~/.bashrc)
source <(system-bridge completions bash)
# zsh (~/.zshrc)
source <(system-bridge completions zsh)
# fish
system-bridge completions fish > ~/.config/fish/completions/system-bridge.fish
```
On PowerShell, load it in the current session, and add the same line to your profile to make it persist:
```powershell
system-bridge completions pwsh | Out-String | Invoke-Expression
```
:::tip
Completion is aware of your data modules. Once it is enabled, type `system-bridge client data run --module` followed by a space and press Tab to complete with the available module names.
:::
## Next steps
- Prefer a graphical interface? Use the [web client](/using/web-client/).
- Connect to the [API and WebSocket](/api/) to read data and control your system.
- Integrate with [Home Assistant](/using/home-assistant/).
- Not started the backend yet? See [Running](/running/).
---
# Desktop
Source: https://system-bridge.timmo.dev/using/desktop
When System Bridge runs on your desktop, it adds an application menu entry and a system tray icon so you can launch and control it without the terminal.
## Launching
Installing System Bridge adds a **System Bridge** entry to your desktop app launcher: the Start Menu on Windows, or your application menu on Linux. Launch it to start the backend and open the [web client](/using/web-client/).
For terminal launch, services, and autostart, see [Running](/running/).
## System tray
While the backend is running, a System Bridge icon appears in your system tray. Its menu has the following options:
- **Open web client**: open the [web client](/using/web-client/) in your default browser.
- **Open logs directory**: open the folder containing the application logs.
- **Quit**: stop the backend and exit System Bridge.
## Next steps
- Monitor and control your system from the [web client](/using/web-client/).
- See what System Bridge can do under **Features**, starting with [monitoring](/features/monitoring/).
- Prefer the terminal? Use the [CLI](/using/cli/).
---
# Home Assistant
Source: https://system-bridge.timmo.dev/using/home-assistant
System Bridge integrates with [Home Assistant](https://www.home-assistant.io/integrations/system_bridge), so you can monitor and control your machine from your Home Assistant instance. The integration uses a local push connection and is maintained by the System Bridge author.
:::tip
The official [System Bridge integration documentation](https://www.home-assistant.io/integrations/system_bridge) is the most up-to-date reference for entities, actions, and setup. Use this page as a starting point and follow the official docs for the current details.
:::
## Prerequisites
- A running System Bridge backend. See [Running](/running/).
- The API token, until the integration moves to keys. Print it with [`system-bridge client token`](/using/cli/#token).
## Adding the integration
System Bridge can be auto-discovered by Home Assistant. When an instance is found, it appears under **Settings > Devices & services** as a discovered device, ready to set up.
To add it manually:
[](https://my.home-assistant.io/redirect/config_flow_start/?domain=system_bridge)
1. In Home Assistant, go to **Settings > Devices & services**, or use the button above.
2. Select **Add Integration** and choose **System Bridge**.
3. Enter the host and your token when prompted, then follow the on-screen steps.
## Features
The integration exposes your system as sensors, a media player, and a set of actions, plus notifications and update tracking.
### Sensors
Sensors report system information such as battery, CPU speed, memory, load, displays, filesystems, GPU usage, processes, and version details. Many are enabled by default, with additional CPU and GPU sensors (temperatures, clock speeds, fan speed, and more) available to enable manually.
### Binary sensors
Binary sensors report on/off states such as whether the battery is charging, AC power is connected, the camera is in use, a reboot is pending, or a new version is available.
### Media player
Control currently playing media on your device from Home Assistant. Media player support is currently limited to devices running System Bridge on Windows.
### Media source
Browse and play media from your system through the Home Assistant media browser and supported media players.
### Update
An update entity notifies you when a new version of System Bridge is available.
### Notifications
Send rich notifications to your device, including a title, message, image, action buttons, and audio.
### Actions
Trigger actions on the machine running System Bridge:
- Get a process by its ID, or get processes by name.
- Open a path or a URL with the default application.
- Send a keypress or type text.
- Send a power command such as `sleep`, `lock`, `restart`, or `shutdown`.
## Dashboard
A System Bridge dashboard lays out a machine's sensors in Home Assistant the way the web client does, with a view for each page, such as CPU, Disks and GPUs. It's built from the integration's entities, so new disks, GPUs and sensors appear on their own. Each view also has a badge that opens the same page in the web client.
The dashboard needs Home Assistant 2026.10 or later. Sensors added to the integration in later versions show up once you update Home Assistant.
### Install from the Marketplace
[](https://my.home-assistant.io/redirect/marketplace_repository/?owner=timmo001&repository=system-bridge-dashboard&category=plugin)
1. Use the button above, or search for **System Bridge Dashboard** in **Settings > Marketplace**.
2. Select **Install**. The Marketplace adds the dashboard resource for you.
3. Reload your browser.
If you manage dashboard resources in YAML, add `/local/community/system-bridge-dashboard/system-bridge-dashboard.js` as a `module` resource yourself.
If you installed the dashboard from `timmo001/system-bridge` before, remove it and install it again from `timmo001/system-bridge-dashboard`. The dashboard now has a repository of its own, and new versions are only published there.
### Install manually
[](https://my.home-assistant.io/redirect/lovelace_resources/)
1. Download `system-bridge-dashboard.js` from the [latest release](https://github.com/timmo001/system-bridge-dashboard/releases/latest) and put it in your Home Assistant `config/www/` folder.
2. Use the button above, or go to **Settings > Dashboards**, open the menu and select **Resources**.
3. Add `/local/system-bridge-dashboard.js` as a **JavaScript module**.
### Add the dashboard
[](https://my.home-assistant.io/redirect/lovelace_dashboards/)
1. Use the button above, or go to **Settings > Dashboards**.
2. Select **Add dashboard** and choose **System Bridge**.
3. With more than one System Bridge device, open the dashboard, select **Edit dashboard** and choose the device.
### Options
Select **Edit dashboard** to change these. Options left at their default aren't saved, so they follow any later change to the default.
| Option | Default | What it does |
| --- | --- | --- |
| Device | The only System Bridge device | The machine the dashboard shows. |
| History | 1 hour | How far back graphs go, up to 48 hours. |
| Percentage tiles | Bar | What tiles for percentages such as CPU and memory usage show under the value: nothing, a bar, or a graph of recent values. |
| Maximum columns | 4 | The most columns of sections a page shows side by side on a wide screen, from 1 to 6. |
| Pages | Every page | The pages shown as views, in tab order. Drag to reorder, remove to hide. |
| Icon and title | Every page | Pages whose tab shows the icon next to the title. The others show only the icon. |
| Web client link | Every page | Pages with a badge at the top that opens the page in the web client. |
Pages with no entities, such as Battery on a desktop, are left out.
:::note
Taking control of the dashboard turns it into ordinary cards. It then stops following new entities, and these options no longer apply.
:::
### Add a section to another dashboard
Any page's sections can go on another sections dashboard, such as one GPU or a machine's command buttons. Each module is a page of the web client, and you can show one or more of its sections together. Add a section in YAML:
```yaml
strategy:
type: custom:system-bridge
device_id:
module: system
sections:
- power-commands
- saved-commands
```
After that, edit the section to change it in the section editor. Choose the **Module** from its pictures, and the editor shows that module's sections, each with its own picture. Select one or more of them: several go together in one section, in the page's order. Use the arrow at the top to change module. The editor shows only the options those sections use:
- **Item** for sections about one thing: choose the mount, GPU, display or network interface from the device's own.
- **History** for sections with a graph.
- **Percentage tiles** for sections with percentage tiles.
| Module | Section | Shows |
| --- | --- | --- |
| `overview` | `storage` | Space used on every mount. |
| `overview` | `audio` | The default audio output, with its output picker and volume. |
| `overview` | `now-playing` | The media playing, with source and playback controls. |
| `overview` | `overview-load` | CPU and memory load in one graph. |
| `overview` | `network` | Download and upload rates, with a graph. |
| `overview` | `overview-power` | Power draw, with a graph. |
| `overview` | `overview-temperatures` | CPU and GPU temperatures, with a graph. |
| `audio` | `audio-outputs` | Volume of each audio output, such as speakers. |
| `audio` | `audio-inputs` | Volume of each audio input, such as a microphone. |
| `battery` | `battery` | Battery level, state, time remaining, AC power, power draw and voltage. |
| `battery` | `device-batteries` | Battery level and state of connected devices, such as a wireless mouse. |
| `cpu` | `cpu` | CPU usage, speed, power, load average, temperature and voltage. |
| `cpu` | `cpu-history` | Graphs of CPU usage, speed, power, load average and temperature. |
| `cpu` | `cpu-cores` | Load and power of each CPU core. |
| `desktop` | `desktop` | Whether the session is locked, and how long it's been idle. |
| `disks` | `mount` | One mount point: space used. |
| `disks` | `disk-activity` | Disk read and write rates, in total and per disk. |
| `displays` | `display` | One display: power, brightness, resolution and refresh rate. |
| `gpus` | `gpu` | One GPU: load, memory, power, temperature, clocks and fan. |
| `media` | `now-playing` | The media playing, with source and playback controls. |
| `memory` | `memory` | Memory and swap in use, free and used. |
| `memory` | `memory-history` | Graph of memory and swap usage. |
| `networks` | `network-activity` | Download and upload rates, with a graph of each. |
| `networks` | `interface` | One network interface: rates, Wi-Fi details and graphs. |
| `processes` | `processes` | The number of processes, with a graph. |
| `system` | `system` | Device power usage and whether the camera is in use. |
| `system` | `power` | The power profile, and a switch to keep the device awake. |
| `system` | `power-commands` | Buttons to lock, log out, sleep, hibernate, restart or shut down. |
| `system` | `saved-commands` | A button for each saved command. Needs Home Assistant 2026.12 or later. |
| `system` | `notifications` | The notify entity, and the last notification event, such as clicked or closed. Needs Home Assistant 2026.12 or later. |
`hours_to_show` and `tile_feature` (`none`, `bar` or `trend`) set History and Percentage tiles in YAML.
A section saved with one `section`, such as `section: gpu`, still works. The editor turns it into `module` and `sections` when you next change it, and `section: commands` becomes both command sections.
## Next steps
- See what each feature does in more detail: [monitoring](/features/monitoring/), [notifications](/features/notifications/), [media](/features/media/) and [remote control](/features/remote-control/).
- Read the official [integration documentation](https://www.home-assistant.io/integrations/system_bridge) for entity names, action parameters, and examples.
- Connect to System Bridge directly with the [API and WebSocket](/api/).
---
# Omarchy
Source: https://system-bridge.timmo.dev/using/omarchy
The System Bridge Omarchy plugin shows CPU and memory usage in the bar. Select
the widget to open a panel with an overview of the system and a view for every
module the web client has a page for, with audio, desktop, Discord, display and
media controls.
## Requirements
- Omarchy Quattro
- System Bridge installed with the `system-bridge` executable available on
`PATH`, in a version with the `client audio`, `client bluetooth`,
`client desktop`, `client discord`, `client display`, `client hyprland`,
`client media`, `client open --path` and `client quit --yes`
[CLI commands](/using/cli/)
- A running local System Bridge service
## Install
Review the plugin repository, then add it:
```bash
omarchy plugin add https://github.com/timmo001/omarchy-system-bridge.git
```
Accept the prompt to enable the plugin. For an unattended install from a
repository you already trust:
```bash
omarchy plugin add https://github.com/timmo001/omarchy-system-bridge.git --enable --yes
```
## Use
The panel starts on the overview: CPU, memory, GPU, CPU temperature and battery
meters, storage, network traffic, what's playing, and a row for each module.
Select a reading or a module to open its view. Each view has the module's
readings, and links to the matching part of the web client for anything you set
up there, such as commands, disk mounts, media directories or Discord. The
Bluetooth view connects or disconnects a paired device when you select it; the
desktop view focuses a window or workspace when you select it, switches the
keyboard layout, reloads Hyprland's config, and centres, groups or splits the
focused window or cycles to the next or previous one; the Discord view has mute,
deafen and leave call; the displays view has brightness for each display that
supports it; the media view has previous, play or pause, and next; and the
system view lists your [commands](/features/commands/), running one when you
select it.
Type to filter the rows, use Up and Down to move through them, and press Enter
to select one. Backspace or the back button returns to the overview, and Escape
clears the filter or closes the panel.
The header has two buttons: one opens the current view in the web client, and
the other quits System Bridge, or starts it while it's not running.
The plugin has no System Bridge settings of its own. Change those in the
[web client](/using/web-client/).
The plugin exposes the `timmo.system-bridge` shell IPC target:
```bash
omarchy-shell timmo.system-bridge toggle
```
## Settings
- `primaryOnly`: show the widget only on the selected output
- `primaryOutput`: optional output name used when `primaryOnly` is enabled;
the first available output is used when this is empty or unavailable
## Update and remove
Review and apply the next fast-forward update:
```bash
omarchy plugin update timmo.system-bridge
```
Remove the plugin and its shell entry:
```bash
omarchy plugin remove timmo.system-bridge
```
## Security
Omarchy plugins run as unsandboxed code inside `omarchy-shell`. Review the
source before installing it.
This plugin starts `system-bridge client data watch` and reads System Bridge's
local settings and owner key through that client. Its buttons run
`system-bridge client` commands to open the web client, control the desktop,
media, Discord and displays, run your allowlisted commands, and quit or start
System Bridge.
---
# Web client
Source: https://system-bridge.timmo.dev/using/web-client
The web client is the built-in browser interface served by the System Bridge backend. Use it to view live system data, change settings, and trigger actions without writing any code.
## Opening the web client
### Desktop
When you launch System Bridge from your desktop app launcher, the web client opens automatically.
While System Bridge is running, you can also open the web client from the system tray. See the [Desktop](/using/desktop/) page for the system tray and desktop app.
### Terminal
Start the backend and open the web client in your browser with:
```bash
system-bridge backend --open-web-client
```
By default the backend serves the web client on port `9170`. When opened for you, it loads `http://127.0.0.1:9170`. See the [CLI](/using/cli/#backend) for more on the `backend` command.
## Connecting
The web client connects to the backend over the WebSocket API. On the **Connection** page, set:
- **Host**: the hostname or IP address of the machine running System Bridge. It starts with the address you opened the web client from.
- **Port**: the backend port (default `9170`).
- **Use a secure connection**: turn on when the backend is served over HTTPS.
- **Key**: a [key](/api/#authentication) for this browser. Make one with `system-bridge client key create`, or under **Settings > Devices** on a device that's already connected.
The old API token works too, until it's removed in a later release: the web client trades it for this browser's own key and keeps that. The settings are kept in your browser.
:::tip
When System Bridge opens the web client for you, from the system tray, at startup or with `system-bridge client open`, it signs in by itself: the address carries the host, the port and a one-time pairing code, which the page trades for this browser's own key.
:::
### Keys
**Settings > Devices** lists every client with a key to this computer: its name, how it got its key, when it was made and when it was last used, and whether its key has been sent in a URL, where it can leak. **Remove** signs a client out at once. **New key** makes a key by hand, for a script or another app, and shows it once to copy.
## Getting around
The search box in the header lists every page, grouped into **System**, **Hardware**, **Storage and network**, **Apps** and **Settings**. Click it, or press **Ctrl+K** (**⌘K** on macOS), then type to filter and press **Enter** to go.
The chip next to it shows whether the web client is connected. Click it to open the **Connection** page.
Every page has its own address, so you can bookmark it, share it, or reload it and land back where you were. Pages that show tables keep their search, sorting and page in the address too. A section of a page, such as the commands on the System page, has its own link too.
| Page | Address |
| --- | --- |
| Overview | `/` |
| Remote | `/remote` |
| A data module | `/`, such as `/cpu` |
| A module's raw data | `/?view=json` |
| Commands | `/system#commands` |
| Notifications | `/system#notifications` |
| Open | `/system#open` |
| Camera pictures setting | `/cameras#camera-capture` |
| Disk mounts | `/disks#disk-mounts` |
| Media controls | `/media#media-controls` |
| Media directories | `/media#media-directories` |
| Discord controls | `/discord#discord-controls` |
| Discord setup | `/discord#discord-setup` |
| Settings | `/settings`, `/settings/appearance`, `/settings/devices` |
| Connection | `/connection` |
| What's new | `/whats-new` |
Older addresses, such as `/data/cpu` or `/settings/commands`, take you to the new place.
## What you can do
### Overview
Live gauges for CPU, memory, GPU, CPU temperature and battery, graphs of CPU, memory and network use, storage, what's playing, and a shortcut to every module.
### Remote
Control the computer from a phone or another computer. **Remote** has a trackpad, a box to type into with Enter, arrow and editing keys, shortcuts such as Alt+Tab, copy and paste, and F1 to F12, a list of windows and workspaces to switch to, the clipboard, **Open**, and your saved [commands](/features/commands/) to run. Its layout is fixed. Media, audio, displays and the other controls that have their own page are linked at the end, and those pages link back. See [remote control](/features/remote-control/#the-remote-page).
On the trackpad, drag a finger to move the pointer, tap to click, tap with two fingers to right-click, move two fingers to scroll, and tap then hold and move to drag. With a mouse, drag inside it to move, click to click, and use the wheel to scroll.
### Modules
Each [data module](/features/monitoring/#what-it-reports) has a page: system information, processes, CPU, memory, GPUs, sensors, battery, Bluetooth, cameras, desktop, displays, audio, disks, networks, media and Discord. Use the **Dashboard** and **JSON** chips at the top of the page to switch between the dashboard and the module's raw data.
Graphs start with the first readings after the page opens. System Bridge updates most data about once a minute.
Processes and network connections are in tables you can search, sort and page through.
The controls and settings for a module sit on its page, with its data:
- **System**: add and run [commands](/features/commands/), send a [notification](/features/notifications/), and [open](/features/remote-control/#opening-a-url-or-file) a URL in the browser, or a file or folder with its app.
- **Cameras**: set each webcam's [controls](/features/remote-control/#cameras), such as its brightness, zoom or autofocus, with a card for each set the camera groups them in, such as User Controls and Camera Controls. Each camera's card shows the resolution and format it captures in now, and the formats it supports up to their largest size. Controls another one sets, such as focus while autofocus is on, show as set automatically. Turn on **Take pictures** here to take a picture with a camera, at its current size or one of its others, and download it.
- **Desktop**: [control windows](/features/remote-control/#desktop) from each window's actions menu, show a workspace, switch the keyboard layout, on Hyprland run a global shortcut, move the focus, run dispatchers on the focused window or reload the config, read and set any config option, read and move the cursor, read the log, send a custom event, and with Hyprland code on run commands, any dispatch or Lua from the **Tools** card, and open, close or toggle the Omarchy shell's menus and panels. Turn on **Window titles** here to report them, and **Run commands, dispatches and Lua through Hyprland** for Hyprland code.
- **Disks**: [choose which extra mounts](/features/monitoring/#choosing-which-disks-to-show) the Disks module reports.
- **Media**: [control what's playing](/features/media/#controlling-playback), and [share media folders](/features/media/#sharing-media-folders).
- **Discord**: [set up Discord](/features/discord/#setting-it-up), then mute, deafen, change your audio devices and volumes, voice mode, each call member's volume, and play soundboard sounds.
### Settings
- **General**: start automatically, the system tray icon, and the log level. It also links to the settings kept on module pages.
- **Appearance**: themes. See [Appearance](#appearance).
- **Devices**: pair the [Android app](/using/android/) with a QR code, manage [keys](#keys), install the web client as an app, choose what this phone or browser is pushed, and see every device getting pushes.
### What's new
The newest System Bridge releases, newest first, with each one's release notes. Releases newer than the computer's version are marked **New**, and the one it runs is marked **You have this**. The update alerts on the Overview and System pages link here, and so does an update push. The computer gets the notes from GitHub, and keeps them for 6 hours.
## Installing it as an app
Over HTTPS, the web client can be installed as an app, which opens in its own window and can be pushed this computer's notifications, even when it's closed. When the browser can install it, as Chrome, Edge and other Chromium-based browsers can, a banner at the top offers **Install**. Choose **Not now** and it stops asking; install it later from the **Install System Bridge** card under **Settings > Devices**. Turn on pushes on the same page. Browsers only allow this on secure addresses, so over plain HTTP on your network, use the [Android app](/using/android/).
Anything you share to the installed app from another app, such as a link, can be opened on the computer or copied to its clipboard.
## After an update
A page left open while System Bridge updates, in a tab or the installed app, moves onto the new version by itself the next time it talks to the computer. If it's still on the old one after that, a banner says **System Bridge was updated** with **Reload** to load the new version.
## Appearance
The colour mode follows your device's light or dark setting by default. Switch between **System**, **Dark** and **Light** from the header.
On the **Appearance** page, pick one theme for dark and one for light. Themes are grouped by family. The web client includes System Bridge's own themes, Catppuccin (Frappé, Macchiato, Mocha and Latte), Tokyo Night (Night, Storm, Moon and Day), Rosé Pine (Main, Moon and Dawn), Midnight, Nord, Dracula, Gruvbox and Solarized.
Appearance settings are kept in your browser, so each browser can have its own.
## Next steps
- Connect programmatically with the [API and WebSocket](/api/).
- Prefer the terminal? Use the [CLI](/using/cli/).