CLI Reference
The flora command inspects and validates configuration without writing Go. It is handy in CI and for debugging precedence.
Synopsis
flora <command> [flags] [sources...]
Global flags
| Flag | Default | Description |
|---|---|---|
--env-prefix | "" | Layer environment variables with this prefix |
--format | auto | Force input format: json, toml, or ini |
--strict | false | Fail on keys with no schema match |
--quiet | false | Suppress non-error output |
Commands
get
Print the merged value of a single key. Exits non-zero if the key is absent.
flora get cache.size_mb config.toml
# 64
dump
Print the fully merged configuration. Useful for confirming what your service will actually see.
flora dump --env-prefix APP_ config.toml conf.d/
# merged result as JSON
explain
Show which source set the winning value for a key — the fastest way to debug precedence.
flora explain addr config.toml --env-prefix APP_
# addr = "0.0.0.0:9090"
# config.toml "127.0.0.1:8080" (overridden)
# env APP_ADDR "0.0.0.0:9090" (winner)
validate
Check configuration against a schema file. Returns a non-zero exit code and a list of failures when validation fails, which makes it a clean CI gate.
flora validate --schema schema.json config.toml
# on failure
timeout: must be <= 300 (got 600)
addr: required
# exit status 1
convert
Translate between supported formats on stdout.
flora convert --to json config.toml > config.json
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Validation failed or key not found |
2 | Usage error (bad flags or arguments) |
3 | A source could not be read or parsed |
CI tip
Run
flora validate --schema schema.json config.toml as a required check. It exits non-zero on any failure and prints every problem in one pass.