Quickstart

copied

Install Nimbella Commander

copied

You can install directly by clicking here: Add Commander to Slack

To complete the tutorial and create your own commands, you need access to a free or paid Slack workspace. You must be the workspace owner or an administrator to create and install a Slack app.

Test the installation

copied

In any channel of your Slack 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.

  1. Create a print command that takes a message parameter
    Commander User
    User 5:02 PM
    /nc command_create print <msg> 
    Commander Admin
    Commander App 5:02 PM

    Created command /nc  print  , edit the code

  2. Change the source code for the print command to print the message by clicking on edit the code link

edit the code

  1. Run the print command you just created.
    Commander User
    User 5:02 PM
    /nc print "World" 
    Commander Admin
    Commander App 5:02 PM

    Hello World

  2. List the commands in the current app
    Commander User
    User 5:02 PM
    /nc command_list 
  3. Show a log of the print command you created
    Commander User
    User 5:02 PM
    /nc command_log print 
  4. Allow another user to run the print command
    Commander User
    User 5:02 PM
    /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.

  1. Install the dig command set
    Commander User
    User 5:02 PM
    /nc csm_install dig 
  2. Run the dig command. It is part of the dig command set you just installed.
    Commander User
    User 5:02 PM
    /nc dig yahoo.com 

FAQ

copied

  1. What is /nc?
    • All Nimbella Commander commands are prefixed with** **the /nc  slash command in Slack. In addition, you can create commands that also run using the /nc  prefix.
    • If you create your own Slack 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 Slack that can output to the channel you want the task or trigger to output to. To do that, you need to create a custom Slack app and create a channel webhook in the custom app that can be used to output to a channel in your workspace.
  2. 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 Slack apps to use with Commander, you won’t be changing your “current app”.
    • If you do create a custom Slack 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 Slack app.
  3. 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 Slack app with Commander, you will need to create a Slack app in Slack 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 Slack 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 Slack App and connect it to Commander using /nc app_add  as explained in the Developer Guide.