Documentation
Flora
A small, dependency-free configuration loader for Go. Layered sources, typed access, and environment overrides — without the framework.
Flora reads configuration from files, environment variables, and command-line flags, merges them in a predictable order, and gives you typed access to the result. It has no third-party dependencies and a stable public API.
Installation →
Add Flora to a Go module and verify the build.
Quick Start →
Load your first config in about ten lines.
Configuration →
Source precedence, decoding, and validation.
CLI Reference →
Inspect and validate config from the terminal.
Why Flora
- Zero dependencies. The core module imports only the standard library.
- Predictable merging. Sources are layered in a documented order; the winner of any key is always explainable.
- Typed access. Decode into structs with tags, or read individual keys with typed getters.
- Formats out of the box. JSON, TOML, and a small INI dialect, with a pluggable decoder interface for the rest.
- Quiet by default. No global state, no init-time magic, no network access.
A quick taste
package main
import "github.com/flora-ling/flora"
type Config struct {
Addr string `flora:"addr"`
Timeout int `flora:"timeout"`
}
func main() {
var cfg Config
must(flora.Load(&cfg,
flora.File("config.toml"),
flora.Env("APP_"),
))
}
New here?
Start with Quick Start — it walks through loading a real config file end to end.