Command Line Tools Guide
Providing Command line tools for aiding developers interacting with Kii Cloud
Currently, there are two command line tools available.
Managing Server Extension: In order to use Server Extensions, 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 doing version control of your Server Code.
For further information, please refer to Managing your Server Code.
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, please refer to Inspect Developer Log.
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.
On the developer portal, please open the "DOWNLOAD" panel.
Download the command line tool ZIP file.
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 Codes.
- format.json: configuration file defining the output format of the log messages.
- package.json: the npm installation file.
Install the modules required to run the tool.
- 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).
- 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).
Install the command line tool by running the following commands in your terminal.
$ cd kii-cli-latest-xxxxx $ npm install
xxxxxis the build version of the command line tool.
node bin/kii-servercode.json 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] ...
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.