Skip to content

Creating a new plugin

Ricardo Arturo Cabral edited this page Jan 15, 2017 · 1 revision

Creating a new plugin

Follow the next steps to create a new plugin for Marvin.

  • Step One - Install cookiecutter:

If you have already installed cookiecutter, skip this step.

    $ pip install --user cookiecutter

Note that you only need to do step one once.

  • Step Two - Create a new plugin from our template:
    $ cookiecutter https://github.com/BotDevGroup/cookiecutter-marvinbot-plugin
  • Step Three - Customize setup.py: Make sure to customize your plugin's setup.py.
    $ vi my_new_plugin/setup.py
  • Step Four - Install your plugin:
    (venv) $ cd my_new_plugin
    (venv) $ python3 setup.py develop
  • Step Five - Register your plugin with your bot: Open your settings.json file:
    $ cd marvinbot
    $ vi settings.json

Append your plugin's name to the plugins key:

{
    "plugins": {
        "my_new_plugin"
    }
}

Clone this wiki locally