Installation

This document describes the steps to install the HOP Command Line Interface tool (HOP CLI, from here on). The main usage of the tool is bootstrapping new HOP-based web applications [1], or HOP applications for short.

At the end of this tutorial you will be ready to bootstrap your first HOP application.

Prerequisites

Three third-party programs are required to run the HOP CLI:

  • Babashka, that provides a fast-starting, native Clojure interpreter. It is used to interpret (run) the HOP CLI itself, as it is written in Clojure.

  • bbin, that provides utility commands for installing Babashka based tools.

  • OpenSSL, that provides cryptographic capabilities to the HOP CLI. The HOP CLI uses it to store credentials securely, and to run other cryptographic operations like creating self-signed SSL certificates.

Install Babashka

There are multiple installation options available depending on your operating system and package manager of choice. You can find them described in the official documentation.

Once you are done with the installation, you can check that the installation was successful by running the following command from a terminal:

$ bb version
Babashka v1.0.168

As of this writing, the HOP CLI requires Babashka v1.0.168 or later. Using the latest available version is generally recommended.

Install bbin

There are multiple installation options available depending on your operating system. You can find them described in the bbin Installation page.

Once you are done with the installation, you can check that the installation was successful by running the following command from a terminal:

$ bbin version
bbin 0.1.3

As of this writing, the HOP CLI requires bbin 0.1.3 or later. Using the latest available version is generally recommended.

Install OpenSSL

OpenSSL is a widely used tool, so you might have it installed on your system already. You can check that by running the following command from a terminal:

$ openssl version
bash: openssl: command not found

If a version number is returned, you already have it installed and no further steps are needed. No specific version of OpenSSL is required, but using the latest available version is recommended.

If not, you will have to install the program.

For Debian/Ubuntu you can run the following command:

$ sudo apt install openssl

For macOS you can run the following command (assuming you already have brew installed):

$ brew install openssl

We do not provide installation steps for other operating systems. But, as it is a very common tool, it should be straightforward to find the steps on the web.

You can check that OpenSSL has been successfully installed by running the version command again:

$ openssl version
OpenSSL 1.1.1n  15 Mar 2022

Install the HOP CLI

The HOP CLI is distributed as a Babashka Uberjar. All the required Clojure dependencies and resources are packed in a single JAR file that can be installed using bbin running the following command in a terminal.

$ bbin install --as hop https://github.com/gethop-dev/hop-cli/releases/latest/download/hop-cli.jar

Run the HOP CLI

You can now run the HOP CLI by typing hop in a terminal. All the available sub-commands provided by the tool will be printed:

$ hop
Usage:  <subcommand> <options>

Subcommands
  version    Get HOP CLI version
  bootstrap  HOP bootstrap commands
  aws        AWS utility commands
  keycloak   Keycloak utility commands

You are now ready to bootstrap your first HOP application. You can follow the Run a HOP application on AWS tutorial to create and deploy a HOP application on Amazon Web Services.

Footnotes