# corellium-cli

Corellium CLI is a command line interface for Corellium's API. It allows you to manage your projects, devices and more
from the command line. It is written in Node.js and uses the Corellium
[Client API](https://www.npmjs.com/package/@corellium/client-api).

## Installation

```bash
npm install -g @corellium/corellium-cli
```

## Usage

[Read the documentation](https://support.corellium.com/cli)

## Development

1. Clone the repo
2. Ensure NPM has access to private package registery for dependencies
   - Create a Personal Access Token with read_api scope in GitLab.
   - Authenticate to the registry. (in ~/.npmrc):
     `npm config set -- //[FQDN HERE]/api/v4/packages/npm/:_authToken=[TOKEN HERE]`
   - Set the registry. (in ~/.npmrc): `npm config set @corellium:registry https://[FQDN HERE]/api/v4/packages/npm/`
3. Install dependencies: `npm ci`
4. Link with `npm link`

_Note_: if you are running it locally create `.env` file and put the following line there
`NODE_TLS_REJECT_UNAUTHORIZED=0`

## Publishing

To publish Corellium CLI to the official Corellium npm registry, create a tag with the format

```
v#.#.#
```

This creates a GitLab pipeline which runs npm publish with the appropriate permissions
