Syntax
Global Options
Commands
CLI Validation Ranges
The CLI enforces conservative upper bounds before sending commands to hardware:
All values must be positive. OVP must be greater than or equal to the voltage setpoint.
Command Reference
voltage
Set or read output voltage with optional protection thresholds.
VALUE- Voltage in volts. Omit to read the current voltage setting.
When VALUE is provided, the CLI prompts for confirmation unless
--yes is passed:
current
Set or read output current with optional protection thresholds.
VALUE- Current in amps. Omit to read the current limit setting.
When VALUE is provided, the CLI prompts for confirmation unless
--yes is passed:
enable
Enable power output to device. Requires confirmation to prevent accidental power-on.
disable
Disable power output. Requires confirmation to prevent accidental power-off.
state
Show comprehensive power supply state including measurements, setpoints, and protection status.
- Channel - Active channel on multi-channel supplies
- Enabled - Output ON or OFF
- Mode - CV (constant voltage) or CC (constant current)
- Voltage/Current/Power - Live measurements (4 decimal places)
- OCP/OVP Limit - Protection thresholds
- OCP/OVP Tripped - Whether protection tripped (color-coded: green=NO, red=YES)
clear-ovp
Clear over-voltage protection fault. Use after an OVP trip to reset the protection and allow the output to be re-enabled.
clear-ocp
Clear over-current protection fault. Use after an OCP trip to reset the protection and allow the output to be re-enabled.
set
Set power supply mode. The available modes depend on the hardware.
tui
Launch an interactive terminal UI for real-time power supply monitoring and control. The TUI provides live-updating measurements, inline command entry, and keyboard shortcuts.
textual Python package (pip install textual).
TUI display:
- Live voltage, current, and power measurements (updated every second)
- Output status (ON/OFF) with color coding
- Mode indicator (CV/CC) with color coding
- Protection thresholds and trip status
- Hardware maximum ratings
- Scrollable command log
Keyboard shortcuts:
Concurrent access: While the TUI runs, other
lager supply CLI commands (e.g., lager supply PSU voltage 3.3 --yes) will route through the TUI’s WebSocket connection on port 9000. They share the one USB connection to the instrument. If the TUI is not open, commands use direct USB access.
OVP / OCP Protection
Over-voltage protection (OVP) and over-current protection (OCP) thresholds protect your device under test from damage. Setting thresholds:- All values must be positive
- OVP must be >= the voltage setpoint
- OCP must be >= the current setpoint
- Values are validated against CLI maximum limits before being sent to hardware
- The supply output is disabled automatically
stateshows the tripped status in red- Clear the fault with
clear-ovporclear-ocp - Re-enable the output with
enable
Supported Hardware
Multi-channel supplies use the channel number configured in the net record. Each channel is typically configured as a separate net.
Default Net
Set a default power supply net to avoid specifying the name each time:Examples
Scripting Example
Troubleshooting
Notes
- All
voltageandcurrentset operations require confirmation (use--yesto skip) enableanddisablealso require confirmation- Net names refer to names assigned when setting up your testbed with
lager nets - The TUI connects via WebSocket (port 9000) for real-time updates
- Protection thresholds help prevent damage to your device under test
- Multi-channel supplies: each channel is configured as a separate net
See Also
- Battery Simulation — Control battery simulators (Keithley 2281S)
- Electronic Load — Programmable electronic loads
- Watt Meter — Power measurement with Yocto-Watt and Joulescope
- Python Supply API — Automate power supply control in Python scripts

