DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • 5 Best Node.js Practices to Develop Scalable and Robust Applications
  • Go Flags: Beyond the Basics
  • Publishing Flutter Packages to JFrog Artifactory
  • Building a Rust Command Line Interface to Chat With Llama 3.2

Trending

  • Designing a Java Connector for Software Integrations
  • AI’s Role in Everyday Development
  • AWS to Azure Migration: A Cloudy Journey of Challenges and Triumphs
  • Agile and Quality Engineering: A Holistic Perspective

Introducing Kumologica CLI

Now you can develop your serverless flows using Kumologica CLI.

By 
Pranav K user avatar
Pranav K
DZone Core CORE ·
Oct. 03, 22 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
3.3K Views

Join the DZone community and get the full member experience.

Join For Free

Kumologica SDK release is a major milestone for Kumologica products to be used in an enterprise environment. It combines all products into a single npm package. It elevates the 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 an npm module. The only dependencies are node js and npm.

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

SDK Installation

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

Shell
 
npm install -g @kumologica/sdk

Once installed, Kumologica CLI is available under kl command:

Shell
 
$ 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 suiteOptions:
 — 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 a specific version of SDK, for example, version 3.0.25:

Shell
 
npm install -g @kumologica/[email protected]

Creating Sample Project

There are 2 ways of creating a sample Kumologica project.

1. Using Kumologica CLI

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

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

This command creates a subdirectory: ‘example-project’ with kumologica project artefacts:

Shell
 
example-project-flow.json
package.json

2. Using Kumologica Designer

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

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

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

Opening Designer

Kumologica Designer can be opened using the ‘open’ command:

Shell
 
# Open Kumologica Designer
kl open

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

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

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

This will open an 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:

Shell
 
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 the designer or outside, for example using the Postman tool or curl commands.

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

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

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

In such a case each embedded Kumologica Runtime will try to acquire the following available port numbers: 1881, 1882, etc.

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

Conclusion

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

Command-line interface Software development kit

Opinions expressed by DZone contributors are their own.

Related

  • 5 Best Node.js Practices to Develop Scalable and Robust Applications
  • Go Flags: Beyond the Basics
  • Publishing Flutter Packages to JFrog Artifactory
  • Building a Rust Command Line Interface to Chat With Llama 3.2

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: