CLI reference

CLI Reference

This reference guide provides detailed information about the Version Matrix Command Line Interface (CLI). Use this guide to learn about installation, commands, and usage patterns.

Table of Contents

Installation

To start using the Version Matrix CLI, you need to install it globally via npm and use it through the command line.

npm install -g version-matrix-cli

After installing the CLI, you can run the following command to check if it's working correctly:

$ vmtrx COMMAND
running command...
$ vmtrx (--version)
version-matrix-cli/0.0.0 darwin-arm64 node-v22.3.0
$ vmtrx --help [COMMAND]
USAGE
  $ vmtrx COMMAND

Commands

Overview

The Version Matrix CLI provides various commands to manage your application versions within different environments. Here's a detailed look at each command:

vmtrx update-version ENVIRONMENTNAME VERSION

Updates the version of a project within a specified environment. Optionally, updates versions for specific services.

USAGE
  $ vmtrx update-version ENVIRONMENTNAME VERSION [--isCurrent] [--service <value>...]

ARGUMENTS
  ENVIRONMENTNAME  Environment Name
  VERSION          Version

FLAGS
  --isCurrent           Set isCurrent flag to true (default is true)
  --service=<value>...  Set the version for the specified service(s).

DESCRIPTION
  Update version of a project. This command allows you to specify whether this version is the current one and to update versions for particular services if needed.

ALIASES
  $ vmtrx uv

EXAMPLES
  $ vmtrx update-version Production 1.2.3
  $ vmtrx uv Staging 1.2.4 --service=web-app --service=api-server