CLI Commands

A brief overview of the Orka CLI. Learn the basics of switching between input modes, requesting help, and changing your output.

🚧

Quick navigation

On this page, jump to: Input modes | Global flags | Usе chaining operators with the Orka CLI | List all commands and get help | Change the output | Get environment-related information

In this section, jump to: Admin Functions with the CLI | Configuration | Users | Nodes | VMs | Images | ISOs | Kube

The Orka CLI provides access to your Orka environment from the command line.

Input modes

The Orka CLI lets you choose between an interactive input mode or a direct input mode.

In interactive mode, you can run the command without specifying any additional parameters, such as names, IDs, etc. Once you hit Enter, the Orka CLI prompts you to provide the information required to run the command. You can use arrow-up and arrow-down from the keyboard to navigate the Orka CLI prompts in interactive mode.

In direct mode, you can provide all the information required by the command through the use of the designated flags and parameters. The Orka CLI prompts you to confirm the provided information.

👍

TIP: Non-interactive console?

To bypass the command prompts for information, use direct mode and use the respective command flags.

To bypass the confirmation, pass the -y or the --assume-yes flags.

Using the --json flag also bypasses the interactive console and returns JSON output.

Global flags

The Orka CLI provides the following flags, available for all commands.

OptionShorthandDescription
--assume-yes-yBypasses the interactive prompt and executes the command with the specified parameters.
--jsonBypasses the interactive prompt, executes the command with the specified parameters, and returns the output of the command in JSON.

These flags are standalone and do not require passing a value.

Usе chaining operators with the Orka CLI

You can run multiple commands by using the standard bash chaining command-line operators (for example: && and ;).

List all commands and get help

To list all available commands, type:

orka help

For more information about each group of commands, see the sub-pages in this section or run:

orka <COMMAND> --help

Change the output

By default, the Orka CLI returns the output of all list commands in a TABLE format. You can switch to JSON or RAW instead.

You can switch to JSON globally or for a particular command:

  • To switch to JSON globally, run orka config and, when prompted, set Output style: to JSON.
  • To get JSON output for particular commands, pass the --json flag.
{
  "message": "",
  "help": {...}
  },
  "errors": [],
  "nodes": [
    {
      "name": "macpro-4",
      "host_name": "macpro-4",
      "address": "10.221.189.11",
      "hostIP": "10.221.189.11",
      "available_cpu": 11,
      "allocatable_cpu": 12,
      "available_gpu": "N/A",
      "allocatable_gpu": "N/A",
      "available_memory": "30.63G",
      "total_cpu": 12,
      "total_memory": "31.32G",
      "node_type": "WORKER",
      "arch": "amd64",
      "state": "READY",
      "orka_tags": []
    },
    ...,
    {
      "name": "macpro-x86-3",
      "host_name": "macpro-x86-3",
      "address": "10.221.188.33",
      "hostIP": "10.221.188.33",
      "available_cpu": 11,
      "allocatable_cpu": 12,
      "available_gpu": "N/A",
      "allocatable_gpu": "N/A",
      "available_memory": "30.63G",
      "total_cpu": 12,
      "total_memory": "31.32G",
      "node_type": "WORKER",
      "arch": "amd64",
      "state": "READY",
      "orka_tags": []
    }
  ]
}

You can switch to RAW only for a particular command:

  • To get RAW, greppable output for particular commands, pass the --raw flag. Note that RAW is available only for listing commands.
2122

Get environment-related information

To get information about the Orka CLI and your Orka environment, run:

orka version

OR (for more detailed information)

orka version --all

When you submit a support request, make sure to provide the output of orka version --all.


© 2019-2023 Copyright MacStadium, Inc. – Documentation built with readme.com. Orka is a registered trademark of MacStadium, Inc.