Command line interface to facilitate interaction with the Factory Assistant Supervisor.
Factory Assistant is based on Home Assistant. The ha command name is kept for
compatibility with the underlying Supervisor.
ha helpha <subcommand> <action> [<options>]
E.g.:
ha core info --raw-json
--api-token string Factory Assistant Supervisor API token
--config string Optional config file (default is $HOME/.homeassistant.yaml)
--endpoint string Endpoint for Factory Assistant Supervisor (default is 'supervisor')
-h, --help help for ha
--log-level string Log level (defaults to Warn)
--no-progress Disable the progress spinner
--raw-json Output raw JSON from the API
All options are also available as SUPERVISOR_ prefixed environment variables like SUPERVISOR_LOG_LEVEL
Available commands:
apps Install, update, remove and configure Factory Assistant apps
audio Audio device handling.
authentication Authentication for Factory Assistant users.
cli Get information, update or configure the Factory Assistant cli backend
core Provides control of the Factory Assistant Core
dns Get information, update or configure the Factory Assistant DNS server
docker Docker backend specific for info and OCI configuration
hardware Provides hardware information about your system
help Help about any command
host Control the host/system that Factory Assistant is running on
info Provides a general Factory Assistant information overview
multicast Get information, update or configure the Factory Assistant Multicast
network Network specific for updating, info and configuration imports
observer Get information, update or configure the Factory Assistant observer
os Operating System specific for updating, info and configuration imports
resolution Resolution center of Supervisor, show issues and suggest solutions
backups Create, restore and remove backups
supervisor Monitor, control and configure the Factory Assistant Supervisor
The CLI is provided by the CLI container on Factory Assistant systems and is available on the device terminal when using Factory Assistant OS.
The CLI is automatically updated on those systems.
Furthermore, the SSH app (available in the app store) provides access to this tool and several community apps provide it as well (e.g., the Visual Studio Code app).
The CLI can interact remotely with the Factory Assistant Supervisor using the
remote_api app from the developer app repository.
After installing and starting the app, a token is shown in the remote_api
app log, which is needed for further development.
Fork (https://github.com/esaueng/factory-assistant-cli/fork) or clone this repository.
export SUPERVISOR_ENDPOINT=http://192.168.1.2
export SUPERVISOR_API_TOKEN=replace_this_with_remote_api_token
go run main.go infoNote: Replace the 192.168.1.2 with the IP address of your Factory Assistant
instance running the remote_api app and use the token provided.
We use go modules; an example build below:
CGO_ENABLED=0 go build -ldflags="-s -w" -o "ha"For details how we build cross for different architectures, please see our build action file.
- Create a feature branch on your fork/clone of the git repository.
- Commit your changes.
- Rebase your local changes against the
masterbranch. - Run test suite with the
go test ./...command and confirm that it passes. - Run
gofmt -sto ensure your code is formatted properly. - Create a new Pull Request.