<commit_before># ![Sonic CLI](https://raw.githubusercontent.com/enytc/sonic/master/logo.png)

> A CLI tool for manage Sonic (CDN)

[![Build Status](https://secure.travis-ci.org/enytc/sonic-cli.png?branch=master)](https://travis-ci.org/enytc/sonic-cli) [![NPM version](https://badge-me.herokuapp.com/api/npm/sonic-cli.png)](http://badges.enytc.com/for/npm/sonic-cli)

## Getting Started
Install the module with: 

```bash
$ npm install -g sonic-cli
```

Example:

```javascript
var Api = require('sonic-cli');
//Create new instance of Sonic CLI
var api = new Api('access_token');
```

## Documentation


#### .signup(name, email, password)

**Parameter**: `name`
**Type**: `String`
**Example**: `myname`


**Parameter**: `email`
**Type**: `String`
**Example**: `<EMAIL>`


**Parameter**: `password`
**Type**: `String`
**Example**: `<PASSWORD>`


The 'signup' method is responsible for create accounts

How to use this method

```javascript

api.signup('myname', 'email', '123456test');
```

#### .status(pureJson)

**Parameter**: `pureJson`
**Type**: `Boolean`
**Example**: `true`


The 'status' method is responsible for showing the status of api

How to use this method

```javascript

api.status(true);
```


## Contributing

See the [CONTRIBUTING Guidelines](https://github.com/enytc/sonic-cli/blob/master/CONTRIBUTING.md)

## Support<commit_msg>Update documentation section<commit_after># ![Sonic CLI](https://raw.githubusercontent.com/enytc/sonic/master/logo.png)

> A CLI tool for manage Sonic (CDN)

[![Build Status](https://secure.travis-ci.org/enytc/sonic-cli.png?branch=master)](https://travis-ci.org/enytc/sonic-cli) [![NPM version](https://badge-me.herokuapp.com/api/npm/sonic-cli.png)](http://badges.enytc.com/for/npm/sonic-cli)

## Getting Started
Install the module with: 

```bash
$ npm install -g sonic-cli
```

Example:

```javascript
var Sonic = require('sonic-cli');
//Create new instance of Sonic CLI
var api = new Sonic('http://localhost:8081', 'access_token');
```

## How to use

Example of use the Sonic CLI

```bash
$ sonic connect
```

## Documentation


#### .connect(url)

**Parameter**: `url`
**Type**: `String`
**Example**: `http://localhost:8081`


The 'connect' method is responsible for create connections

How to use this method

```javascript

api.connect('http://localhost:8081');
```

#### .login(accessToken, username, password)

**Parameter**: `accessToken`
**Type**: `String`
**Example**: `157953`

**Parameter**: `username`
**Type**: `String`
**Example**: `chrisenytc`

**Parameter**: `password`
**Type**: `String`
**Example**: `<PASSWORD>`


The 'login' method is responsible for login in accounts

How to use this method

```javascript

//Login with access token
api.login('12345678');

//Login with username and password
api.login(null, 'chrisenytc', '<PASSWORD>');
```

#### .users(pureJson)

**Parameter**: `pureJson`
**Type**: `Boolean`
**Example**: `true`


The 'users' method is responsible for show users

How to use this method

```javascript

api.users(true);
```

#### .createUser(username, password)

**Parameter**: `username`
**Type**: `String`
**Example**: `chrisenytc`

**Parameter**: `password`
**Type**: `String`
**Example**: `<PASSWORD>`


The 'createUser' method is responsible for create new users

How to use this method

```javascript

api.createUser('chrisenytc', '12345678');
```

#### .updateUser(username, password)

**Parameter**: `username`
**Type**: `String`
**Example**: `chrisenytc`

**Parameter**: `password`
**Type**: `String`
**Example**: `<PASSWORD>`


The 'updateUser' method is responsible for update users

How to use this method

```javascript

api.updateUser('chrisenytc', '<PASSWORD>');
```

#### .deleteUser(id)

**Parameter**: `id`
**Type**: `String`
**Example**: `id`


The 'deleteUser' method is responsible for delete users

How to use this method

```javascript

api.deleteUser('id');
```

#### .buckets(pureJson)

**Parameter**: `pureJson`
**Type**: `Boolean`
**Example**: `true`


The 'buckets' method is responsible for show all buckets

How to use this method

```javascript

api.buckets(true);
```

#### .createBucket(name)

**Parameter**: `name`
**Type**: `String`
**Example**: `bella`


The 'createBucket' method is responsible for create buckets

How to use this method

```javascript

api.createBucket('bella');
```

#### .deleteBucket(id)

**Parameter**: `id`
**Type**: `String`
**Example**: `id`


The 'deleteBucket' method is responsible for delete buckets

How to use this method

```javascript

api.deleteBucket('id');
```

#### .assets(pureJson)

**Parameter**: `pureJson`
**Type**: `Boolean`
**Example**: `true`


The 'assets' method is responsible for show all assets

How to use this method

```javascript

api.assets(true);
```

#### .createAsset(name, version, bucketId, filePath)

**Parameter**: `name`
**Type**: `String`
**Example**: `bella`

**Parameter**: `version`
**Type**: `String`
**Example**: `0.1.0`

**Parameter**: `bucketId`
**Type**: `String`
**Example**: `id`

**Parameter**: `filePath`
**Type**: `String`
**Example**: `/home/chrisenytc/Labs/Node/sonic-cli/lib/sonic-cli.js`


The 'createAsset' method is responsible for create assets

How to use this method

```javascript

api.createAsset('bella', '0.1.0', 'id', '/home/chrisenytc/Labs/Node/sonic-cli/lib/sonic-cli.js');
```

#### .deleteAsset(bucketId, id, option, [name,])

**Parameter**: `bucketId`
**Type**: `String`
**Example**: `id`

**Parameter**: `id`
**Type**: `String`
**Example**: `id`

**Parameter**: `option`
**Type**: `String`
**Options**: `asset, version or file`
**Example**: `asset`

**Parameter**: `name`
**Type**: `String`
**Example**: `belle`


The 'deleteAsset' method is responsible for delete assets

How to use this method

```javascript

//Delete asset
api.deleteAsset('bucketId', 'belle', 'asset');

//Delete version
api.deleteAsset('bucketId', '0.1.0', 'version', 'belle');

//Delete file
api.deleteAsset('bucketId', 'id', 'file');
```


## Contributing

See the [CONTRIBUTING Guidelines](https://github.com/enytc/sonic-cli/blob/master/CONTRIBUTING.md)

## Support
{'fraction_non_alphanumeric': 0.20817537497939673, 'fraction_numerical': 0.00807647931432339, 'mean_word_length': 5.524731182795699, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2381968', 'n_tokens_mistral': 2172, 'n_tokens_neox': 2048, 'n_words': 546}