Skip to content

Enapter/enapter-cli

Repository files navigation

Enapter CLI

Build Status License Release

This tool helps Enapter customers to work with devices it is alternative for Enapter IDE for EMS Toolkit 3.0. It helpful in the following cases:

  1. Managing all your EMS setup as a code with Git and Ansible / Puppet
  2. Establishing CI/CD workflow
  3. Development and debugging of Enapter Blueprints
  4. Development and debugging of Enapter Gateway Rules

How to install

 macOS - recommended

Version 1:

brew tap enapter/tap && brew install enapter

Version 3:

brew tap enapter/tap && brew install enapter@3

Get prebuilt binaries

Choose your platform and required release on the Releases page.

Build from source

You should have installed Go tools. Then you can build CLI via the following command:

./build.sh

Also you can pass custom output path:

./build.sh /usr/local/bin/enapter

How to use Version 1:

Note

Version 1 works only with Enapter Cloud connection.

API token

Enapter CLI requires access token for authentication. Obtaining of the token is easy and can be done by following few steps.

  1. Ensure you have registed Enapter Cloud account. If not, sign up here.
  2. Log in to your Enapter Cloud account, click on your profile name in top right corner and choose Account Settings
  3. Select API Tokens menu and click New Token button
  4. Follow the instructions on the screen

  1. Set environment variable ENAPTER_API_TOKEN with new token. To make it permanent don't forget to add it to configuration files of your shell.
export ENAPTER_API_TOKEN="your token"

Please note that if you don't save your token, it is not possible to reveal it anymore. You need generate new token.

How to use Version 3:

API token

Enapter CLI requires access token for authentication. Obtaining of the token is easy and can be done by following few steps.

  1. Navigate to your Enapter Gateway 3.0 Web Interface Settings page by using IP address or mDNS name http://enapter-gateway.local/settings
  2. Enapter your Enapter Gateway password
  3. Click API Token and copy token to clipboard
  4. Set environment variables ENAPTER3_API_TOKEN, ENAPTER3_API_URL and ENAPTER3_API_ALLOW_INSECURE. To make it permanent don't forget to add it to configuration files of your shell.
export ENAPTER3_API_TOKEN="your token"
export ENAPTER3_API_URL="http://ip_address/api"
export ENAPTER3_API_ALLOW_INSECURE=true
  1. Check connection works by running
enapter3 device list

Autocompletion in your favourite terminal app

Note

Available for Version 1 now.

In order to make life easier with command line interface, you may use Amazon Q. This autocompletion tool has native support for the Enapter CLI for Mac OS X and Linux.

About

Cross-platform device management command-line tool for Enapter Energy Management System Toolkit

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •