https://github.com/moleculerjs/moleculer-cli
:herb: Command line tool for Moleculer
https://github.com/moleculerjs/moleculer-cli
cli command-line-tool moleculer
Last synced: 3 months ago
JSON representation
:herb: Command line tool for Moleculer
- Host: GitHub
- URL: https://github.com/moleculerjs/moleculer-cli
- Owner: moleculerjs
- License: mit
- Created: 2017-05-11T12:28:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-06-12T19:56:28.000Z (4 months ago)
- Last Synced: 2025-06-20T15:57:13.967Z (4 months ago)
- Topics: cli, command-line-tool, moleculer
- Language: JavaScript
- Homepage: http://moleculer.services/docs/moleculer-cli.html
- Size: 1.34 MB
- Stars: 50
- Watchers: 4
- Forks: 28
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/moleculerjs/moleculer)
# Command line tool for Moleculer framework [](https://www.npmjs.com/package/moleculer-cli)
## Features
- initialize new projects from templates
- connect to a system
- start a local broker with REPL## Install
``` bash
npm install -g moleculer-cli
```## Usage
### Initialize new project
**Init a new project for a module**
``` bash
moleculer init module my-module
```**Init a new Moleculer project**
``` bash
moleculer init project my-first-project
```[**Official templates**](https://github.com/topics/moleculer-template)
### Start a broker
**Start a broker locally**
This command starts a new ServiceBroker locally and switches to REPL mode.
```bash
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.```bash
# 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
```## Documentation
Please read our [documentation on Moleculer site](http://moleculer.services/docs/moleculer-cli.html)## Credits
The `moleculer-cli` project `init` command is based on [vue-cli](https://github.com/vuejs/vue-cli) project.## Contribution
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.## License
Moleculer-cli is available under the [MIT license](https://tldrlegal.com/license/mit-license).## Contact
Copyright (c) 2022 MoleculerJS[](https://github.com/moleculerjs) [](https://twitter.com/MoleculerJS)