Skip to content

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, tui and version are top-level commands.

The token is essential to connect to the API/WebSocket. To get it, run the following command:

Terminal window
system-bridge client token

Alternatively, you can find your token in the application startup logs when running the backend. The logs will show “Your API token is” followed by your token value.

To send a notification, use the following command:

Terminal window
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)

To list discovered services on the network, run:

Terminal window
system-bridge client discovery list

This will scan for available System Bridge instances and display them with their hostname, IP, port, and type.

To list all available data modules, run:

Terminal window
system-bridge client data list

By default, this outputs as a simple list. You can also use:

Terminal window
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)

To run a specific data module and get its data as JSON, use:

Terminal window
system-bridge client data run --module cpu

For example, to get CPU data:

Terminal window
system-bridge client data run --module cpu

To run all modules and get a JSON object with all data:

Terminal window
system-bridge client data run --all

To pretty-print the JSON output:

Terminal window
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

To run the backend server, use:

Terminal window
system-bridge backend

Add --open-web-client to open the web client once the backend has started:

Terminal window
system-bridge backend --open-web-client

See Running for autostart and service setup.

To get the version of System Bridge, run:

Terminal window
system-bridge version