Skip to main content
Manage Lagerbox names, IP addresses, and configurations for local development.

Syntax

lager boxes COMMAND [OPTIONS]

Commands

CommandDescription
addAdd a new box configuration
add-allAdd all boxes from Tailscale network
deleteDelete a box configuration
editEdit an existing box configuration
listList all configured boxes
delete-allDelete all box configurations
exportExport box configuration to JSON
importImport box configuration from JSON
syncSync Lager Box versions from all boxes

Command Reference

add

Add a new Lagerbox configuration.
lager boxes add --name NAME --ip IP [OPTIONS]
Options:
  • --name (required) - Name to assign to the box
  • --ip (required) - IP address of the box
  • --user - SSH username (default: lagerdata)
  • --version - Lager Box version/branch (e.g., staging, main)
  • --yes - Confirm without prompting
Examples:
# Add a basic box
lager boxes add --name lab-lager-box --ip 100.91.127.26

# Add with custom username
lager boxes add --name pi-lager-box --ip 100.105.225.48 --user pi

# Add with version tracking
lager boxes add --name staging-lager-box --ip 100.127.196.103 --version staging

add-all

Automatically add all Lagerboxes found on your Tailscale network.
lager boxes add-all [--yes]
Options:
  • --yes - Confirm without prompting
This command scans your Tailscale network for devices with names 5-8 characters long (typical Lagerbox naming convention) and automatically adds them as boxes with uppercase names. How it works:
  1. Runs tailscale status to discover devices
  2. Filters for devices with names 5-8 characters long
  3. Converts names to uppercase
  4. Skips boxes that already exist with the same IP
  5. Adds new boxes to your configuration
Example:
# Scan and add all boxes
lager boxes add-all

# Output:
Scanning Tailscale network for lager boxes...

Found 3 lager box(es):

  LABGW1 100.91.127.26
  TESTGW 100.105.225.48
  DEVBOX 100.127.196.103

Add all 3 box(es)? [Y/n]: y

  LABGW1: added
  TESTGW: added
  DEVBOX: already exists (skipped)

Summary:
  Added:   2
  Skipped: 1

 Successfully added 2 box(es)
# Add without confirmation prompt
lager boxes add-all --yes

delete

Delete a box configuration.
lager boxes delete --name NAME [--yes]
Examples:
# Delete with confirmation prompt
lager boxes delete --name old-lager-box

# Delete without confirmation
lager boxes delete --name old-lager-box --yes

edit

Edit an existing box configuration.
lager boxes edit --name NAME [OPTIONS]
Options:
  • --name (required) - Name of the box to edit
  • --ip - New IP address
  • --user - New SSH username
  • --version - New Lager Box version/branch
  • --new-name - Rename the box
  • --yes - Confirm without prompting
Examples:
# Change IP address
lager boxes edit --name lab-lager-box --ip 100.91.127.30

# Rename a box
lager boxes edit --name old-name --new-name new-name

# Update SSH user and version
lager boxes edit --name pi-lager-box --user pi --version staging

list

List all configured boxes.
lager boxes list
Output:
┌─────────────┬─────────────────┬───────────┬─────────┐
│ Name        │ IP              │ User      │ Version │
├─────────────┼─────────────────┼───────────┼─────────┤
│ lab-box-1   │ 100.91.127.26   │ lagerdata │ main    │
│ lab-box-2   │ 100.105.225.48  │ lagerdata │ staging │
│ pi-box      │ 100.127.196.103 │ pi        │ main    │
└─────────────┴─────────────────┴───────────┴─────────┘

delete-all

Delete all box configurations.
lager boxes delete-all [--yes]

export

Export box configuration to JSON file.
lager boxes export [--output FILE]
Options:
  • --output / -o - Output file path (prints to stdout if not specified)
Examples:
# Export to file
lager boxes export --output boxes.json

# Export to stdout
lager boxes export

import

Import box configuration from JSON file.
lager boxes import FILE [--merge] [--yes]
Options:
  • FILE - Path to JSON file to import
  • --merge - Merge with existing boxes (default: replace)
  • --yes - Confirm without prompting
Examples:
# Replace all boxes with imported config
lager boxes import boxes.json --yes

# Merge imported boxes with existing
lager boxes import new-boxes.json --merge --yes

sync

Sync Lager Box versions from all configured boxes.
lager boxes sync [--port PORT] [--timeout SECONDS]
Options:
  • --port - Lager Box HTTP port (default: 5000)
  • --timeout - HTTP request timeout in seconds (default: 5)
This command queries each Lager Box’s current version and updates the local configuration.

Configuration Storage

Box configurations are stored in .lager file in your project directory:
{
  "duts": {
    "lab-box-1": {
      "ip": "100.91.127.26",
      "user": "lagerdata",
      "version": "main"
    },
    "pi-box": "100.105.225.48"
  }
}
Entries can be:
  • Simple: Just an IP address string
  • Full: Object with ip, user, and version fields

Validation

The boxes commands perform validation:
  • Duplicate detection: Prevents adding boxes with same name or IP
  • IP validation: Validates IP address format
  • Confirmation: Shows before/after state for edit operations

Examples

# Set up a new lab
lager boxes add --name lager-box-1 --ip 100.91.127.26
lager boxes add --name lager-box-2 --ip 100.105.225.48
lager boxes add --name lager-box-3 --ip 100.127.196.103

# Export configuration for team sharing
lager boxes export -o lab-config.json

# Import on another machine
lager boxes import lab-config.json --yes

# Sync versions after updates
lager boxes sync

# Clean up
lager boxes delete-all --yes

Notes

  • Box names must be unique
  • IP addresses must be unique (no duplicate IPs)
  • The default SSH user is lagerdata
  • Use --merge when importing to preserve existing boxes
  • Sync command requires Lager Boxes to be online and accessible