Skip to content

CLI Reference

This page provides documentation for our command line tools.

main

Mognet CLI

Usage:

mognet [OPTIONS] APP COMMAND [ARGS]...

Options:

  APP                             App module to import  [required]
  --log-level log-level           [default: INFO]
  --log-format log-format         [default: %(asctime)s:%(name)s:%(levelname)s
                                  :%(message)s]
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.

nodes

Usage:

mognet nodesAPP  [OPTIONS] COMMAND [ARGS]...

status

Query each node for their status

Usage:

mognet nodes statusAPP   [OPTIONS]

Options:

  --format format                 [default: text]
  --text-label-format text-label-format
                                  Label format for text format  [default:
                                  {name}(id={id!r}, state={state!r})]
  --json-indent json-indent       [default: 2]
  --poll poll                     Polling interval, in seconds (default=None)
  --timeout INTEGER               Timeout for querying nodes  [default: 30]

queues

Usage:

mognet queuesAPP  [OPTIONS] COMMAND [ARGS]...

purge

Purge task and control queues

Usage:

mognet queues purgeAPP   [OPTIONS]

Options:

  --force / --no-force  [default: no-force]

run

Run the app

Usage:

mognet runAPP  [OPTIONS] COMMAND [ARGS]...

Options:

  --include-queues include-queues
                                  Comma-separated list of the ONLY queues to
                                  listen on.
  --exclude-queues exclude-queues
                                  Comma-separated list of the ONLY queues to
                                  NOT listen on.

tasks

Usage:

mognet tasksAPP  [OPTIONS] COMMAND [ARGS]...

get

Get a task's details

Usage:

mognet tasks getAPP   [OPTIONS] id

Options:

  id                              Task ID to get  [required]
  --include-value / --no-include-value
                                  If passed, the task's result (or exception)
                                  will be printed  [default: no-include-value]

revoke

Revoke a task

Usage:

mognet tasks revokeAPP   [OPTIONS] id

Options:

  id                    Task ID to revoke  [required]
  --force / --no-force  Attempt revoking anyway if the result is complete.
                        Helps cleaning up cases where subtasks may have been
                        spawned.  [default: no-force]

tree

Get the tree (descendants) of a task

Usage:

mognet tasks treeAPP   [OPTIONS] id

Options:

  id                              Task ID to get tree from  [required]
  --format format                 [default: text]
  --json-indent json-indent       [default: 2]
  --text-label-format text-label-format
                                  Label format for text format  [default:
                                  {name}(id={id!r}, state={state!r})]
  --max-depth max-depth           [default: 3]
  --max-width max-width           [default: 16]
  --poll poll