Skip to content

Command Line Interface ​

Running turna without a subcommand loads configuration and starts configured loads, preprocessors, servers, and services. If no configuration is found, Turna starts with the defaults and has nothing to run.

Root Command ​

sh
turna [flags]

Flags:

FlagDefaultDescription
-l, --log-levelinfoLog level. Command-line value overrides loaded config.
-v, --versionPrint version metadata.

Config sources are selected with environment variables, not flags. See Application Config Sources.

API Command ​

sh
turna api --url http://localhost:8080/health --method GET

The api command is a small HTTP caller. It exits with an error when a response status is outside the 2xx range.

Flags:

FlagDefaultDescription
-u, --urlURL to call. Can be provided more than once.
-m, --methodGETHTTP method.
-k, --insecurefalseSkip TLS certificate verification.
-s, --silentfalseSuppress response body output.

Whoami Command ​

sh
turna whoami --address :8080 --name app

The whoami command runs a server that answers with host and request details, like traefik/whoami. It does not load configuration. Endpoints are described in the whoami middleware.

Flags:

FlagDefaultDescription
-a, --address:80Listen address.
-n, --nameName printed in responses.
--envfalseAllow printing the environment with ?env=true.
--certTLS certificate file. Requires --key.
--keyTLS key file. Requires --cert.
--max-wait30sUpper bound for ?wait.

Shell Completion ​

Cobra provides completion subcommands through turna completion. Run turna completion --help for the supported shells.