MOD command line interface

From MOD Wiki
Revision as of 11:59, 24 September 2020 by Bramgiesen (talk | contribs) (Created page with "== Installation == First you'll need install the a small python tool that will communicate with the cloud API and ease the process of building and publishing your plugin. Simp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installation

First you'll need install the a small python tool that will communicate with the cloud API and ease the process of building and publishing your plugin. Simply follow the instructions from the mod-devel-cli project.

Once installed you can check the status:

$ modcli config list
Active environment: labs
Authenticated in [labs]: No
Registered environments: ['dev', 'labs']

If your active environment is not 'labs' then you have to change it:

$ modcli config set_active_env labs
Current environment set to: labs

Next you need to authenticate. The modcli tool will authenticate using SSO against MOD Forum. So make sure you register for an account first. Then:

$ modcli auth login_sso
SSO login requires you have a valid account in MOD Forum (https://forum.moddevices.com).
If your browser has an active session the credentials will be used for this login. Confirm? [y/N]: y
Logging in to [labs]...
You're now logged in as [xxx] in [labs].

Publishing a plugin

The most basic command for publishing a plugin is:

$ modcli bundle publish <path/to/.json>

When using this command it's important the the .mk file used for the package is in the same directory is the .json file. If .mk file is located somewhere else, for example when using the mod-plugin-builder, the '-p' flag can be used to provide a path to this file. This is done as follows:

$ modcli bundle publish -p ../mod-plugin-builder <path/to/.json>