# solfegejs-cli

> Command Line Interface of SolfegeJS

Latest version **4.0.2** (published 2018-01-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install solfegejs-cli
pnpm add solfegejs-cli
yarn add solfegejs-cli
bun add solfegejs-cli
```

## 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 | 4.0.2 |
| Published | 2018-01-06 |
| First published | 2014-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 9 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | neolao |
| Maintainers | neolao |

## Links

- npm: https://www.npmjs.com/package/solfegejs-cli
- Repository: https://github.com/neolao/solfege-bundle-cli
- Homepage: https://github.com/neolao/solfege-bundle-cli#readme
- Issues: https://github.com/neolao/solfege-bundle-cli/issues
- npm.io page: https://npm.io/package/solfegejs-cli

## Dependencies (2)

- [colors](https://npm.io/package/colors.md) ^1.1
- [minimist](https://npm.io/package/minimist.md) ^1.2

## Recent versions

- 4.0.2 (latest) — 2018-01-06
- 4.0.1 — 2018-01-02
- 4.0.0 — 2017-12-09
- 2.0.3 — 2017-05-13
- 2.0.2 — 2017-05-13
- 2.0.1 — 2016-09-28
- 2.0.0 — 2016-09-22
- 1.4.3 — 2015-07-13
- 1.4.2 — 2015-07-13
- 1.4.1 — 2015-07-08
- 1.4.0 — 2015-07-07
- 1.3.2 — 2015-07-07
- 1.3.1 — 2015-07-03
- 1.3.0 — 2015-07-03
- 1.2.1 — 2014-11-26
- … 7 more at https://npm.io/package/solfegejs-cli/versions

## README

solfegejs-cli
=============

Command Line Interface of SolfegeJS


Installation
------------

The bundle is included by default in SolfegeJS. You don't need to install it.

See [SolfegeJS](https://github.com/neolao/solfege/)


Available commands
------------------

In order to expore commands, you need to create a `console.js` file:

```javascript
const solfege = require("solfegejs");

// Initialize the application
let application = solfege.factory();

// Start the application
// The first 2 parameters are removed (node and the script)
application.start(process.argv.slice(2));
```


Expose a command
----------------

To expose a command, you have to create a service with a specific tag:

```yaml
services:
    my_command:
        class: "Command/MyCommand"
        tags:
            - { name: "solfege.console.command" }
```

And your class must implement 2 methods (`getName` and `execute`):

```javascript
export default class MyCommand
{
    getName()
    {
        return "my-command";
    }

    *execute(parameters, options)
    {
        console.log("My command executed");
    }
}
```

Now you can call your command like that:

```bash
node console.js my-command
```

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