User 1:24 AM
/nc command_create print <msg>
Quickstart
copied
Install Nimbella Commander
copied
You need to add Commander as a slash command integration in Mattermost in order to use Commander.
- We can create a slash integration by clicking on the settings bar on the left side of your screen and then click on Integrations.
- Click on Slash Commands
- Click on the Add Slash Command button
- You need to add just one slash command. Name the slash command /nc. This slash command will be used to create, configure, and manage your Commander Account and run your custom commands. Note that the request URL needs to be https://apigcp.nimbella.io/api/v1/web/nc/portal/gateway. Once done, click on Save.
- That’s it! After saving, you should see that /nc is set up. Once this is done, click on “Back to Mattermost” to start using Commander.
- Register your workspace with Commander by running /nc register
Test the installation
copied
In any channel of your Mattermost workspace, enter the command /nc
and press the Return key. Depending on the commands in your workspace, you may need to type /nc
and a space and then hit the Return key.
If the app is installed correctly, you will see a response from the Commander app showing the version number.
Tutorial 1: Create your first command
copied
Let's create a command. We'll explain these steps later on.
- Create a print command that takes a message parameterCommander App 1:24 AM
Created command
/nc
print
, edit the code - Change the source code for the print command to print the message by clicking on edit the code link
- Run the print command you just created.User 1:24 AM
/nc print "World"Commander App 1:24 AMHello World
- List the commands in the current appUser 1:24 AM
/nc command_list - Show a log of the print command you createdUser 1:24 AM
/nc command_log print - Allow another user to run the print commandUser 1:24 AM
/nc command_runners print + @Sam
Tutorial 2: Install a Command Set
copied
Sets of commands can be installed using a command set manager (csm) command.
- Install and run the translate command set
FAQ
copied
- What is /nc?
- All Nimbella Commander commands are prefixed with the
/nc
slash command. In addition, you can create commands that also run using the/nc
prefix. - If you create your own Mattermost app and connect it to Commander, you can create a custom slash prefix for your own custom commands.
- If you want to create tasks or triggers, you will need to create a webhook in Mattermost that can output to the channel you want the output of task or trigger to show. To do that, you need to create a custom Mattermost app and create a channel webhook in the custom app that can be used to output to a channel in your workspace.
- All Nimbella Commander commands are prefixed with the
- What is the current app?
- When you are working with
/nc
commands, you are working on one specific app. If you aren’t creating custom Mattermost apps to use with Commander, you won’t be changing your “current app”. - If you do create a custom Mattermost app and connect it to commander (with app_add), when you develop commands for that app or manage that app, you will want to set your “current app” to that custom Mattermost app.
- When you are working with
- How do I add my own custom app to Nimbella Commander if I don’t want to use /nc for my commands?
- To use a custom Mattermost app with Commander, you will need to create a Mattermost app and then connect it to Commander using
/nc app_add
- The
/nc app_add
command takes a name and command prefix. The command prefix is used by Mattermost users to run any of the commands in the app. For example, if you have an app named "devops" with a command prefix of "/devops", a user could run:/devops addhost x.y.z 1.2.3.4
- To enable all the functionality of Commander, you should create your own Mattermost App and connect it to Commander using
/nc app_add
as explained in the Developer Guide (add new link).
- To use a custom Mattermost app with Commander, you will need to create a Mattermost app and then connect it to Commander using