Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.17 KB

README.md

File metadata and controls

31 lines (24 loc) · 1.17 KB

Balena CLI Wrapper

This utility provides support for performing Balena CLI commands targeting individual devices by name, rather than UUID.

Device names are generally more human-friendly and easier to remember than UUIDs. Executing device commands by name makes it easier to be sure that you're performing the command on the intended device. The Balena CLI does not natively support using device names for device-targeting commands (e.g., balena ssh), so this tool wraps calls to the CLI, using the Balena Python SDK to query the UUID for a named device.

Installation

  1. Install the Python requirements:
    pip install -r requirements.txt
    
  2. Add the bin/ directory to your PATH before the Balena CLI itself (e.g., by editing your ~/.bashrc file):
    export PATH="/path/to/balena-cli-wrapper/bin:$PATH"
    

Usage

To use, simply execute Balena CLI commands normally. If you specify a device name for any device-targeting command, it will be automatically converted to a UUID:

> balena ssh my-device
or
> balena ssh f9e118bc8f98e761fcec0ad10f8647b0