# @c8y/toolkit

`@c8y/toolkit` is a collection of CLI tools to interact with an instance of Cumulocity. It is meant to provide its functionality without depending on a specific framework, like the [`@c8y/devkit`](https://www.npmjs.com/package/@c8y/devkit) package does regarding angular.

## Commands

The toolkit cli currently provides functionality to deploy applications/extensions to Cumulocity.

You can also list all available commands by executing `npx @c8y/toolkit -h`.
Which should result in an output like:

```
Usage: @c8y/toolkit [options] [command]

Toolkit for Cumulocity applications, allows to e.g. deploy an application to an instance of Cumulocity.

Options:
  -V, --version               output the version number
  -h, --help                  display help for command

Commands:
  deploy [options] <zipFile>  Deploy application to Cumulocity
  help [command]              display help for command
```

### Deploy

This cli provides multiple options while deploying and application/package.
To get all of the options available simply execute `npx @c8y/toolkit deploy -h`.
This should give you and output like:

```
Usage: @c8y/toolkit deploy [options] <zipFile>

Deploy application to Cumulocity

Arguments:
  zipFile                           Path to zip file

Options:
  -u, --url <URL>                   The url of the remote instance. Can also be passed via the "C8Y_URL" environment variable.
  -U, --user <user>                 Username of the Cumulocity instance. Can also be passed via the "C8Y_USER" environment variable.
  -P, --password <password>         Password of the Cumulocity instance. Can also be passed via the "C8Y_PASSWORD" environment variable.
  -t, --tenant <tenant>             Tenant of the Cumulocity instance. Can also be passed via the "C8Y_TENANT" environment variable.
  --tags <tags>                     Comma separated list of tags to apply to the uploaded version
  --rolling-tags                    Will remove tags that are already in use by previous version and adds them to the newly uploaded version
  --add-web-sdk-stable-tag          Add web SDK stable tag
  --delete-existing-tags            Delete existing tags
  -a --availability <availability>  Availability of the application, either: "PRIVATE", "MARKET" or "SHARED"
  -h, --help                        display help for command
```

To e.g. deploy a previously built zip file of a plugin package, you could e.g. execute:
`npx @c8y/toolkit deploy -u "https://demos.cumulocity.com" -U "dummyUser" -P "dummyPassword" -t "t123456" --tags "latest" --rolling-tags --add-web-sdk-stable-tag ./widget-plugin.zip`
