Install the OLP CLI
This section describes how to install and configure the OLP CLI and start using it to access the HERE platform services.
System requirements
The following operating systems are supported:
- Windows 10
- Linux (Ubuntu 18.04)
- macOS Sierra or higher
The OLP CLI requires the Java Runtime Environment (JRE) version 1.8.0_91 or above.
Note: JRE version
To determine the version installed on your machine, run the java -version
command in a terminal window.
Use winget package manager
The winget
package manager enables Windows users to discover, install, upgrade, and remove the OLP CLI.
If the OLP CLI has been installed with the winget
package manager, the image of OpenJDK 17
has been packed with it and is used for the command execution. There is no need to install another JRE or JDK.
To install the OLP CLI using winget
, run the following command:
winget install HERE.OLPCLI
To upgrade the OLP CLI using winget
, run the following command:
winget upgrade HERE.OLPCLI
To remove the OLP CLI using winget
, run the following command:
winget uninstall HERE.OLPCLI
Note: Experimental feature
This feature is experimental and can contain both known and undetected errors.
Use OLP CLI installer
The installer is the recommended solution for Windows users.
To install the OLP CLI using the Windows installer, download the OLP CLI from the platform portal and install using GUI.
The installer takes care of setting up the PATH
environment and informs you about a new version if you rerun the installer.
To upgrade the OLP CLI, run the command prompt as administrator and execute the following command:
olp version update
To remove the OLP CLI, follow the steps below:
- Select
Start
, then select Settings
> Apps
> Apps & features
. - Select the
OLP CLI
, and then press Uninstall
.
Use apt package manager
The apt
package manager enables users of Debian-based distributions to discover, install, upgrade, and remove the OLP CLI.
If the OLP CLI has been installed with the apt
package manager, the image of OpenJDK 17
has been packed with it and is used for the command execution. There is no need to install another JRE or JDK.
To install the OLP CLI using apt
, run the following commands:
- Add the HERE Platform Debian repository where
olp-cli
Debian package is published
echo "deb https://repo.platform.here.com/artifactory/debian stable main" >> /etc/apt/sources.list
- Install GPG key from the HERE Platform Debian repository
wget -qO- https://repo.platform.here.com/artifactory/api/gpg/key/public | apt-key add -
- Update package information and install OLP CLI package
apt-get update
apt-get install olp-cli
Note: Required processor architecture
For the OLP CLI
installation with the apt
package manager, processor architecture amd64
is required.
To upgrade the OLP CLI using apt
, run the following command:
apt-get update
apt-get install olp-cli
To remove the OLP CLI using apt
, run the following command:
apt-get remove olp-cli
Note: Experimental feature
This feature is experimental and can contain both known and undetected errors.
Use Homebrew
Homebrew is a package manager for macOS and Linux. You can use it to install the latest version of the OLP CLI as follows:
brew install heremaps/olp-cli/olp
If you want to update the OLP CLI, run the following command:
brew upgrade olp
To remove the package, use the following command:
brew uninstall olp
Note: Experimental Feature
This feature is experimental and can contain both known and undetected errors.
Use OLP CLI ZIP archive
To install the OLP CLI from the ZIP archive, download the ZIP archive from the platform portal and follow the steps below:
- Unzip the archive to the folder.
- On Linux, add the full path to the folder with the
olp
file to your PATH
environment variable and export it to the .bash_profile
file, which is a hidden file that contains configurations scripts and environment variables, that runs when bash is invoked. - On Windows, add the full path to the folder with the
olp.bat
file to your PATH
environment variable.
To upgrade the OLP CLI, run the command prompt as administrator and execute the following command:
olp version update
To remove the OLP CLI, follow the steps below:
- Remove OLP CLI from the PATH environment variable which has been set up by the instructions above.
- Delete the folder with the CLI binaries.
Install the OLP CLI in your CI/CD environment
The recommended way to install the OLP CLI in a CI/CD environment is through Maven, as follows:
-
Download and configure your repository credentials.
-
Create an OLP_TOOLS
environment variable that contains the path to where you want to download the OLP CLI:
OLP_TOOLS=user/olp_tools
mvn dependency:unpack -Dartifact=com.here.platform:cli_2.12:LATEST:zip -DoutputDirectory=\$OLP_TOOLS
set OLP_TOOLS=C:/user/olp_tools
mvn dependency:unpack -Dartifact=com.here.platform:cli_2.12:LATEST:zip -DoutputDirectory=%OLP_TOOLS%
Run the following commands if you want to install the OLP CLI less than or equal to the 9.3.9 version:
OLP_TOOLS=user/olp_tools
mvn dependency:unpack -Dartifact=com.here.platform:cli:LATEST:zip -DoutputDirectory=\$OLP_TOOLS
set OLP_TOOLS=C:/user/olp_tools
mvn dependency:unpack -Dartifact=com.here.platform:cli:LATEST:zip -DoutputDirectory=%OLP_TOOLS%
-
Add the directory with the OLP CLI to your PATH
variable:
export PATH="$PATH:$OLP_TOOLS"
cd %OLP_TOOLS%
set PATH=%cd%;%PATH%
The newly updated PATH
variable is only visible to all child processes.
Now OLP CLI is installed. To access it from the command line, type: olp [command]
.
You can integrate the OLP CLI with your CI/CD environment using automation scripts. For more information, see Scripting Tips.
Install an older version of the OLP CLI
We recommend to always use the latest version of the OLP CLI to stay up to date with the most recent HERE platform features. However, if, for some reason, you need an older version of the OLP CLI, use Maven to download it, as follows:
- Download and configure your repository credentials.
-
Run the commands below. The OLP_CLI_VERSION
parameter must be greater than the 9.3.9 version.
OLP_CLI_DIR=<path/to/directory>
OLP_CLI_VERSION=<desired-cli-version>
mvn dependency:unpack -Dartifact=com.here.platform:cli_2.12:$OLP_CLI_VERSION:zip -DoutputDirectory=$OLP_CLI_DIR -Dmdep.overWriteReleases=true
set OLP_CLI_DIR=<path/to/directory>
set OLP_CLI_VERSION=<desired-cli-version>
mvn dependency:unpack -Dartifact=com.here.platform:cli_2.12:%OLP_CLI_VERSION%:zip -DoutputDirectory=%OLP_CLI_DIR% -Dmdep.overWriteReleases=true
Run the following command if you want to install the OLP CLI less than or equal to the 9.3.9 version:
OLP_CLI_DIR=<path/to/directory>
OLP_CLI_VERSION=<desired-cli-version>
mvn dependency:unpack -Dartifact=com.here.platform:cli:$OLP_CLI_VERSION:zip -DoutputDirectory=$OLP_CLI_DIR -Dmdep.overWriteReleases=true
set OLP_CLI_DIR=<path/to/directory>
set OLP_CLI_VERSION=<desired-cli-version>
mvn dependency:unpack -Dartifact=com.here.platform:cli:%OLP_CLI_VERSION%:zip -DoutputDirectory=%OLP_CLI_DIR% -Dmdep.overWriteReleases=true
For the list of released CLI versions, see the docs.