Skip to main content
otter-conf turns flat key = value files into Zig structs. Your struct shape drives a comptime-generated parser. Files load through mmap. App schemas live in otter-config-types; apps load them with otter-conf.

Quick start

Example file:

Documentation map

Format and types

Syntax, supported field types, strings, enums, arrays.

Loading API

load, loadFromSlice, directories, serialization, save.

Hot reload

hasChanged, Watcher, and poll-loop integration.

Advanced features

Nested structs, custom types, Dynamic, and import.

Conventions

  • Every struct field needs a default value.
  • Unknown keys are skipped (forward compatible).
  • Nested structs flatten to prefix_field keys (clock_enabled, clock_text_color).
  • Call freeConfig when the struct owns heap strings or slices.

Dependencies

otter-utils (inotify wrapper for Watcher).