Solution CLI

Introduction

The Command-Line Interface (CLI) is installed locally to give the user the ability to perform commands against solutions modeled in design center in order to facilitate needed low-code implementations for these modeled solutions (i.e. implement services, commands, API operations and external APIs). The Solution CLI, once installed, can be integrated in the IDE environment. Before you can use the Solution CLI tool you need to install it and run the set up.

Installation

  1. Go to Solution Designer and open your modeled solution.

  2. At the bottom you will find a menu bar. Click on Solution CLI to expand the pane.

  3. Inside this pane click on Solution CLI Setup to expand the section. You will find instructions on how to install and set up the CLI.

  4. Click on the provided link to download the CLI.tar file.

  5. After successfully downloading the file open a terminal on your machine and paste in the following code to install the CLI on your computer (replace with the folder you have downloaded the CLI.tar to):
    npm install -g <download folder>/CLI.tar
  6. Switch back to the Solution CLI Setup section in Solution Designer and download cli-config.json by clicking on the provided link.

  7. Run the following command in your terminal to set up the CLI (replace <download folder> with the folder you have downloaded the cli-config.json to):

     fss setup --file <download folder>/cli-config.json

Prepare debugging

To be able to run tests on deployments inside this project from within your IDE you also need to set up the CLI to work with the corresponding Solution Envoy.

  1. Go to Solution Designer and open your modeled solution.

  2. In the navigation bar on the left click on CI/CC

  3. On the Pipeline Configurations tab click on the link to the project you want to work on. This will open a new tab and lead you to the OpenShift Web Console.

  4. In the navigation bar of the OpenShift Web Console choose the Developer-view to see the Topology-button.

  5. After clicking on the Topology-button you will be presented with all solutions deployed in this project. By clicking on the icon with the little arrow of one of the solutions you will be redirected to the Solution Envoy of this project.

  6. Login to Solution Envoy with valid credentials.

  7. Click on Infrastructure section and use the Download-button on the Solution CLI Setup card to download the configuration file.

  8. Run the following command in your terminal to set up the CLI (replace <download folder> with the folder you have downloaded the file to and replace <filename> with the actual name of the downloaded file):

    fss setup-envoy --file <download folder>/<filename>

Please make sure that you run this command inside the root directory of the solution.

Note: Remember that you have to repeat the setup steps (excl. installation) every time you work on a different project.

Solution CLI Commands

The following commands are available in the Solution CLI:

fss clone

Cloning a solution that was modeled in the Solution Designer of the current setup stage to the local file system. It requires two parameters:

  • the solution which consists of the group key and the solution acronym

  • the Git provider alias.

Command Options:

OptionDescription
-s, --solution <solution>The identifier of the solution we want to clone (containing the repository group key and repository slug)
-p, --provider-alias <provider>Alias of the Git provider in which the solution repository resides
-S, --stage <stage>The stage name

fss compile

Compile project files.

fss help

Displays the documentation of the Solution CLI.

fss install

Install or update all dependencies of the project.

fss lint

Check project files for linting errors. Currently only available for low-code solutions based on TypeScript!

fss login-envoy

Used to login to Solution Envoy environment for debug / test support. It will ask for the Solution Envoy credentials.

Command Options:

OptionDescription
-u, --username <username>Username for login. Alternative: ENV var "FSS_CLI_LOGIN_ENVOY_USERNAME"
-p, --password <password>Password for login. Alternative: ENV var "FSS_CLI_LOGIN_ENVOY_PASSWORD"
-S, --stage <stage>Stage name. Alternative: ENV var "FSS_CLI_LOGIN_ENVOY_STAGE"

Currently only available for low-code solutions based on TypeScript!

fss login

It will ask for the same credentials as the Solution Designer, the login is usually valid for a longer period, as defined by your company policies.

Command Options:

OptionDescription
-u, --username <username>Username for login. Alternative: ENV var "FSS_CLI_LOGIN_USERNAME"
-p, --password <password>Password for login. Alternative: ENV var "FSS_CLI_LOGIN_PASSWORD"
-S, --stage <stage>Stage name. Alternative: ENV var "FSS_CLI_LOGIN_STAGE"

fss prepare-debug

Used to prepare debug sessions against the configured Solution Envoy environment. It will ask for the Solution Envoy credentials.

Currently only available for low-code solutions based on TypeScript!

fss pull

Pull in the latest changes of the current branch from the Git repository you are currently on.

fss push

Add, commit and push changes to the Git repository

Command Options:

OptionDescription
-m, --message <message>Commit message
-f, --forceForcefully skip validation step. Be careful! Default is false

fss setup-envoy

Setup the Solution CLI to work with a Solution Envoy environment installation.

Command Options:

OptionDescription
-s, --string <string>Solution Envoy setup string
-f, --file <file>Path to the Solution Envoy setup file
-n, --no-interactiveSkip interactive functionality like prompts. Default is false

Currently only available for low-code solutions based on TypeScript!

Note: Please make sure that this command is executed within a solution context.

fss setup

Used to setup the Solution CLI to work with a Solution Designer installation. It takes all configuration as a base64 encoded string.

Command Options:

OptionDescription
-s, --string <string>Solution Designer setup string
-f, --file <file>Path to the Solution Designer setup file
-n, --no-interactiveSkip interactive functionality like prompts. Default is false

fss test

Run unit tests and integration tests within this solution

Currently only the unit tests are supported for Java solutions!

fss upgrade-framework

Automatically migrates implementation code from an older framework version to a new one.

fss upgrade-cli

Upgrade the Solution CLI to the latest version.

fss version

Displays the current version of the Solution CLI.

Attention: By using --help or -h after a command you will get detailed information on the expected syntax.