Skip to content

Framework — API Reference

The offline-lab-framework is a bash utility library installed at /usr/lib/framework/ on the Offline Lab OS. Scripts load it with source framework || exit 1.

See the Builder documentation for buildroot packaging details.

CLI

boxctl is the device management CLI. Run boxctl help on the device for interactive help.

Command Description
boxctl confext Manage configuration extension images in /data/extensions/confext/.
boxctl config
boxctl diagnose Collect diagnostics and write a tarball to /tmp (or ).
boxctl firewall Manage the nftables firewall.
boxctl logs
boxctl net
boxctl power Manage runtime power profile (cpufreq governor + USB autosuspend).
boxctl reboot Reboot the device, optionally into a specific RAUC slot.
boxctl rollback Roll back to the previously installed RAUC slot.
boxctl screen Manage HDMI display configuration.
boxctl service
boxctl status Show system health: RAUC slot info, AppArmor, dm-verity, failed units, disk and memory usage.
boxctl sysext Manage system extension images in /data/extensions/sysext/.
boxctl update Apply a RAUC bundle.

Utility modules

Module Description Functions
arguments CLI flag parsing 3
array operations and predicates 31
cache key/value store with TTL 8
credentials random username and password generation 2
depends tool availability checks 7
files merge and deduplication 2
fs path and file checks 16
interact prompts and user input 5
net IP, FQDN, email validation 6
prettytable Unicode terminal table output 4
proc command execution and output handling 10
ssh key generation and agent management 6
ssl certificate and key validation 23
string manipulation and comparison 17
time formatting and timestamps 2
var type and value checks 30

OS-specific modules

Module Description Functions
clock clock and RTC management 2
confext configuration extension management 6
config /data/config key/value store 7
fw iptables helpers 12
health system status checks 7
power power management 8
rauc A/B OTA update operations 15
resources CPU, memory, disk monitoring 8
sysext systemd sysext operations 6
system privilege escalation and sudo keepalive 3
wifi wpa_supplicant management 11
zram zram compression device management 5

Framework internals

Module Description Functions
core bootstrap and module loader 0
debug stack trace and error handling 5
exit script termination helpers 16
import module loading and circular import prevention 4
logging leveled output to stderr 14
sanity pre-execution checks 1