> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lagerdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding your First Lager Box

> Install the Lager CLI and connect to your first Lager Box

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.

```bash theme={null}
pip3 install -U lager-cli
```

You can check your version to make sure it's installed:

```bash theme={null}
lager --version
```

**Expected output:**

```
lager-cli, version 0.16.1
```

***

## 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!

<Note>
  **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.
</Note>

```bash theme={null}
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.

```bash theme={null}
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:

```bash theme={null}
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!

<Accordion title="Troubleshooting: lager hello fails">
  | Error                      | Cause                                             | Fix                                                                                            |
  | -------------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
  | `No route to host`         | The Lager Box is unreachable on the network       | Make sure your VPN (Tailscale) is connected. Run `tailscale status` to verify.                 |
  | `Connection refused`       | The Lager Box service is not running              | The box may need a restart or a software update. Contact your administrator.                   |
  | `Connection timed out`     | Network path exists but the box is not responding | Verify the IP address is correct with `lager boxes`. Check that the box is powered on.         |
  | `command not found: lager` | The CLI is not installed or not in your PATH      | Re-run `pip3 install -U lager-cli`. If using a virtual environment, make sure it is activated. |
</Accordion>

***

## Next Steps

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

* **[Setting Up Your Instruments](/source/getting-started/setting-up-instruments)** -- Discover and configure the hardware connected to your box
