Multicolour documentation CLI

CLI

Multicolour comes with a CLI to help you get started with your projects.

The init wizard will guide you through some common options to create some basic, example content for you.

Run multicolour init [target], where target is optional or where you want to generate your project.

You’ll be warned that it will bash (overwrite) any existing app in that directory and then ask if you wish to continue.

You will then be asked for a few technology choices, use enter and space to select and progress.

Once you’ve answered the questions, the wizard will spend a few seconds generating some files for you and when it has finished creating basic content for you and installing the dependencies of the project, it will display a message.

CLI Tool in action

You can start your service by running multicolour start and visiting http://localhost:1811/docs to view your new API’s documentation.

Next steps?

Open your [target] in your favourite editor and get to the interesting part of your development.

multicolour version

Returns the version string for Multicolour, E.G 0.5.2

multicolour plugin-add [plugin]

Add a plugin to this install of Multicolour. This will install and save the plugin to your package.json. By default, it will only search for official plugins but passing the --no_prefix|-np argument will install non-officially supported plugins as well.

Does not currently update your plugins config in the package.json as some plugins are plugins for the server.

multicolour start

Start your services, this command is really only useful if you are using the package.json based configuration as generated by the init command. Below is the default package.json for posterity.

{
  "version": "1.0.0",
  "scripts": {
    "start": "multicolour start"
  },
  "engineStrict": true,
  "engines": {
    "node": ">= 4.0.0"
  },
  "dependencies": {
    "joi": "^10.2.2",
    "multicolour": "^0.6.3",
    "multicolour-server-hapi": "^1.4.0",
    "sails-postgresql": "0.11.4"
  },
  "multicolour": {
    "config": "./config",
    "plugins": [
      {
        "as": "server",
        "name": "multicolour-server-hapi",
        "plugins": []
      }
    ]
  },
  "name": "test",
  "description": "test"
}