TheThingsArchive / node-app-sdk

The Things Network Application SDK for Node.JS
https://www.thethingsnetwork.org/docs/node-js/
MIT License
41 stars 28 forks source link

Add CLI #10

Closed FokkeZB closed 8 years ago

FokkeZB commented 8 years ago

Building on https://github.com/TheThingsNetwork/node-app-lib/blob/master/bin/monitor, but then properly using Commander.

Downlink example:

./bin/ttn -r eu -a 'hello-world' -k 'my-key' -d 'my-uno' -m '{"led":true}` -p 1

Uplink example:

./bin/ttn -r eu -a 'hello-world' -k 'my-key' -t `messages`

Topic could also be a full topic and can be used multiple times.

There should also be an -o json option to get the response outputted in json

johanstokking commented 8 years ago

What is the problem that we solve as compared to ttnctl?

This is another thing to maintain and seems confusing.

FokkeZB commented 8 years ago

Nothing really. I actually added https://github.com/TheThingsNetwork/node-app-lib/blob/master/bin/monitor at some point to quickly test but I agree it's better to stick with one CLI.