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:
To verify that the installation was successful, run:
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):
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:
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:
On the other hand, to display the commit log of the knowledge base, run:
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:
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.