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

Syntax

Commands


Command Reference

add

Add a new Lagerbox configuration.
Options:
  • --name (required) - Name to assign to the box
  • --ip (required) - IP address of the box
  • --user (required) - SSH username for the box (the account you log in as)
  • --version - Lager Box version/branch (e.g., staging, main)
  • --yes - Confirm without prompting
--user is required. It previously defaulted to lagerdata, but since most boxes use a different login account, the default was removed so the correct user is always recorded for SSH, updates, and lager ssh.
Examples:

add-all

Automatically add all Lagerboxes found on your Tailscale network.
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:

delete

Delete a box configuration.
Examples:

edit

Edit an existing box configuration.
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:

list

List all configured boxes with live version status. This is also the default behavior when running lager boxes with no subcommand.
The command queries each box’s /cli-version endpoint to display real-time version and status information. Output:
Status Colors:

delete-all

Delete all box configurations.

export

Export box configuration to JSON file.
Options:
  • --output / -o - Output file path (prints to stdout if not specified)
Examples:

import

Import box configuration from JSON file.
Options:
  • FILE - Path to JSON file to import
  • --merge - Merge with existing boxes (default: replace)
  • --yes - Confirm without prompting
Examples:

lock

Lock a box to prevent other users from using it. See Box Locking for full details.
Options:
  • --box (required) - Name of the box to lock
Example:

unlock

Unlock a box to allow other users to use it. See Box Locking for full details.
Options:
  • --box (required) - Name of the box to unlock
  • --force - Force unlock even if locked by another user
Examples:

Configuration Storage

Box configurations are stored in .lager file in your project directory:
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


Notes

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