GuidesRecipesAPI ReferenceChangelogDiscussions
Log In

Modzy Enterprise CLI

Modzy's Command Line Interface

Modzy's CLI provides terminal commands for some of our most useful API endpoints. Modzy's CLI is designed primarily for operations teams to monitor instance health, check on inference statuses, or to quickly query important operational information. As a result, not all of Modzy's API endpoints are available via the CLI.



To install the CLI via Homebrew, first tap the Modzy tap:

brew tap modzy/tap

Afterwards, you can install the CLI using brew:

brew install modzy-cli

Using Go

As a prerequisite for installing the Modzy CLI, you must install have golang installed. Download and install golang here:

Once you've successfully installed golang, open your terminal and run the following command
$ go get -u

Available Commands

$ modzy alertsList all alerts
$ modzy completionGenerate the autocompletion script for the specified shell
$ modzy helpHelp about any command
$ modzy jobsWork with inference/prediction jobs
$ modzy modelsWork with models
$ modzy projectsWork with projects
$ modzy statusReturns top level dashboard information for your account
$ modzy whoamiSummarize effective authentication information

Global Flags

These flags can be used with most modzy cli commands for things like in-line authentication, access to command-specific manuals, etc.

--api-keystringModzy API key to use for authentication
--base-urlstringModzy API base URL
-h, --helpHelp with Modzy CLI
-p, --profilestringProfile which can be added to $HOME/.modzy/{profile} (default "default")
--team-idstringModzy API team ID to use for team authentication
--team-tokenstringModzy API team token to use for team authentication
-v, --verboseEnable more verbose log output for debugging purposes
--verbose-httpEnable log output of http request and response data


You can provide your authentication token through any mixture of command flags,
ENV variables, or configuration files. Precedence is command flag > ENV > configuration file.

In all three examples below, you will need to replace placeholder values with valid inputs.
Replace BASE_URL with the URL of your instance of Modzy, such as
Replace API_KEY with a valid API key string Here's how to download an API Key from Modzy
Optionally, replace TEAM_ID with the ID for the Modzy team you'd like to access
Optionally, replace TEAM_TOKEN with a valid API key string

Via Command Flags

To authenticate using command flags, you'll need to include --base-url flag with each command. You'll also need to include either the --api-key flag, or both the --team-id and --team-token flags.

$ modzy [command] --base-url BASE_URL {--api-key API_KEY | --team-id TEAM_ID --team-token TEAM_TOKEN}

Via ENV Variables

Set the following ENV variables

Via Configuration File

To use a configuration file, create a yaml file at any of these locations:

  • /etc/modzy/{profile}.yaml
  • $HOME/.modzy/{profile}.yaml

The default profile is called "default".

The yaml file you create should look something like this.

	> cat ~/.modzy/default.yaml
	base-url: BASE_URL
	# use an api key:
	api-key: API_KEY
	# or use a team key:
	team-id: TEAM_ID
	team-token: TEAM_TOKEN