Skip to content

Mercury CLI

Overview

mercury-cli is an interactive command-line interface (CLI) tool designed to simplify using the Mercury OCIP Library. All automations and operations that can be performed using Mercury OCIP can now be executed through an intuitive CLI with autocomplete functionality.

Example

Installation

mercury-cli is now part of the mercury-ocip package, to install run the following:

pip install mercury-ocip

You can then run the CLI using the following command:

mercury-cli

Info

In some cases, windows defender may complain because the package is not signed. You can run the module directly instead:

python -m mercury_cli

This runs the module and starts the interactive CLI session. From here you can run commands and do some automations!

See the Commands section for more details on commands and features available in mercury_cli.

Quick Login

You can pass parameters to mercury-cli when starting it from the command line. For example:

mercury-cli --username your.username --password-env YOUR_PASSWORD_ENV_VARIABLE --host https://mercury.example.com/webservice/services/ProvisioningService

Additionally, you can use --no-login to skip the login process:

mercury-cli --no-login

or --action to login and immediately execute a command:

mercury-cli --username your.username --password-env YOUR_PASSWORD_ENV_VARIABLE --host https://mercury.example.com/webservice/services/ProvisioningService --action "automations find_alias SVPID GRPID 1234"

This will drop you directly into the CLI with the provided credentials.

Try typing the project name as a command... 🐍