kd

Koding KD CLI

npm install kd
2 downloads in the last week
105 downloads in the last month

Koding CLI Task Manager

This is cli tool for managing Koding Kites.

What is a Kite ?

Kites are simple processes that inter-communicates with Koding and other Kites.

For more details see: http://....

Install

npm install -g kd

Register your host machine

kd register

you'll see

$ kd register
register:
register: Hello ybrs!
register:
register: Please visit the following URL to connect your
register: host to this computer.
register:
register:
register: https://koding.com/-/KD/Register/aybarss-MacBook-Air.    local/hnn91jkty8scm9momi51nc1sor7onri4hm5azhmncs5hhmy8nsu55ssssyssjsss
register:
register: Waiting for you to connect the host.

simply visit the url in browser, then you'll see

register: Host connected! Thanks for registering, now I'm sure you are ybrs!

Create a kite and run it

kd kite create-worker kitename

now you can run the kite

cd kitename.kite
kd kite run

Then you can call kite's functions using console:

KD.singletons.kiteController.run({
    kiteName: "kitename",
    method: "helloWorld",
    withArgs: {name: 'hi'}
}, function() {
    console.log(arguments)
});

Create a server

kd kite create-server serverkite

you'll see output like:

$ kd kite run
kite: Kite has been compiled!
kite: Attempting to run serverkite
kite: Finding a free port...
kite: Server is running on http://127.0.0.1:54282
kite: Port found: 54282
kite: Publishing server...
server: downloading dependencies...
server: dependencies downloaded.
server: dependencies installing...
server: Listening 127.0.0.1:54282 and sharing with the name 'serverkite-1'. Please wait...
server: 127.0.0.1:54282 has something on it!
server: Started instance on 27334
kite: serverkite: Intra-Kite communication is ready
kite: serverkite: Kite is connected to system
server: .
server: your public url: {"host":"serverkite-1-ybrs.kd.io"}

this registers your kite, to Koding and Koding proxies your kite to the world, so you can access the url from anywhere

http://serverkite-1-ybrs.kd.io

Add unit tests to your Kite

When you create a kite, you will have a test directory in it. KD tool uses Mocha test library, to run the tests

kd kite test

Configuring the Kite

Kites have manifest.json files. They hold your kites' meta data, such as author information, name etc.

npm loves you