CLI
Last updated
Last updated
The Hava CLI provides a simple way to interact with Hava through a command line interface. This is a powerful way to integrate Hava into CI/CD and GitOps pipelines to ensure that diagrams are always up to date when changes are deployed in your environment
The CLI is available for Windows, MacOS, Linux, and as a Docker container
The cli is a single binary with no dependencies, so install is a simple matter for downloading the binary and run it from the local environment
We have provided some simple install scripts to simplify this and keep the cli up to date automatically using homebrew for macOS
More install options are available from our detailed installation instructions
Before use the CLI needs to be configured with the API token so it can authenticate to the API. The CLI can be configured either using environment variables or by using the in-built configure command to save the configuration long term
HAVA_TOKEN
yes
API token to authenticate with Hava API
HAVA_ENDPOINT
no
API Endpoint to connect to, defaults to SaaS endpoint. This is useful when Hava is running in a custom environment
More details on configuring Hava CLI can be found in the GitHub repository
Once installed a configured, the CLI can be called from the command line with the hava
command
To list all sources in your Hava account use the source list
command, this will display all the available sources in a table
You can configure the CLI to output in multiple formats, JSON, HTML, Markdown etc.
To print out the result in json use the --json
flag
See the GitHub repository for details on the complete list of formats
Our CLI makes it trivial to integrate Hava with the CI/CD tool of your choice.
Check out our examples in github for details on using the CLI in common pipelines and workflows