Skip to content

CLI overview

The Nextmv CLI is a command-line interface that allows you to manage and deploy decision models and interact with them. It is built on top of the nextmv Python SDK.

The CLI prints all the data to standard output (stdout), typically in JSON format. For easier processing, all information and messages are printed to standard error (stderr). Many commands support the --output option to save the output to a file instead of printing it to stdout.

Installation

Info

Have a previous version of the Nextmv CLI? You'll need to uninstall. Learn more in this migration guide.

Install the Nextmv CLI. The CLI is available for macOS, Linux, and Windows. Installing with a Python package manager (uv, pip, or pipx) requires Python >=3.10. The Homebrew and winget options install a standalone binary and do not require Python.

uv tool install nextmv
pip install nextmv
pipx install nextmv
brew tap nextmv-io/nextmv
brew install nextmv
winget install Nextmv.CLI

To check if the installation was successful, run the following command to show the help menu:

nextmv --help

Info

Are you using the CLI for cloud operations? You will need to configure it.

Quick start

Run the following command to go through an interactive tutorial of the CLI:

nextmv init

Update the CLI

To update to the latest version, use the same package manager you installed with.

uv tool upgrade nextmv
pip install --upgrade nextmv
pipx upgrade nextmv
brew upgrade nextmv
winget upgrade Nextmv.CLI

Uninstall the CLI

To uninstall the Nextmv CLI, use the appropriate command for the method you installed with.

uv tool uninstall nextmv
pip uninstall nextmv
pipx uninstall nextmv
brew uninstall nextmv
winget uninstall Nextmv.CLI

Command organization

The Nextmv CLI roughly organizes the commands using the following structure:

nextmv <domain> <entity> <action> [options]

Where:

  • domain: the domain of the command, such as cloud or local. Root commands don't have a specific domain, like manifest, which is directly an entity.
  • entity: the entity the command operates on, such as app or instance.
  • action: the action the command performs, such as create or list.
  • options: the options for the command, such as --app-id or --name. The CLI does not use positional arguments, meaning all flags are passed as options, with some being required while others are optional. Each command will clearly indicate which options are required and which are optional.