Skip to main content
The Lager CLI (lager) enables direct control of your hardware from the command line and text editor. With this tool, you can:
  • Control power supplies: Programmatically set voltage and current for your DUT.
  • Flash firmware images: Update your device with new firmware builds.
  • Monitor hardware in real-time: Stream voltage, current, and other sensor data.
  • Manipulate I/O pins: Directly control GPIO for testing and automation.
  • And more!

Prerequisites

  • A Lager Box
  • Python 3.10 or higher
  • pip3 package manager

Step 1: Install the CLI Package

To install the Lager CLI, make sure you’ve fulfilled the above prerequisites and run the following command.
pip3 install -U lager-cli
You can check your version to make sure it’s installed:
lager --version
Expected output:
lager-cli, version 0.4.0

Step 2: Add Your Lager Box

To interact with a Lager Box, you’ll need its local IP or IP from your VPN. Once you have that, you can add it to your list of Lager Boxes and give it a name!
Finding your Lager Box IP address:
  • Tailscale VPN: Run tailscale status to see all devices on your network. Look for your Lager Box name and its 100.x.y.z address.
  • Local network: Check your router’s DHCP client table, or ask your network administrator.
  • Lager CLI: Run lager boxes to see your boxes and their IP addresses.
lager boxes add --name my-lager-box --ip 100.64.1.42
You can add all of your configured Lager Boxes using the command below and view your list of them using the following command.
lager boxes
Note that this list is unique to your personal computer which means you can give your Lager Boxes any name you want (though it is normally in your best interest to agree on a naming convention with your team).

Step 3: Verify Connectivity

Now that you’ve added a Lager Box, test that you can communicate with your Lager Box:
lager hello --box my-lager-box
Expected output:
my-lager-box says hello!
If your Lager Box says hello back, then you are ready to start using it!
ErrorCauseFix
No route to hostThe Lager Box is unreachable on the networkMake sure your VPN (Tailscale) is connected. Run tailscale status to verify.
Connection refusedThe Lager Box service is not runningThe box may need a restart or a software update. Contact your administrator.
Connection timed outNetwork path exists but the box is not respondingVerify the IP address is correct with lager boxes. Check that the box is powered on.
command not found: lagerThe CLI is not installed or not in your PATHRe-run pip3 install -U lager-cli. If using a virtual environment, make sure it is activated.

Next Steps

Now that you can communicate with your Lager Box, set up the instruments connected to it: