# ose-modules-cli

> Command line interface to quickly setup project structure for the OSE microservice architecture

Latest version **1.0.0** (published 2019-10-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install ose-modules-cli
pnpm add ose-modules-cli
yarn add ose-modules-cli
bun add ose-modules-cli
```

Provides the command `ose`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-10-23 |
| First published | 2019-10-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 36 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Damian Dominella |
| Maintainers | damiandominella |
| Keywords | ose, microservices, modules, cli |

## Links

- npm: https://www.npmjs.com/package/ose-modules-cli
- Repository: https://github.com/damiandominella/ose-modules-cli
- Homepage: https://github.com/damiandominella/ose-modules-cli#readme
- Issues: https://github.com/damiandominella/ose-modules-cli/issues
- npm.io page: https://npm.io/package/ose-modules-cli

## Dependencies (6)

- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [yargs](https://npm.io/package/yargs.md) ^14.2.0
- [figlet](https://npm.io/package/figlet.md) ^1.2.4
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1.0
- [inquirer](https://npm.io/package/inquirer.md) ^7.0.0
- [zip-a-folder](https://npm.io/package/zip-a-folder.md) 0.0.9

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [@temporal-architect/claude-plugin](https://npm.io/package/@temporal-architect/claude-plugin.md) — 335 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-10-23
- 0.0.1 — 2019-10-23

## README

# OSE Modules CLI

A developer-friendly command line interface to quickly setup project structure and creation of modules for the OSE microservice architecture.

## Get started

To create a new project for your microservices, just type

```bash
ose new
```

This will create all the folder and files that are needed to start developing microservices (modules). Please see **[new project](#new-project)** for details.

Now, to create a module use

```bash
ose add
```

(make sure to run the command inside the project directory, otherwise it won't work). Please see **[add module](#add-module)** for details.

Now you're ready to start develop your first module, start from `src/module_name/module_name.ts`.

### New project

An OSE project is like a wrapper that allows you to develop and build microservices that you can deploy to an OSE environment. The structure is simple and to create a new project from scratch you can use the `ose new` command. A simple command line interface will ask you to define some basic configuration, like the **project name**, the author, and the **ose install path**. This path refers to the `install/` folder of your OSE environment (usually it's located in `C:/ose/workspace/files/install/` but this depends on your OSE Installation).

### Add module

A module is a microservice written in Typescript, that can be compiled (using webpack) and deployed to an OSE environment. It's composed of a main typescript file and a `package.json` which defines its behaviour. The code structure is at your choice, so you can add as many typescript files as you need , since when compiled it's seen as an unique javascript file.
To create a new module, use the `ose add` command, which will ask you to insert the **module name**  and some other configurations that you can obviously change later. Now you will see a folder named as you defined under the `src/` folder, and you can start coding from the main .ts file, which is `module_name.ts`. You can see examples [here](#examples)

### Build module(s)

When you're done with your development, you can build the modules. To do this, just use `ose build` and select the modules you want to build from the list. This may take a few seconds to execute, depending on the module files. When the build is done, you can go to the [next step](#deploy-modules) and deploy the builded modules.

### Deploy module(s)

When you're done and your module is compiled (you must have a `dist/` directory which contains the builds) you're ready to deploy your module(s). By using `ose deploy` you can choose which module(s) to deploy and in a nutshell you will have your modules installed in your OSE environment (here the **ose install path** defined in the project `package.json` is used).

## Examples

<pre>
<b>ose new</b>

? Project name: _my_project_
? Author: Damian Dominella
? OSE install path (absolute path where the modules will be installed): C:/ose/workspace/files/install/

Project: _my_project_ generated successfully!

<b>cd _my_project_</b>
<b>npm install</b>

<b>ose add</b>

Adding a new module for the project _my_project_

? Name of the module: _my_module_
? Enabled: Yes
? Version: 1.0.0
? Log level: info
? Published: Yes

Module _my_module_ generated successfully!

<b>ose build</b>

? Select module(s) to build:
>(*) _my_module_

Building module _my_module_, please wait...

...webpack info logs...

_my_module_: build completed

All modules builded successfully!

<b>ose deploy</b>

? Select module(s) to deploy:
>(*) _my_module_

Installing module _my_module_...

_my_module_: install completed
</pre>

All done! You can now user your first OSE microservice!

---
_Source: https://npm.io/package/ose-modules-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
