Hassio Add-On installation from commandline / bash

Hi all,

I am getting my first steps with home-assistant and hass.io.
I have setup both based on instructions from “install on a generic Linux host” (https://www.home-assistant.io/hassio/installation/#alternative-install-on-a-generic-linux-host) on a Debian 10 machine.

Since I am more likely on the command line, than any web interface,
I have already learned how to install/activate home-assistant integrations using the configurations-yaml.
(This is nice since I can use my usual editor vi or any bash script for installations).

What I did not get yet is installing hassio add-ons from the command line.
I found that I can do this e.g. after installing the “SSH & Web Terminal” add-on and then using SSH into the hassio ssh addon docker container and install add-ons using:
hassio addons install XYZ
This unfortunately has some downsides like:

  • SSH & Web Terminal is an add-on itself, so I have to install manually an add-on first to be able to automatically install add-ons via command line
  • SSH & Web Terminal does not use the systems sshd_config and based on this does not support my currently implemented logic of kerberos (and additional multi factor logon for ssh in case I am connecting from public IP)
  • I am running two SSH servers on the same host, and based on this require two port forwarding and two connections in case I am doing some troubleshooting stuff which might involve both (OS & hassio)

Based on this my question is:
If I have a clean installed hassio instance (based on guidelines from “install on a generic Linux host” ) how do I start installing hassio add-ons from command line?

PS: I additionally found that there is a file /usr/share/hassio/addons-json, but if I copy the entry of any add-on to a new/different instance of hassio the inserted add-on is not installed automatically.

PS2: Sorry I had to rename all file extensions from . to - because of the automatic interpretation that these are links and as new user I am allowed to add only two links… :confused: