Skip to content

qruise

The base command for the Qruise CLI.

Syntax

qruise [OPTIONS] COMMAND [ARGS]...  

Description

The qruise command serves as a base for accessing and managing the Qruise ecosystem. All features are divided into subcommands bundling related functionalities and following the noun-verb convention. Hence, all calls of the qruise command line have the same basic structure:

qruise NOUN VERB ...

where NOUN is a subcommand and VERB is a sub-subcommand. It may sound intimidating at first, but it allows for a very intuitive interface. For instance, you can use the flow subcommand to run and manage flows:

$ qruise flow run # run a flow
$ qruise flow list # list all scheduled flows

Similarly, you can use the kb subcommand to interact with the knowledge base:

$ qruise kb log # show the commit history
$ qruise kb commit # commit schema changes
$ qruise kb status # check the status of the knowledge base

For a complete list of subcommands see the Subcommands section.

Configuration

The qruise command line tool does not require a global configuration file. Instead, it relies on the Qruise backend service to retrieve all the relevant information. In order for this to work you have to create an identity file first.

This base configuration can then be overriden by the user using the following methods:

  1. subcommand-specific files
  2. environment variables
  3. command-line options

Please refer to subcommands documentation for details on what configuration files, environment variables, and command-line options they use.

Configuration hierarchy

As noted above, there are several ways to configure the behaviour of the qruise command, and it is entirely possible that a certain aspect of the configuration can be present in two or more places. In such cases, a source further down the list overrides any values provided previously, e.g. subcommand-specific files override global configuration received from the Qruise backend, environment variables override subcommand-specific files, and command-line options override environment variables. This hierarchical approach to configuration allows for more flexibility and is especially useful for automation.

For example, the integration branch for a flow run using qruise flow run defaults to main. However, if a user specifies the QRUISE_FLOW_DEFAULT_INTEGRATION_BRANCH environment variable using

epxort QRUISE_FLOW_DEFAULT_INTEGRATION_BRANCH=custom_branch_name

then custom_branch_name will be used as integration branch instead. Consequently, using the --branch flag will override both the configuration file and the QRUISE_FLOW_DEFAULT_INTEGRATION_BRANCH.

Lists as option values

Certain options in Qruise CLI accept a list of values or a list of pairs of values. While it's straightforward to specify them in configuration files, there's no standard syntax for passing such data structures in command-line options or environment variables. Hence, we've adopted the following conventions:

Lists

A list is specified as a continuous string with elements delimited by commas without whitespaces. A trailing comma is optional. See the following table for valid and invalid examples:

String Description
e1 A list with one element, e1.
e1, A list with one element, e1. Note the trailing comma in the string.
e1,e2 A list with two elements, e1 and e2, with no whitespace in between.
e1,e2, A list with two elements, e1 and e2. Note the trailing comma in the string.
e1,e2,e3 A list with three elements, e1, e2, and e3.
String Description
e1, e2 Incorrect syntax: whitespace after the comma.
e1 ,e2 Incorrect syntax: whitespace before the comma.

Lists of pairs:

A list of pairs is specified as a continuous string with pairs delimited by commas without whitespaces and pair elements delimited by dashes, also without whitespaces. A trailing comma is optional. See the following table for valid and invalid examples:

String

Description

e1-e2

A list with a single pair consisting of elements e1 and e2.

e1-e2,

A list with a single pair consisting of elements e1 and e2. Note the trailing comma in the string.

e1-e2,e3-e4

A list with two pairs: e1 and e2, e3 and e4.

e1-e2,e3-e4,e5-e6,

A list with three pairs: e1 and e2, e3 and e4, e5 and e6. Note the trailing comma in the string.

String Description
e1-e2,e3- Incorrect syntax: missing pair element in the second pair.
e1 - e2,e3-e4 Incorrect syntax: whitespaces around a pair elements separator.
e1-e2, e3-e4 Incorrect syntax: whitespace after a comma.

Options

Option

Description

-i, --identity

Specify identity to use for connection with Qruise instance.

Default: default

-v, --version

Show Qruise CLI version and exit.

--install-completion

Install completion for the current shell.

--show-completion

Show completion for the current shell, to copy it or customise the installation.

--help

Show a help message and exit.

Subcommands

Name Description
flow Run and manage flows.
kb Manage the knowledge base.
qpu Manage QPUs in QruiseOS.