ordinaryd 0.9.1

Ordinary Server
Documentation

use builtin;
use str;

set edit:completion:arg-completer[ordinaryd] = {|@words|
    fn spaces {|n|
        builtin:repeat $n ' ' | str:join ''
    }
    fn cand {|text desc|
        edit:complex-candidate $text &display=$text' '(spaces (- 14 (wcswidth $text)))$desc
    }
    var command = 'ordinaryd'
    for word $words[1..-1] {
        if (str:has-prefix $word '-') {
            break
        }
        set command = $command';'$word
    }
    var completions = [
        &'ordinaryd'= {
            cand --data-dir 'specify the data directory'
            cand --stdio-logs-fmt 'how to format stdio logs'
            cand --log-level 'base log level for every component'
            cand --stored-logs 'persists JSON formatted log lines to <data-dir>/logs/<domain>/'
            cand --stdio-logs 'logs events to stdio'
            cand --journald-logs 'logs events to `journald` (only works on Linux distros that use `systemd`)'
            cand --log-sizes 'whether storage and certain payload sizes are logged'
            cand --stdio-logs-timing 'whether span timing is logged'
            cand -h 'Print help'
            cand --help 'Print help'
            cand -V 'Print version'
            cand --version 'Print version'
            cand init 'initialize the environment for an Ordinary API server'
            cand api 'start the Ordinary API server'
            cand app 'start an Ordinary Application server'
            cand help 'Print this message or the help of the given subcommand(s)'
        }
        &'ordinaryd;init'= {
            cand --environment 'environment (e.g production, development, staging)'
            cand --storage-size 'Storage size in bytes (rounded up to nearest OS page size)'
            cand --api-domain 'domain name for API console'
            cand --password 'instance user password'
            cand --api-contacts 'contacts for the API domain cert provisioning'
            cand --app-domains 'domains that apps can subdomain off of'
            cand --privileged-domains 'list of applications that have access to API server level commands (i.e. API server invite token generation)'
            cand --data-dir 'specify the data directory'
            cand --stdio-logs-fmt 'how to format stdio logs'
            cand --log-level 'base log level for every component'
            cand --mfa-stored 'store the MFA key locally instead of copying a QR code'
            cand --stored-logs 'persists JSON formatted log lines to <data-dir>/logs/<domain>/'
            cand --stdio-logs 'logs events to stdio'
            cand --journald-logs 'logs events to `journald` (only works on Linux distros that use `systemd`)'
            cand --log-sizes 'whether storage and certain payload sizes are logged'
            cand --stdio-logs-timing 'whether span timing is logged'
            cand -h 'Print help (see more with ''--help'')'
            cand --help 'Print help (see more with ''--help'')'
            cand -V 'Print version'
            cand --version 'Print version'
        }
        &'ordinaryd;api'= {
            cand --environment 'environment (e.g production, development, staging)'
            cand --storage-size 'Storage size in bytes (rounded up to nearest OS page size)'
            cand --provision 'what mode TLS certs should be provisioned in'
            cand --port 'specify HTTP(s) port for server'
            cand --redirect-port 'specify HTTP port for server when running in secure mode'
            cand --log-ttl-hours 'max period of time logs are stored'
            cand --log-rotation-file-size 'max size (in bytes) per log file'
            cand --log-rotation-mins 'max amount of time a log file is appended to before being compressed and stored'
            cand --redacted-header-hash '"none" | "blake2" | "blake3"'
            cand --data-dir 'specify the data directory'
            cand --stdio-logs-fmt 'how to format stdio logs'
            cand --log-level 'base log level for every component'
            cand --insecure 'run without HTTPS'
            cand --insecure-cookies 'run with insecure cookies'
            cand --log-headers 'whether HTTP request and response headers are logged'
            cand --log-ips 'whether IP Addresses are logged with HTTP requests'
            cand --danger-dns-no-verify 'set to `true` to bypass verification of proxy domain and CNAME DNS TXT records'
            cand --dedicated-ports 'give each app its own port'
            cand --openapi 'whether to expose the [OpenAPI](https://swagger.io/specification/) JSON at `/openapi`'
            cand --swagger 'whether to expose the [Swagger](https://swagger.io) docs at `/swagger`'
            cand --stored-logs 'persists JSON formatted log lines to <data-dir>/logs/<domain>/'
            cand --stdio-logs 'logs events to stdio'
            cand --journald-logs 'logs events to `journald` (only works on Linux distros that use `systemd`)'
            cand --log-sizes 'whether storage and certain payload sizes are logged'
            cand --stdio-logs-timing 'whether span timing is logged'
            cand -h 'Print help (see more with ''--help'')'
            cand --help 'Print help (see more with ''--help'')'
            cand -V 'Print version'
            cand --version 'Print version'
        }
        &'ordinaryd;app'= {
            cand --provision 'what mode TLS certs should be provisioned in'
            cand --port 'specify HTTP(s) port for server'
            cand --redirect-port 'specify HTTP port for server when running in secure mode'
            cand --log-ttl-hours 'max period of time logs are stored'
            cand --log-rotation-file-size 'max size (in bytes) per log file'
            cand --log-rotation-mins 'max amount of time a log file is appended to before being compressed and stored'
            cand --redacted-header-hash '"none" | "blake2" | "blake3"'
            cand -p 'for running a standalone project. (project must already be built)'
            cand --project 'for running a standalone project. (project must already be built)'
            cand --domain-override 'use a different domain than what''s in the `ordinary.json`'
            cand --data-dir 'specify the data directory'
            cand --stdio-logs-fmt 'how to format stdio logs'
            cand --log-level 'base log level for every component'
            cand --insecure 'run without HTTPS'
            cand --insecure-cookies 'run with insecure cookies'
            cand --log-headers 'whether HTTP request and response headers are logged'
            cand --log-ips 'whether IP Addresses are logged with HTTP requests'
            cand --danger-dns-no-verify 'set to `true` to bypass verification of proxy domain and CNAME DNS TXT records'
            cand --stored-logs 'persists JSON formatted log lines to <data-dir>/logs/<domain>/'
            cand --stdio-logs 'logs events to stdio'
            cand --journald-logs 'logs events to `journald` (only works on Linux distros that use `systemd`)'
            cand --log-sizes 'whether storage and certain payload sizes are logged'
            cand --stdio-logs-timing 'whether span timing is logged'
            cand -h 'Print help (see more with ''--help'')'
            cand --help 'Print help (see more with ''--help'')'
            cand -V 'Print version'
            cand --version 'Print version'
        }
        &'ordinaryd;help'= {
            cand init 'initialize the environment for an Ordinary API server'
            cand api 'start the Ordinary API server'
            cand app 'start an Ordinary Application server'
            cand help 'Print this message or the help of the given subcommand(s)'
        }
        &'ordinaryd;help;init'= {
        }
        &'ordinaryd;help;api'= {
        }
        &'ordinaryd;help;app'= {
        }
        &'ordinaryd;help;help'= {
        }
    ]
    $completions[$command]
}