Installing Edge Direct CLI

Installing and Using the Command-line Interface

Installation

Installation involves downloading either an installer script (for Linux/Mac), or the rigado.exe executable itself (for Windows). The purpose of the installer script is to download the correct binary, install it to the correct place in your filesystem, and run a tab-completion installation step.

Download the asset that corresponds to the operating system you are using:

Linux

  1. After downloading the package from the link above, open a Terminal window.

  2. Change directory to be in the same directory as the downloaded file. For instance, if it downloaded into your user Downloads folder, execute:

    $ cd ~/Downloads
    
  3. Run the downloaded script using the command

    $ source install_rigado_cli_linux.sh
    
  4. If installation was successful you should see the below message. If not, please refer to the manual installation section below

    Rigado CLI Install Complete. Please open a fresh terminal window for changes to take effect.
    

Mac

  1. After downloading the package from the link above, open a Terminal window.

  2. Change directory to be in the same directory as the downloaded file. For instance, if it downloaded into your user Downloads folder, execute:

    $ cd ~/Downloads
    
  3. Run the downloaded script as shown below (don't forget the period and space)

    $ source install_rigado_cli_mac.sh
    
  4. If installation was successful you should see the below message. If not, please refer to the manual installation section below

    Rigado CLI Install Complete. Please open a fresh terminal window for changes to take effect.
    

Windows

Download the EXE file to your Desktop (or download it and move it to your Desktop), then open a command prompt:

  1. Click the Start Button
  2. Scroll to Windows system
  3. Click Command Prompt

Now type:

cd Desktop

and press Enter. From here, you can run the rigado command.

You may also add a path to the environment variables to allow you to use the CLI from within any directory. The instructions here are for Windows 10:

  1. Create a directory (e.g. C:\Users\MyLogin\bin)
  2. Copy rigado.exe to this new directory
  3. Right-click on the Windows start menu
  4. Select System
  5. Scroll down to the bottom of the About section.
  6. Select System Info
  7. Select Advanced System Settings
  8. Select Environment Variables
  9. Select Path under the User variables section and click Edit
  10. Select New and enter the directory location (e.g.
    C:\Users\MyLogin\bin)
  11. Select OK for each screen
  12. Logout and back in in order to activate the new path

Authenticating with Rigado Edge Direct

Run the command rigado auth login and follow the instructions in your web browser to authenticate your user.

If you don't have a web browser, you can run rigado auth login --terminal and follow the prompts in the terminal.

The command-line authentication process is the same as that used by the Edge Direct web-application. Use the same email address and password you would for logging into that site.

The first time you log in you will need to use the temporary password provided in your Welcome email. You will be prompted to set a new password. You will not be able to reset your password until after you've set one. If you lose your temporary password, please contact Rigado through our support channel at [email protected] and we will resend the Welcome email with a new temporary password.

Getting help

Running any rigado command with a -h or --help flag will output the documentation for that command. This documentation will also be printed if you try to execute a malformed command, or a command missing one or more arguments or flags.

$ rigado --help
Command line tools for interacting with Cascade Edge Direct.

Usage:
rigado [command]

Available Commands:
app         Interacts with your Organization's Apps
auth        Performs authentication-related tasks for your Cascade Edge Direct account
bundle      Interacts with App Bundles in your Organization
gateway     Interacts with Gateways
help        Help about any command
tag         Interacts with the Tags in your Organization
version     Prints version information for this command-line tool

Flags:
-h, --help      help for rigado
    --version   version for rigado

Use "rigado [command] --help" for more information about a command.

Updating the CLI

To keep your rigado command-line tool up to date, delete the executable file you downloaded when first installing it, and download a new one from the links above.

In order to tell if your command is outdated, run rigado version, and compare it against the release number shown in the footer of this document.

$ rigado version
Version: 1.0 Build Time:2018-06-15_09:48:56PM Environment:production Hash:dc6ff2c

Linux/Mac Manual Installation

  1. Please download the package corresponding to your system below, then open a Terminal window.

  2. Change directory to be in the same directory as the downloaded file. For instance, if it downloaded into your user Downloads folder, execute:

    $ cd ~/Downloads
    
  3. Make a new bin directory in your home folder, and move the rigado binary file to it.

    $ mkdir -p ~/bin
    $ mv rigado ~/bin
    
  4. Set the permissions of the rigado binary file to allow execution:

    $ chmod u+x ~/bin/rigado
    
  5. Add the new ~/bin directory to your PATH. This will allow you to execute the rigado command in any Terminal window, from any directory.

    $ export PATH=$PATH:~/bin
    $ echo "export PATH=$PATH:~/bin" >> ~/.profile