Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including moleculer-cli with all npm packages installed. Try it out:

moleculer-cli lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("moleculer-cli/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

moleculer-cli v0.6.6

:herb: Command line tool for Moleculer

Moleculer logo

Command line tool for Moleculer framework NPM version


  • initialize new projects from templates
  • connect to a system
  • start a local broker with REPL


npm install -g moleculer-cli


Initialize new project

Init a new project for a module

moleculer init module my-module

Init a new Moleculer project

moleculer init project my-first-project

Official templates

Start a broker

Start a broker locally This command starts a new ServiceBroker locally and switches to REPL mode.

moleculer start

Start a broker and connect to a transporter The following commands start a new ServiceBroker, connect to a transporter server and switch to REPL mode.

# With TCP transporter
moleculer connect 

# With NATS transporter (you need to install NATS lib globally with `npm i nats -g` command)
moleculer connect nats://localhost:4222

# With Redis transporter (you need to install Redis lib globally with `npm i ioredis -g` command)
moleculer connect redis://localhost

# With MQTT transporter (you need to install MQTT lib globally with `npm i mqtt -g` command)
moleculer connect mqtt://localhost


Please read our documentation on Moleculer site


The moleculer-cli project init command is based on vue-cli project.


Please send pull requests improving the usage and fixing bugs, improving documentation and providing better examples, or providing some testing, because these things are important.


Moleculer-cli is available under the MIT license.


Copyright (c) 2019 MoleculerJS

@moleculerjs @MoleculerJS

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free