# @apimetrics/cli

> CLI to interact with APImetrics, the unbiased SaaS Platform ensuring API products perform as agreed, are secure, meet business objectives, and comply with regulations.

Latest version **0.3.0** (published 2023-11-21) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @apimetrics/cli
pnpm add @apimetrics/cli
yarn add @apimetrics/cli
bun add @apimetrics/cli
```

Provides the command `apimetrics`.

## 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.3.0 |
| Published | 2023-11-21 |
| First published | 2023-09-12 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 9 |
| Unpacked size | 432.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | APImetrics |
| Maintainers | apimetrics_nick |
| Keywords | oclif |

## Links

- npm: https://www.npmjs.com/package/@apimetrics/cli
- Repository: https://github.com/APImetrics/APIm-CLI
- Issues: https://github.com/APImetrics/APIm-CLI/issues
- npm.io page: https://npm.io/package/@apimetrics/cli

## Dependencies (9)

- [open](https://npm.io/package/open.md) ^9.1.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [debug](https://npm.io/package/debug.md) ^4.3.4
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.1.1
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.6
- [http-call](https://npm.io/package/http-call.md) ^5.3.0
- [@oclif/core](https://npm.io/package/@oclif/core.md) ^2.15.0
- [@oclif/plugin-help](https://npm.io/package/@oclif/plugin-help.md) ^5.2.20
- [@oclif/plugin-plugins](https://npm.io/package/@oclif/plugin-plugins.md) ^2.4.7

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2023-11-21
- 0.2.1 — 2023-10-27
- 0.2.0 — 2023-10-24
- 0.1.1 — 2023-10-04
- 0.1.0 — 2023-10-02
- 0.0.3 — 2023-09-19
- 0.0.2 — 2023-09-12
- 0.0.1 — 2023-09-12

## README

APImetrics CLI
==============

An easy way to interact with APImetrics, the unbiased SaaS Platform
ensuring API products perform as agreed, are secure, meet business
objectives, and comply with regulations.

<!-- toc -->
* [Install](#install)
* [Usage](#usage)
* [Environment Variables](#environment-variables)
* [Command Topics](#command-topics)
<!-- tocstop -->

# Install

## Requirements

### Networking

The CLI will require an internet connection that allows access to the
following domains in order to function properly. If you are adding
firewall rules to allow this, we highly suggest that your firewall is
configured to refresh the IP addresses for the domains on a regular
basis as they may change without prior notice.

| Domain               | Ports   |
|----------------------|---------|
| client.apimetrics.io | 80, 443 |
| auth.apimetrics.io   | 80, 443 |

### Supported OS and architectures

Both x64 and ARM architectures are supported with the following
operating systems:

| OS         | Supported          |
|------------|--------------------|
| Windows 11 | :white_check_mark: |
| Windows 10 | :white_check_mark: |
| Windows 7  | :x:                |
| Linux      | :white_check_mark: |
| macOS      | :white_check_mark: |
### Supported Node.js Versions

We support all current and LTS versions of Node.js. When a version moves
to end of life, we will drop support. If you are currently using a
version of Node.js that is currently end of life, we suggest you upgrade
to a newer version. More information about currently supported Node.js
versions is published by the [Node.js Release Working
Group](https://github.com/nodejs/Release).

| Version | Supported          |
|---------|--------------------|
| 21.x    | :white_check_mark: |
| 20.x    | :white_check_mark: |
| 18.x    | :white_check_mark: |
| 16.x    | :x:                |

## Methods
### With npm

The CLI is built with Node.js and can be installed using `npm`. In order
to use this method, you must have `node` and `npm` installed on your
system already.

```sh-session
$ npm install -g @apimetrics/cli
```

### Using Tarballs

These are standalone distributions containing their own Node.js binary
and the CLI. They do not require any other software to already be
installed on your system.

The tarballs are available in both `gz` and `xz` formats. `xz` is much
smaller so ideal for slow connections, however `gz` has wider support
from decompression software. If you are unsure, use `gz`.

Once you have downloaded the tarball for your system, you should then
extract to a location such as `/usr/local/bin/apimetrics` and ensure
that this location is on your `PATH`.

# Usage
<!-- usage -->
```sh-session
$ npm install -g @apimetrics/cli
$ apimetrics COMMAND
running command...
$ apimetrics (--version)
@apimetrics/cli/0.3.0 linux-x64 node-v18.18.2
$ apimetrics --help [COMMAND]
USAGE
  $ apimetrics COMMAND
...
```
<!-- usagestop -->

# Environment Variables

| Name                        | Required | Description                                                                                                                                                     |
|-----------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `APIMETRICS_API_URL`        | :x:      | Base URL for the API. Defaults to `https://client.apimetrics.io/api/2/`.                                                                                        |
| `APIMETRICS_TOKEN_URL`      | :x:      | URL to use when requesting an access token for OAuth based login. Defaults to `https://auth.apimetrics.io/oauth/token`.                                         |
| `APIMETRICS_CODE_URL`       | :x:      | URL to use when requesting an authorization code for OAuth based login. Defaults to `https://auth.apimetrics.io/oauth/device/code`.                             |
| `APIMETRICS_REVOKE_URL`     | :x:      | URL to use when revoking refresh tokens. Defaults to `https://auth.apimetrics.io/oauth/revoke`.                                                                 |
| `APIMETRICS_USERINFO_URL`   | :x:      | URL to use when fetching user info. Defaults to `https://auth.apimetrics.io/userinfo`.                                                                          |
| `APIMETRICS_CLIENT_ID`      | :x:      | Client ID to use for OAuth based login.                                                                                                                         |
| `APIMETRICS_CONFIG_DIR`     | :x:      | Directory to store configuration for the CLI. Defaults to `~/.config/apimetrics` on UNIX and `%LOCALAPPDATA%\apimetrics` on Windows.                            |
| ~~`XDG_CONFIG_HOME`~~       | :x:      | Directory to store configuration for the CLI. Not recommended for use. Use `APIMETRICS_CONFIG_DIR` instead. `APIMETRICS_CONFIG_DIR` takes priority if also set. |

<!-- commands -->
# Command Topics

* [`apimetrics auth`](docs/auth.md) - Manage authentication options.
* [`apimetrics calls`](docs/calls.md) - Manage monitoring calls.
* [`apimetrics config`](docs/config.md) - Manage CLI configuration options.
* [`apimetrics help`](docs/help.md) - Display help for apimetrics.
* [`apimetrics info`](docs/info.md) - Information about APImetrics monitoring infrastructure.
* [`apimetrics org`](docs/org.md) - Manage organization settings.
* [`apimetrics plugins`](docs/plugins.md) - List installed plugins.
* [`apimetrics projects`](docs/projects.md) - Manage projects.
* [`apimetrics schedules`](docs/schedules.md) - Manage project schedules.
* [`apimetrics webhooks`](docs/webhooks.md) - Manage project webhooks and alerts.
* [`apimetrics workflows`](docs/workflows.md) - Manage project workflows.

<!-- commandsstop -->

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