Usage basics
In this article we will cover the basic usage of the Qruise CLI and its syntax.
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, simply 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 simply by running the qruise
command without any parameters:
$ qruise
Usage: qruise [OPTIONS] COMMAND [ARGS]...
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────╮
│ --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 --help
or -h
paramters - 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
option:
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 ──────────────────────────────────────────────────────────────────────────────────────╮
│ deploy Deploy a flow. │
│ run Run a flow locally │
│ serve Start a local agent for running flows │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
Help for nested commands
You can pass the --help
parameter for nested subcommands too.