cmd

package
v0.0.0-...-7fce639 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2016 License: MIT, MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "ttnctl",
	Short: "Control The Things Network from the command line",
	Long: `ttnctl controls The Things Network from the command line.

Quick start guide:
  1. Create an account:
     $ ttnctl user create [Your Email]
  2. Sign in:
     $ ttnctl user login [Your Email]
  3. Create an application:
     $ ttnctl applications create [Application Name]
  4. List your applications:
     $ ttnctl applications
  5. Choose an application to use from now on:
     $ ttnctl applications use [EUI]
  6. Create a new device:
     $ ttnctl devices register [DevEUI] [AppKey]
  7. List your devices:
     $ ttnctl devices
  8. Get info about a specific device:
     $ ttnctl devices info [DevEUI]
  9. Subscribe to incoming messages from this device:
     $ ttnctl subscribe [DevEUI]
 10. Schedule downlink to this device:
     $ ttnctl downlink [DevEUI] [Hex-encoded Payload]
	`,
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		var logLevel = log.InfoLevel
		if viper.GetBool("debug") {
			logLevel = log.DebugLevel
		}
		ctx = &log.Logger{
			Level:   logLevel,
			Handler: cliHandler.New(os.Stdout),
		}
	},
}

RootCmd is the entrypoint for handlerctl

Functions

func Execute

func Execute()

Execute runs on start

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL