ordinaryd 0.8.0

Ordinary Server
# Print an optspec for argparse to handle cmd's options that are independent of any subcommand.
function __fish_ordinaryd_global_optspecs
	string join \n data-dir= stored-logs stdio-logs stdio-logs-fmt= journald-logs log-level= log-sizes stdio-logs-timing h/help V/version
end

function __fish_ordinaryd_needs_command
	# Figure out if the current invocation already has a command.
	set -l cmd (commandline -opc)
	set -e cmd[1]
	argparse -s (__fish_ordinaryd_global_optspecs) -- $cmd 2>/dev/null
	or return
	if set -q argv[1]
		# Also print the command, so this can be used to figure out what it is.
		echo $argv[1]
		return 1
	end
	return 0
end

function __fish_ordinaryd_using_subcommand
	set -l cmd (__fish_ordinaryd_needs_command)
	test -z "$cmd"
	and return 1
	contains -- $cmd[1] $argv
end

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