mics CLI

The platform is built using an API first approach. You can manage nearly anything using our API. Unfortunately, some actions can require you to use a combination of different APIs, and you'll have to handle authentication for every request.

Using mediarithmics Command Line Interface, you can simplify some actions and you won't have to add authentication headers in every request.

Installation

The CLI for mediarithmics is distributed as an NPM package. To use it, install it globally using

npm install -g @mediarithmics-ps/mics-cli

You need access to mediarithmics private packages to run this command. Contact us if required.

Getting started

On a fresh install, any command will prompt you for your authentication token. You won't have to enter it anymore.

You can use a command like mics-cli config:list to trigger this prompt.

# Run this command on a fresh install
mics-cli config:list
# The prompt will ask you for MICS API Token
# Simply copy/paste it and press enter
# The token will be saved and your command will be executed
Please enter a value for authToken (MICS API token) : *******

Creating an alias

The invoke command is mics-cli. If you prefer something else because it's shorter or just before you want, you can use

Config commands

The mics CLI has a set of config commands. They are particularly useful to manage your authentication token.

Lists all your configuration variables.

Get the value of a configuration variable

Set the value of a configuration variable

Help command

Shows all available commands, and other useful information.

Whoami command

Retrieves user information based on the authentication token

Autocomplete

Autocomplete installation instructions can be displayed based on your shell using the autocomplete command.

Last updated

Was this helpful?