Production Ready Kumologica: CLI

Getting started with Kumologica Command Line Interface: installation, project creation and running Kumologica Designer

Kumologica
3 min readSep 20, 2022
Shell
Photo by Gabriel Heinzer on Unsplash

Kumologica SDK release is a major milestone for Kumologica products to be used in enterprise environment. It combines all products into single npm package. It elevates command line interface as a primary interface for running designer, building binaries, testing and deployments.

Kumologica SDK consists of 4 products:

  • Kumologica Designer
  • Kumologica Runtime
  • Kumologica CLI
  • Kumologica Node Development Kit

This article introduces Kumologica CLI commands to use Kumologica Designer.

Dependencies

Kumologica SDK is packaged and distributed as npm module. The only dependencies are node js and npm.

Refer to your cloud provider documentation what Node JS versions are supported by their serverless compute services.

SDK Installation

Kumologica SDK is available as a npm module. It is recommended to install it globally using following command:

npm install -g @kumologica/sdk

Once installed, Kumologica CLI is available under kl command:

$ klkl <command>Commands:
kl build <provider> Build kumologica flow binaries
kl create Create a kumologica project
kl deploy <provider> Deploy kumologica flow binaries
kl doc <format> Generate documentation for kumologica flow
kl export <language> Export deployment scripts for kumologica flow
kl open [project_directory] Open Kumologica Designer
kl test [project_directory] Run test suite
Options:
— version Show version number [boolean]
— help Show help [boolean]
Not enough non-option arguments: got 0, need at least 1

Upgrading Kumologica SDK to the latest version is as simple as repeating the installation command.

Installing specific version of SDK, for example version 3.0.25:

npm install -g @kumologica/sdk@3.0.25

Creating sample project

There are 2 ways of creating sample Kumologica project.

1. Using Kumologica CLI

To create sample project using Kumologica CLI go to directory where you would like to create project and type ‘create’ command:

# Create new Kumologica project
kl create -p example-project

This command creates sub directory: ‘example-project’ with kumologica project artefacts:

example-project-flow.json
package.json

2. Using Kumologica Designer

You can always create sample project using Kumologica Designer. Simply press ‘Home’ button on the toolbar and then ‘Create a new Kumologica project’. You will be prompted for project name and root directory.

New project will always use fixed latest runtime version. For example at the time of writing of this article latest version of Kumologica Runtime is 3.0.26 and the example-project has following dependencies in package.json file:

"dependencies": {
"@kumologica/runtime": "3.0.26"
}

Opening designer

Kumologica Designer can be opened using ‘open’ command:

# Open Kumologica Designer
kl open

If Kumologica Designer is opened for the first time then this command will ask for acceptance of terms and conditions and then open welcome screen. This screen allows creation of new project or opening existing ones. Otherwise Kumologica Designer will automatically open most recent project.

You can also open project from the specific directory. Using sample project example go to example-project directory and run command:

# Go to example-project directory
cd example-project
# Open project in Kumologica Designer
kl open .

This will open example-project in Kumologica Designer regardless of what previous project was opened.

You can also use relative or fixed paths to open projects in Kumologica Designer:

kl open /Users/user/projects/example-project

Kumologica Runtime

Kumologica Designer automatically runs Kumologica Runtime in the background. This allows local testing of flows within designer or from the outside, for example using Postman tool or curl commands.

By default the Kumologica Runtime is running locally on port 1880, this allows to test example project api:

curl http://localhost:1880/hello
{"hello":"world"}

One of the enhancements introduced in SDK release is capability to run multiple instances of Kumologica Designer.

In such a case each embeded Kumologica Runtime will try to acquire next available port number: 1881, 1882, ect.

Project panel in Kumologica Designer shows the port number, running status and version of associated Kumologica Runtime.

Conclusion

Kumologica SDK is a major update of Kumologica products that simplifies management of all components and also takes advantage of rich capabilities of npm. Next articles will explore other CLI capabilities that enable use of Kumologica in enterprise environments.

Remember Kumologica is free to download and use. Go ahead and give it a try, we would love to hear your feedback.

More information

--

--

Kumologica
Kumologica

Written by Kumologica

Kumologica is the first low-code development solution that makes your integration services run on serverless compute regardless the cloud provider.

No responses yet