Solution CLI

Introduction

The Command-Line Interface (CLI) is installed locally to give the user the ability to perform commands against projects modelled in Solution Designer in order to facilitate low-code implementations for these modelled projects (i.e. implement services, commands and API operations). The Solution CLI, once installed, can be integrated into the IDE of your choice.

Note: Before you can use the Solution CLI tool you need to install it and run the setup.

Installation

  1. Go to Solution Designer and open your modelled project

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

  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 <download folder> 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

The Solution CLI allows you to communicate directly with the cluster in order to provide local debugging.

Attention: To be able to run tests from your local machine against services running in the cluster, you need to have your project deployed at least once. This will create an endpoint for the CLI to provide connection to the cluster's FSW database and other facilities.

After your project has been successfully deployed at least once you can connect the Solution CLI with the Solution Envoy running inside the deployment target of your choice. Typically, this would be a DEV environment or stage.

To connect the CLI with the Solution Envoy follow the steps below:

  1. In the navigation bar on the left click on CI/CD.

  2. On the Pipeline Configurations tab select the deploy pipeline configuration that points to the deployment target you want to work on

  3. Click on the link to the Solution Envoy inside the row. This will open a new tab and lead you to the Solution Envoy.

  4. Log in to Solution Envoy with valid credentials.

  5. In the left navigation bar click on Infrastructure and use the Download button on the Solution CLI Setup card to download the configuration file.

  6. Now cd into the root of your project folder

  7. Run the following command to set up the CLI (replace with the folder you have downloaded the file to and replace with the actual name of the downloaded file):

    fss setup-envoy --file <download folder>/<filename>
  8. After you have set up the CLI configuration you can connect to the cluster by executing the following command:

    fss prepare-debug

If you are not already logged in to this deployment target you will be prompted to enter your credentials. The CLI will then request a token for authentication against the deployment target's endpoint.

Tip: The token the CLI is using has an expiration time set in the OIDC provider's settings. Please contact your local OIDC administrator to adjust the expiration time to your requirements.

After having successfully logged in you can start debugging from your local machine without having to run the pipeline.

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

Solution CLI commands

The following commands are available in the Solution CLI:

fss clone

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

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

  • the Git provider alias.

Command options:

OptionDescription
-s, --solution <solution>The identifier of the project you want to clone (containing the repository group key and repository slug)
-p, --provider-alias <provider>Alias of the Git provider in which the project 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.

Note: Only available for low-code projects based on TypeScript.

fss login-envoy

Used to log in to Solution Envoy for local 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"
Note: Only available for low-code projects 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.

Note: Only available for low-code projects 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

Set up the Solution CLI to work with a Solution Envoy instance.

Command options:

OptionDescription
-f, --file <file>Path to the Solution Envoy setup file
-n, --no-interactiveSkip interactive functionality like prompts. Default is false
Note: Only available for low-code projects based on TypeScript.
Attention: >Please make sure that this command is executed within a project context.

fss setup

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

Command options:

OptionDescription
-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 project

Note: Currently only the unit tests are supported for Java projects!

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.

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