Skip to content

Miva CLI - Getting Started#


To install run the following command and add the install directory to your path. Prerequisites include having python (3.6 or higher) and pip installed locally.

Project Repository

Installation#

pip3 install --user miva-mmt

To install with elevated privileges and run, which will install the tool for everyone on the local machine.

pip3 install miva-mmt

Update#

To update run the following command.

pip3 install --upgrade miva-mmt

Rollback#

Rollback Procedure.

pip3 uninstall miva-mmt
pip3 install miva-mmt==1.0.2

Token Authentication#

To create token credential type within the Miva Command Line Tool an API Token will need to be created within the Miva admin.

Navigate to Settings > User Management > API Tokens. Select Add API Token button.

CLI API Token

Name: Required to create a token

Access Token: Need to set up credential in the Miva Command LineTool

Allowed IP Address(es): Each access token is restricted to a list of IP addresses you want to have access to make API calls. It accepts a comma separated list of IPs. If you don’t have static IP addresses, you can disable it by using 0.0.0.0/0 which will allow any IP address. You may also need to whitelist the short hand for ipv6 which is: ::/0

Signature:This is required for the Miva Command Line Tool and will be used when setting up a credential.

Timestamp: The command line tool will work with either Timestamp option selected as it automatically adds the timestamp, but it is recommend to require it for security purposes.

After the token has been created the User Interface group needs to be assigned and can be done by selecting the checkbox next to record then selecting the batch list action […] button. In the dropdown select the Groups option to bring up the assigned group dialog box. In the batch list, assign the User Interface group to the API token and close the dialog box.

CLI Token Groups

SSH Authentication#

In order to use an SSH credential type a public and private key must be generated. Miva only supports ssh-rsa format SSH Keys and not DSA, ed25519 or ECDSA. One way to generate an SSH key in the command line interface is to use:

$ ssh-keygen -t rsa -m pem

This will generate both a public and private key file on the local device. The public key file will have a “.pub” extension and this value should be copied into the Miva user under: Edit Profile -> Manage SSH Authentication. Keep note of the private key path as that will be needed when setting up the ssh credential type within the command line tool.

CLI SSH Auth

CLI SSH Token