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.
Installation
Go to Solution Designer and open your modelled project
At the bottom you will find a menu bar. Click on Solution CLI to expand the bar
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
Click on the provided link to download the CLI.tar file
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
Switch back to the Solution CLI Setup section in Solution Designer and download
cli-config.json
by clicking on the provided linkRun 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.
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:
In the navigation bar on the left click on CI/CD.
On the Pipeline Configurations tab select the deploy pipeline configuration that points to the deployment target you want to work on
Click on the link to the Solution Envoy inside the row. This will open a new tab and lead you to the Solution Envoy.
Log in to Solution Envoy with valid credentials.
In the left navigation bar click on Infrastructure and use the Download button on the Solution CLI Setup card to download the configuration file.
Now cd into the root of your project folder
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>
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.
After having successfully logged in you can start debugging from your local machine without having to run the pipeline.
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:
Option | Description |
---|---|
-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.
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:
Option | Description |
---|---|
-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" |
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:
Option | Description |
---|---|
-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.
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:
Option | Description |
---|---|
-m, --message <message> | Commit message |
-f, --force | Forcefully 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:
Option | Description |
---|---|
-f, --file <file> | Path to the Solution Envoy setup file |
-n, --no-interactive | Skip interactive functionality like prompts. Default is false |
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:
Option | Description |
---|---|
-f, --file <file> | Path to the Solution Designer setup file |
-n, --no-interactive | Skip interactive functionality like prompts. Default is false |
fss test
Run unit tests and integration tests within this project
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.