Introduction

CAT command line interface introduction

What is CAT CLI

CAT was initially introduced as a PowerShell module. It is still the recommended way how to use CAT, because PowerShell is incredibly powerfull tool. But if you don’t have PowerShell 7 or you don’t want to use it for any reason, CAT CLI is here to help.

It is still a command line interface, so it is friendly in automation scenarios - CI/CD pipelines, scheduled tasks etc. But at the same time, it is designed to be user-friendly. If you struggle with PowerShell and all you can do in a command line is cd to navigate to a directory and dir to display it’s content, then you’ll like CAT CLI. You don’t need to know more.

Get Started with CAT CLI

Open PowerShell or Windows command prompt. If you have successfully installed CAT CLI, you should be able to display its version:

catcli --version

CAT CLI version

You can get help with

catcli help

CAT CLI help

It gives you list of implemented verbs, such as run, show, help.

To get help with specific verb, run this:

catcli help run

E.g., catcli docs only opens the CAT documentation webpage (this webpage). See the left menu for the documentation of each verb.

Use CAT CLI in an Interactive Way

CAT still does not have a GUI. CAT CLI makes it simple to run CAT projects and interactively iterate through failed (and errorenous) tests:

CAT CLI result of test

See open command for details.

CAT CLI Syntax

The recommended way is:

  • first navigate to a directory where you have your CAT project

  • then issue the commands you need

cd "D:\DWH\Testing\Metadata"
catcli show --summary
catcli run

This way you can conveniently issue all commands and CAT will find the .cat.yaml file in the current folder. (If you have more .cat.yaml files in a single directory, this will not work.)

Less convenient way is to tell the command where your project is (with an absolute or a relative path):

catcli show --summary --project "D:\DWH\Testing\Metadata\MetadataTests.cat.yaml"

Commands may have arguments. They have both short and long versions, short is more convenient, long is descriptive. Short versions can be even “groupped”, if they don’t require a value.

E.g. this command:

catcli show --summary --progress --project "D:\Testing\Aero.cat.yaml"

can be invoked also like this:

catcli show -sgp "D:\Testing\Aero.cat.yaml"

You will find both long names, short names and description of all the arguments in the help for the given command, e.g. catcli show --help

CAT CLI show help