Commandline interface to facilitate interaction with Hass.io server
hassio help
hassio <subcommand> <action> [<options>]
E.g.:
hassio homeassistant info --raw-json
- --log-level debug -> will set the log level to debug
- --api-token string Hass.io API token
- --config string config file (default is $HOME/.homeassistant.yaml)
- --endpoint string Endpoint for Hass.io Supervisor ( default is 'hassio' )
- --log-level string Log level, defaults to Warn
- --raw-json Output raw JSON from the API
all options are also available as HASSIO_
prefixed environment variables like HASSIO_LOG_LEVEL
Available Commands:
- addons
- completion Generates bash completion scripts
- hardware
- hassos
- homeassistant
- host
- info
- snapshots
- supervisor
To install, use go get
:
go get -d github.com/home-assistant/hassio-cli
If running on hassio host just run hassio-cli
, but if on a remote host you'll need to specify token and endpoint:
hassio-cli --endpoint $HASS_SERVER/api/hassio --api-token $HASS_TOKEN <cmd>
or if you prefer to use environment variables to avoid repetition:
export HASSIO_ENDPOINT=https://hassio.local:8123/api/hassio
export HASSIO_API_TOKEN=longandsafesecret
hassio-cli
- Fork (https://github.com/home-assistant/hassio-cli/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go test ./...
command and confirm that it passes - Run
gofmt -s
- Create a new Pull Request
go test ./...
gox -osarch="linux/arm" -ldflags="-s -w" -output="hassio"