Skip to content

olef lab

CLI v3.0.2View Markdown

Generated from Olef 3.0.2. All commands · Capabilities and requirements

These entries describe available commands, not a sequence to run. Check prerequisites before changing app, device, or cloud state. Global options are listed in the command catalog.

This machine as a device lab for Olef Cloud: lab register, lab add <serial|ip:port>, lab serve; leased as lab:<lab>/<device>

Terminal window
olef lab --help

Output: json.

Register this machine as a lab with your Olef Cloud account (needs cloud login); keeps the lab credential under ~/.olef/lab/

Terminal window
olef lab register --help

Output: json.

Argument Description
--name <NAME> Required. The lab’s name (letters, digits, ‘-’, ‘_’)
--reset <RESET> What a reset undoes after each lease: full (back to the enrolment baseline), lease_only (only what the lease installed, created or changed; for devices people also use) or none Default: full. Values: full, lease_only, none.
--adb-port <ADB_PORT> The lab’s adb server port Default: 5047.
--force Replace an existing lab registration on this machine
--json Accepted for compatibility; output is always JSON.

Devices the lab’s own adb server sees, enrolled or not

Terminal window
olef lab devices --help

Output: json.

Argument Description
--json Accepted for compatibility; output is always JSON.

Pair an Android 11+ device for wireless debugging with the lab’s adb key (the code and port from Settings › Wireless debugging › Pair)

Terminal window
olef lab pair --help

Output: json.

Argument Description
<address> Required. host:port from the pairing dialog
<code> Required. The six-digit pairing code
--json Accepted for compatibility; output is always JSON.

Enrol a device: probe it, record its baseline, offer it in the Cloud. For a network device give host:port (Fire TV: <ip>:5555); the device asks once to trust the lab’s adb key

Terminal window
olef lab add --help

Output: json.

Argument Description
<lab_device> Required. The device’s serial on the lab’s adb server, or host:port for a network device
--name <NAME> Required. Its name in the lab (lab:<lab>/<name>)
--timeout-ms <TIMEOUT_MS> How long to wait for the device to trust the lab key Default: 120000.
--json Accepted for compatibility; output is always JSON.

Run the lab agent: tunnel to the Cloud, serve leases, reset devices

Terminal window
olef lab serve --help

Output: json.

Argument Description
--for-ms <FOR_MS> Exit after this long (tests)
--json Accepted for compatibility; output is always JSON.

The lab, its devices and their states

Terminal window
olef lab status --help

Output: json.

Argument Description
--json Accepted for compatibility; output is always JSON.

Stop offering a device and forget it

Terminal window
olef lab remove --help

Output: json.

Argument Description
<lab_device> Required. Device name or id
--json Accepted for compatibility; output is always JSON.

Ask the Cloud to reset a device now (it must be free)

Terminal window
olef lab reset --help

Output: json.

Argument Description
<lab_device> Required. Device name or id
--json Accepted for compatibility; output is always JSON.

A device’s enrolment baseline, or what differs from it now

Terminal window
olef lab baseline --help

Output: json.

What was recorded at enrolment

Terminal window
olef lab baseline show --help

Output: json.

Argument Description
<lab_device> Required. Device name or id
--json Accepted for compatibility; output is always JSON.

What differs from it now

Terminal window
olef lab baseline diff --help

Output: json.

Argument Description
<lab_device> Required. Device name or id
--json Accepted for compatibility; output is always JSON.

Run the agent as a system service (macOS LaunchDaemon, Linux systemd)

Terminal window
olef lab service --help

Output: json.

Write the service definition and print the one command (sudo) that installs it

Terminal window
olef lab service install --help

Output: json.

Argument Description
--json Accepted for compatibility; output is always JSON.

Print the command that removes it

Terminal window
olef lab service uninstall --help

Output: json.

Argument Description
--json Accepted for compatibility; output is always JSON.

Let the installed service run the agent (no sudo)

Terminal window
olef lab service start --help

Output: json.

Argument Description
--json Accepted for compatibility; output is always JSON.

Stop the agent and keep the service from restarting it (no sudo); its devices go offline in the Cloud

Terminal window
olef lab service stop --help

Output: json.

Argument Description
--json Accepted for compatibility; output is always JSON.