Generate an *.iotcp package, upload it to the VMware Pulse IoT Center, and run campaigns using the package.

The package command contains two subcommands:
> ./iot-cli package
Package software for Pulse IoT Center

Usage:
  package-cli package [command]

Available Commands:
  create      Generate an IoT Center package according to a package manifest.
  upload      Upload a created package to Pulse IoT Center.

Flags:
  -h, --help   help for package

Use "package-cli package [command] --help" for more information about a command.

The Package Create Subcommand

The package create subcommand creates a package using a specification file. It contains a flag without any shorthand name:
> ./iot-cli help package create
Generate an IoT Center package according to a package manifest.

Usage:
  package-cli package create <path to package.yml> [flags]

Flags:
  -h, --help            help for create
      --no-approval     Disables user approval before creation
  -o, --output string   Set output path (default "./")
The create command has the following modification flags:
  • -o, --output - Sets the output path for the package that is created.

The package create command requires a confirmation to create the package.

Example 1: Any input other than y stops the package creation process.
> ./iot-cli package create example-iotc-packagepackage-spec.yml

You are creating a package with:
  Name: hello_iotcp
  Version: 1.1.0
  OS: linux
  Architecture: noarch
File will be created as: hello_iotcp-1.1.0.linux.noarch.iotcp

Do you want to continue ? [y/n]  y

Creating package hello_iotcp-1.1.0.linux.noarch.iotcp
Example 2: In this example, y is sent as an input to the command using bash here string.
> ./iot-cli package create example-iotc-package/package-spec.yml <<< y

You are creating a package with:
  Name: hello_iotcp
  Version: 1.1.0
  OS: linux
  Architecture: noarch
File will be created as: hello_iotcp-1.1.0.linux.noarch.iotcp

Do you want to continue ? [y/n]  
Creating package hello_iotcp-1.1.0.linux.noarch.iotcp
Example 3: The --no-approval flag is present:
> ./iot-cli package create example-iotc-package/package-spec.yml --no-approval

You are creating a package with:
  Name: hello_iotcp
  Version: 1.1.0
  OS: linux
  Architecture: noarch
File will be created as: hello_iotcp-1.1.0.linux.noarch.iotcp

Creating package hello_iotcp-1.1.0.linux.noarch.iotcp
The Package Management CLI tool also supports pipes that do not require an approval. The approval flag is not required here:
> ./iot-cli package create                                                    
If the path to the yaml config is not passed as argument, you can use pipes to pass the yaml config file.
Usage with pipes:             cat package.yaml | iot-cli package create
Usage with yaml parameter:    iot-cli package create test_pac.yml
For example:
cat example-iotc-package/package-spec.yml | ./iot-cli package create              

You are creating a package with:
  Name: hello_iotcp
  Version: 1.1.0
  OS: linux
  Architecture: noarch
File will be created as: hello_iotcp-1.1.0.linux.noarch.iotcp

Creating package hello_iotcp-1.1.0.linux.noarch.iotcp