Skip to content

Getting Started

This page lists short guides to get you quickly started with the qruise CLI tool. We will cover the basic usage of the CLI and its syntax. For more detailed examples, check the CLI reference section.

Requirements

To install Qruise command line tool, make sure you have the following:

  • Python 3.11 or higher
  • access to Qruise PyPI (Python Package Index)
  • pip configured to use Qruise PyPI

Installation

Qruise CLI is available as a Python package. To install it, run the following command in your terminal:

pip install qruise-cli

To verify that the installation was successful, run:

qruise --version

If everything went well, you should see the version displayed in your terminal (note that the output will vary depending on the actual version you have installed):

Qruise CLI 1.0.0

Usage in virtual environments

Keep in mind that if you use virtual environments for Python (e.g. Conda or Python venv), the qruise command will only be available in the environment in which you installed it. Therefore, if your prompt looks similar to this:

$ qruise --help
bash: qruise: command not found
$ qruise --help
zsh: command not found: qruise

make sure that you have activated the correct Python environment.

Congratulations, you can now start using Qruise CLI!

Subcommands

All features of the qruise command are accessed via subcommands, similar to git or docker commands. For instance, the flow subcommand is used to manage Qruise flows, while the kb subcommand gives you access to everything knowledge base-related.

As an example, suppose you want to run a flow defined in /home/qruise/flows/my-flow.yaml on your local machine. The command to achieve that would be the following:

qruise flow run --flow-file /home/qruise/flows/my-flow.yaml

On the other hand, to display the commit log of the knowledge base, run:

qruise kb log

Subcommands nesting

Note that run itself is a subcommand of flow, while log is a subcommand of kb. This nesting makes writing Qruise CLI commands more like natural language.

Available commands

You can list all the available commands by running the qruise command without any parameters:

$ qruise

 Usage: qruise [OPTIONS] COMMAND [ARGS]...

╭─ Options ───────────────────────────────────────────────────────────────────────────────────────╮
│ --identity            -i      TEXT  Specify an identity file to use for connection with Qruise  │
│                               instance. [default: default]                                      │
│ --version             -v      Print the 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 customize    │
│                               the installation.                                                 │
│ --help                        Show this message and exit.                                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────╮
│ flow   Run and manage flows                                                                     │
│ kb     Manage the knowledge base                                                                │
│ qpu    Manage QPUs in QruiseOS                                                                  │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯

Alternatively, you can call qruise with the --help flag - the result will be the same. You can find a detailed description of each command in the CLI reference section.

Output formatting and shell capabilities

The exact output that you see in your terminal will depend on the capabilities of your shell. For instance, some older shells might not display the border or colour text. However, you don't have to worry about it - qruise adjusts its output automatically based on what's available on the host.

To get help on a subcommand, run it with the --help flag:

qruise SUBCOMMAND --help

You can try it out on the flow subcommand:

$ qruise flow --help

 Usage: qruise flow [OPTIONS] COMMAND [ARGS]...

 Run and manage flows

╭─ Options ───────────────────────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                                     │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────╮
│ init       Initialize directory structure for a Qruise flow                                     │
│ list       List all scheduled flows                                                             │
│ remove     Remove a scheduled flow                                                              │
│ run        Run a flow locally                                                                   │
│ schedule   Submit a flow for scheduled execution                                                │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯

Help for nested commands

You can pass the --help parameter for nested subcommands too.