/hassio-cli

:white_square_button: Hass.io command line interface

Primary LanguageGoApache License 2.0Apache-2.0

Hass.io CLI

build status

Description

Commandline interface to facilitate interaction with hass.io server

Usage

  • hassio help
  • hassio <subcommand> <action> [<options>]

E.g.:

  • hassio homeassistant info --rawjson

Modifiers

Global

  • --debug,-d -> Enables debug output

SubCommand

  • --rawjson,-j -> Will return the data in JSON format on a single line (useful for passing to other programs to parse / utilise)
  • --options,-o -> Used to send commands to hass.io hassio homeassistant update --options version=0.60
  • --filter,-f -> Used to filter the data returned from hass.io so only the specified properties are output

Note: Modifer order is important.

hassio <GlobalModifier> <SubCommand> <Action> <SubCommandModifier>

Install

To install, use go get:

go get -d github.com/home-assistant/hassio-cli

Contribution

  1. Fork (https://github.com/home-assistant/hassio-cli/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Building

go test ./...
gox -osarch="linux/arm" -ldflags="-s -w" -output="hassio"
upx --brute hassio