Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

nervix-cli Reference

Every option, subcommand, default, and environment variable nervix-cli accepts, printed by the binary itself while this book was built. It therefore describes exactly the release you are reading about. For how to use the client, see Command Line Client.

nervix-cli

Interactive Nervix client

Usage: nervix-cli [OPTIONS] [COMMAND]

Commands:
  completions    Generate shell completion scripts
  subscribe      Subscribe to one relay and print events until interrupted
  domain-clock   Follow the selected domain's clock until interrupted
  remove-node    Remove a node from the cluster membership
  cordon-node    Prevent the scheduler from placing new tasks on a node
  uncordon-node  Allow the scheduler to place new tasks on a node
  drain-node     Move scheduled graph nodes away from a node and keep it cordoned
  backup         Back up configuration, users and resources into an archive file
  restore        Restore configuration, users and resources from an archive file
  help           Print this message or the help of the given subcommand(s)

Options:
      --server <SERVER>
          Session gRPC endpoint; an https:// URL connects over TLS [default: http://127.0.0.1:47391]
      --tls <TLS>
          Whether TLS is required; `required` refuses a server URL that is not https [default: preferred] [possible values: preferred, required]
      --tls-ca-cert <TLS_CA_CERT>
          PEM certificate authority used to verify the server certificate
      --dns-resolver-config <DNS_RESOLVER_CONFIG>
          Resolv.conf-format file used by native session hostname resolution [env: NERVIX_DNS_RESOLVER_CONFIG=] [default: /etc/resolv.conf]
      --dns-hosts-file <DNS_HOSTS_FILE>
          Hosts-format file consulted before DNS [env: NERVIX_DNS_HOSTS_FILE=] [default: /etc/hosts]
      --dns-name-server <DNS_NAME_SERVERS>
          Name server addresses with ports, replacing those in the resolver configuration [env: NERVIX_DNS_NAME_SERVERS=]
      --domain <DOMAIN>
          Domain the session starts in [default: default]
      --username <USERNAME>
          Registry user to authenticate as [env: NERVIX_USERNAME=] [default: default]
      --password <PASSWORD>
          Password for the registry user; prompted for interactively when unset [env: NERVIX_PASSWORD=]
      --backup-wait-timeout <BACKUP_WAIT_TIMEOUT>
          Overall BACKUP command wait across all domain cuts, redirects and reconnects (default 10m)
      --command <COMMAND>
          Run NSPL statements once and exit instead of starting the interactive REPL
      --suggest <SUGGEST>
          Print completion candidates for NSPL input as JSON and exit
      --cursor <CURSOR>
          UTF-8 byte cursor in --suggest input; defaults to the end
  -h, --help
          Print help

nervix-cli completions

Generate shell completion scripts

Usage: nervix-cli completions [OPTIONS] <SHELL>

Arguments:
  <SHELL>  Target shell [possible values: bash, elvish, fish, powershell, zsh]

Options:
      --backup-wait-timeout <BACKUP_WAIT_TIMEOUT>
          Overall BACKUP command wait across all domain cuts, redirects and reconnects (default 10m)
  -h, --help
          Print help

nervix-cli subscribe

Subscribe to one relay and print events until interrupted

Usage: nervix-cli subscribe [OPTIONS] <NAME> <RELAY>

Arguments:
  <NAME>   Session-local subscription name
  <RELAY>  Relay name to subscribe to

Options:
      --dropping
          Drop delivered events when the session transport queue is full
      --blocking
          Block delivered events when the session transport queue is full
      --batch-sample-rate <BATCH_SAMPLE_RATE>
          Optional per-arrival batch sample rate from 0.0 through 1.0
      --where <WHERE_CLAUSE>
          Optional NSPL predicate applied to delivered records
      --backup-wait-timeout <BACKUP_WAIT_TIMEOUT>
          Overall BACKUP command wait across all domain cuts, redirects and reconnects (default 10m)
  -h, --help
          Print help

nervix-cli domain-clock

Follow the selected domain's clock until interrupted

Usage: nervix-cli domain-clock [OPTIONS]

Options:
      --backup-wait-timeout <BACKUP_WAIT_TIMEOUT>
          Overall BACKUP command wait across all domain cuts, redirects and reconnects (default 10m)
  -h, --help
          Print help

nervix-cli remove-node

Remove a node from the cluster membership

Usage: nervix-cli remove-node [OPTIONS] <NODE_ID>

Arguments:
  <NODE_ID>  Node id to remove

Options:
      --backup-wait-timeout <BACKUP_WAIT_TIMEOUT>
          Overall BACKUP command wait across all domain cuts, redirects and reconnects (default 10m)
  -h, --help
          Print help

nervix-cli cordon-node

Prevent the scheduler from placing new tasks on a node

Usage: nervix-cli cordon-node [OPTIONS] <NODE_ID>

Arguments:
  <NODE_ID>  Node id to cordon

Options:
      --backup-wait-timeout <BACKUP_WAIT_TIMEOUT>
          Overall BACKUP command wait across all domain cuts, redirects and reconnects (default 10m)
  -h, --help
          Print help

nervix-cli uncordon-node

Allow the scheduler to place new tasks on a node

Usage: nervix-cli uncordon-node [OPTIONS] <NODE_ID>

Arguments:
  <NODE_ID>  Node id to uncordon

Options:
      --backup-wait-timeout <BACKUP_WAIT_TIMEOUT>
          Overall BACKUP command wait across all domain cuts, redirects and reconnects (default 10m)
  -h, --help
          Print help

nervix-cli drain-node

Move scheduled graph nodes away from a node and keep it cordoned

Usage: nervix-cli drain-node [OPTIONS] <NODE_ID>

Arguments:
  <NODE_ID>  Node id to drain

Options:
      --backup-wait-timeout <BACKUP_WAIT_TIMEOUT>
          Overall BACKUP command wait across all domain cuts, redirects and reconnects (default 10m)
  -h, --help
          Print help

nervix-cli backup

Back up configuration, users and resources into an archive file

Usage: nervix-cli backup [OPTIONS] --output <OUTPUT> <SCOPE> [NAME]

Arguments:
  <SCOPE>
          What the archive covers: `cluster` for every domain and user, `domain` for one domain

          Possible values:
          - cluster: Every domain and every user
          - domain:  One domain

  [NAME]
          The domain a `domain` backup covers; the session's `--domain` when omitted

Options:
  -o, --output <OUTPUT>
          Where the archive is written; `-` writes it to standard output

      --without-resources
          Record every resource version and its digests without the version's bytes

      --without-state
          Capture configuration only, without pausing domains

      --without-pause
          Capture the latest published state without pausing domains

      --timeout <TIMEOUT>
          Maximum time for each running domain's quiesced capture

      --execution-reference <EXECUTION_REFERENCE>
          Recover the same backup with its original domain and capture options

      --format <FORMAT>
          How the backup's report is printed
          
          [default: text]
          [possible values: text, json]

      --backup-wait-timeout <BACKUP_WAIT_TIMEOUT>
          Overall BACKUP command wait across all domain cuts, redirects and reconnects (default 10m)

  -h, --help
          Print help (see a summary with '-h')

nervix-cli restore

Restore configuration, users and resources from an archive file

Usage: nervix-cli restore [OPTIONS] --input <INPUT> <SCOPE> [NAME]

Arguments:
  <SCOPE>
          What to restore: `cluster` for every domain and user of a cluster archive, `domain` for one domain of an archive

          Possible values:
          - cluster: Every domain and user of a cluster archive
          - domain:  One domain of an archive

  [NAME]
          The archived domain a `domain` restore recreates

Options:
  -i, --input <INPUT>
          The archive file to restore from

      --as <TARGET>
          Restore the domain under this name instead of its archived one

      --on-existing-user <ON_EXISTING_USER>
          What a cluster restore does with an archived user the cluster already has; `fail` when omitted

          Possible values:
          - fail:    Refuse the restore before it changes anything
          - skip:    Keep the existing user and its password
          - replace: Give the existing user the archived password hash

      --resume
          Resume the archived start and clock mapping after installing all state

      --dry-run
          Verify the archive and plan the restore, changing nothing

      --without-state
          Restore configuration without runtime state

      --without-source-offsets
          Restore runtime state but leave source offsets empty

      --format <FORMAT>
          How the restore's report is printed
          
          [default: text]
          [possible values: text, json]

      --backup-wait-timeout <BACKUP_WAIT_TIMEOUT>
          Overall BACKUP command wait across all domain cuts, redirects and reconnects (default 10m)

  -h, --help
          Print help (see a summary with '-h')