Command Line Tools Guide

Providing Command line tools for aiding developers interacting with Kii Cloud

Currently, there are two command line tools available.

  1. Managing server extension: In order to use the server extension, you will have to manage the server code for your application. By making use of the command line tool, you can install your server code as well as versioning your server code.

    For further information, see Managing Server Code.

  2. Inspecting developer log (beta version): When using this command line tool in order to inspect the server log of your application on top of Kii Cloud, you can granulate the log output by filtering for dates, log levels, users, etc.

    For further information, see Inspect Developer Log.

Installation of the command line tool

Installation of the command line tool is relatively simple and can be completed in only a few steps. The command line tool can be downloaded from the developer portal site.

  1. On the developer portal, open the "DOWNLOAD" panel.

  2. Download the command line tool ZIP file.

  3. Extract the downloaded ZIP file and open the directory in your terminal.

    The Developer Log directory should contain the following files:

    • kii-logs.js: this node.js script is the main part of the CLI for retrieving the log data of your application.
    • kii-servercode.js: this node.js script is the main part of the CLI for managing your server code.
    • format.json: configuration file defining the output format of the log messages.
    • package.json: the npm installation file.
  4. Install the modules required to run the tool.

    Windows:

    • Install Node.js (v0.12.13 confirmed to work).
    • Install Python (v2.7.9 confirmed to work).
    • Install Visual Studio (2015 Community confirmed to work on Windows 10).

    Mac:

    • Install Node.js (v0.10.35 confirmed to work).
    • All other software (i.e., Python, make and gcc) should be installed by default. You just need to install Node.js.

    Please refer node-gyp's README for more details on the required environment (node-gyp is used internally by our command line tool. You do not need to install node-gyp).

  5. Install the command line tool by running the following commands in your terminal.

    $ cd kii-cli-latest-xxxxx
    $ npm install
    

    Here, xxxxx is the build version of the command line tool.

    Enter node bin/kii-servercode.js on the console. The tool has been successfully installed if the usage information as below is displayed, even though you have seen error messages on the console during the installation.

    $ node bin/kii-servercode.js
    
      Usage: kii-servercode.js [options] [command]
    
      Commands:
    
      deploy-file [options]
      get [options]
      get-hook-config [options]
      list [options]
      delete [options]
      set-current [options]
      list-scheduled-execution [options]
      get-scheduled-execution [options]
      ...
    

Parameters for executing the commands

The command line requires you to put your application's AppID and AppKey as well as your ClientID and ClientSecret as parameters. You can get the required parameters for authentication from the developer portal site of your application.

  1. Click the "Key" icon on the application dashboard. This will bring up the AppID and AppKey.

  2. Click the button below to show the ClientID and ClientSecret.