# metricly-cli

> Metricly CLI

Latest version **0.12.1** (published 2021-02-03) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install metricly-cli
pnpm add metricly-cli
yarn add metricly-cli
bun add metricly-cli
```

Provides the command `metricly`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.12.1 |
| Published | 2021-02-03 |
| First published | 2018-01-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 1 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | TheConnMan |
| Maintainers | metricly |

## Links

- npm: https://www.npmjs.com/package/metricly-cli
- npm.io page: https://npm.io/package/metricly-cli

## Dependencies (14)

- [chalk](https://npm.io/package/chalk.md) ^3.0.0
- [extend](https://npm.io/package/extend.md) ^3.0.2
- [is-url](https://npm.io/package/is-url.md) ^1.2.4
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [caporal](https://npm.io/package/caporal.md) ^1.3.0
- [request](https://npm.io/package/request.md) ^2.88.0
- [archiver](https://npm.io/package/archiver.md) ^3.1.1
- [inquirer](https://npm.io/package/inquirer.md) ^7.0.0
- [tty-table](https://npm.io/package/tty-table.md) ^2.8.2
- [clean-deep](https://npm.io/package/clean-deep.md) ^3.1.0
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.5
- [update-notifier](https://npm.io/package/update-notifier.md) ^3.0.1
- [json-stable-stringify](https://npm.io/package/json-stable-stringify.md) ^1.0.1
- [json-dup-key-validator](https://npm.io/package/json-dup-key-validator.md) ^1.0.2

## Recent versions

- 0.12.1 (latest) — 2021-02-03
- 0.12.0 — 2021-01-12
- 0.11.1 — 2020-12-22
- 0.10.0 — 2020-02-28
- 0.9.0 — 2020-01-10
- 0.8.2 — 2019-11-18
- 0.8.1 — 2019-09-19
- 0.8.0 — 2019-05-22
- 0.7.0 — 2019-05-09
- 0.6.1 — 2018-11-08
- 0.6.0 — 2018-08-29
- 0.5.1 — 2018-08-17
- 0.5.0 — 2018-08-17
- 0.4.1 — 2018-05-14
- 0.4.0 — 2018-03-12
- … 4 more at https://npm.io/package/metricly-cli/versions

## README

![alt text](docs/img/METRICLY_Logobug_480px_preview.png "Metricly Logo")
# Metricly CLI
Metricly command line interface to the [Metricly API](https://api.app.metricly.com/swagger-ui.html).  
This project originated from the awesome work done on [netuitive-package-validator](https://github.com/Netuitive/netuitive-package-validator)

Table of Contents
- [Installation](#installation)
    - [OS Specific](#os-specific)
    - [NPM](#npm)
- [Profiles](#profiles)
- [Formats](#formats)
- [Help](#help)
- [Development ](#development)
- [Testing](#testing)

## Installation 
`metricly` is available as an OS specific binary or simple NPM installation. 

### OS Specific
Attached to the [latest GitHub release](https://github.com/metricly/metricly-cli/releases/latest) there are binaries for each
- [Windows](https://github.com/metricly/metricly-cli/releases/latest)
- [Linux](https://github.com/metricly/metricly-cli/releases/latest)
- [Mac](https://github.com/metricly/metricly-cli/releases/latest)

Download the binary for your system, add it to your path, make it executable, and run `metricly -h`.

### NPM
```
npm i -g metricly-cli
metricly -h
```

## Profiles
`metricly` supports the concept of profiles.  You can run certain commands with `--profile` 

`metricly` creates a _default_ profile when you run `metricly config` 

### Creating a new profile
`metricly config --profile new-profile` 

### Using a profile 
`metricly --profile new-profile package list` 

>to see if your command supports --profile see [Verbose help](#verbose-help)

## Formats
`metricly` supports a couple different formats for outputing the responses from [Metricly API](https://api.app.metricly.com/swagger-ui.html)
- JSON: if you use `--format json` on `list` and `get` commands then `metricly` will format the response as json when printing to stdout
- Text: by default, `metricly` tries to print a nice sorted summary of names or titles along with an ID. 

> commands that support `--format json` are `list` and `get` see [Verbose help](#verbose-help)

## Commands

### Help
- `metricly --help`

![consolehelp](docs/img/metricly-help-console.png)

### Verbose help
You can get verbose help on specific commands 
- `metricly package list --help --verbose`

## Development

```
npm i -g yarn
git clone https://github.com/metricly/metricly-cli.git
cd metricly-cli/
yarn

// Compile and run Node
yarn run compile
node js/bin/metricly.js

// Run directly with TypeScript
npm install -g ts-node
ts-node ts/bin/metricly.ts

// Do it in Docker
docker build -t metricly-cli .
docker run -it --entrypoint=/bin/bash metricly-cli

yarn run compile
node js/bin/metricly.js
or
npm install -g ts-node
ts-node ts/bin/metricly.ts
```

## Testing
// run tests
```yarn test```
// continuous testing
```yarn run watch```

---
_Source: https://npm.io/package/metricly-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
