Here™ Core CLI tool
The Here™ Core CLI tool is a package that allows you to do command line development in the Here™ Core environment without the hassle of using a GUI. One of the simplest ways to get up and running on Here™ Core is with the command-line interface (CLI) tool. With this tool, you can install the Here™ Core Runtime, launch applications with a URL or configuration file, create Windows installers, and create configuration files.
CLI tool prerequisites
Node and npm are required to install the CLI tool, but not for creating an Here™ Core app or platform. We recommend a global installation (-g
), as written in the installation information below, for ease of use.
Starting with version 4.0.0 of the openfin-cli package, you must use Node version 16 or higher.
License
You agree to the Developer License to download, use, test, or build with any Here™ Core technology. The code in this section is covered by the Here™ Core Developer License. If you have any questions, please contact support@here.io.
Install and use the Here™ Core CLI tool
Use the following commands into your terminal:
-
Enter the install command to download and install the Here™ Core CLI tool.
npm install -g openfin-cli
-
To launch an application, you need to create an application manifest file (typically named
app.json
) and specify the URL of your hosted web app. Enter the following launch command to auto-generate an app manifest file and point it to your hosted web app. The host URL is automatically added to the application manifest file.openfin --launch --url http://example.com
The command prints the location of the app manifest file that it creates. For example:
Manifest written to: C:\Users\YOURUS~1\AppData\Local\Temp\app-1620249981454-2142.json
You can move or rename this manifest file as needed. For example, you could copy it to your home directory and rename it
my_app.json
. -
To run the application again, use the
--config
option to specify the location of the app manifest file.openfin --launch --config my_app.json