Install OpenLegacy CLI (Windows)

Prerequisites

Install OpenLegacy CLI Using Installer

  1. Download the installation file.
  2. Unzip the downloaded file.
  3. Right-click on the file \openlegacy-cli.portable\ol\bin\install.bat and choose Run as administrator.
  4. Click on Yes when prompted:  Do you want to allow this app to make changes to your device?
    A message is displayed: Success: Specified value was saved. Press any key to continue... 
  5. Add the full path to the directory openlegacy-cli.portable\ol\bin to the System Environment Variable Path.
  6. Open a new Command Line Interface type window (e.g. cmd or Git BASH).
  7. Run the ol command to confirm that the CLI is working properly.
C:\WINDOWS\system32>ol
Usage: ol [OPTIONS] COMMAND [ARGS]...

  With OL-HUB CLI, you can easily create Module and Asset metadata from your
  legacy, store them in the OL-HUB and use them to generate Services. Run "ol
  create module" to create your first module.

Options:
  -v, -version, --version  Display OL-HUB CLI version
  -h, --help               Show this message and exit

Commands:
  add        Add Asset to Module metadata
  clone      Clone metadata
  config     Configure the CLI or module
  copy       Copy metadata
  create     Create metadata
  delete     Delete metadata from the OL-HUB or Asset/Field properties
  deploy     Deploy project to cloud
  export     Export metadata from OL-HUB
  import     Import metadata to OL Hub
  generate   Generate Service source code based on a project and a generator
  login      Login to OL-HUB
  logout     Logout from OL-HUB
  list       List modules, projects, connector, etc.
  push       Push metadata to OL-HUB
  set        Set Asset/Field properties
  start      Start service
  tag        Tag HUB resources
  templates  Templates operations
  test       Test an asset or connection
  usage      Get current tenant objects counters
  update     Update api-keys, etc.

Install OpenLegacy CLI with Chocolatey

  1. Install Chocolatey.
  2. Open your command shell (cmd.exe or powershell.exe) in a Run as Administrator mode.
  3. Add the OpenLegacy artifacts to Chocolatey.
choco source add --source=https://openlegacy.jfrog.io/artifactory/api/nuget/nuget-chocolatey --name=openlegacy
  1. Run the choco install command.
choco install openlegacy-cli

If you want to install a specific version, for example 1.5.0, run:

choco install openlegacy-cli --version=1.5.0
  1. Open a new Command Line Interface type window (e.g. cmd or Git BASH).
  2. Run the ol command to confirm that the CLI is working properly.

*OpenLegacy packages are also available at Chocolatey.org:
https://chocolatey.org/packages/openlegacy-cli

Upgrade OpenLegacy CLI with Chocolatey

  1. In your terminal, run the following:
choco upgrade openlegacy-cli
  1. To confirm that you upgraded OpenLegacy CLI to the latest version, run ol -v.

Uninstall the OpenLegacy CLI with Chocolatey

If you want to uninstall the OpenLegacy CLI run:

choco uninstall openlegacy-cli