Skip to main content
Archery configuration turns a directory of JSON files into a dotted-key repository; you will load, bind, read, override, and reload application settings.

Load configuration

AppConfig.create() reads lib/src/config by default. Pass path to load another directory, then bind the result so framework services can resolve it.
example/main.dart
The repository includes app.json, server.json, and db.json. The example reads server settings with dotted keys.
bin/server.dart

Read and override values

get() accepts an optional default. set() applies a runtime override, while all() returns a deep copy rather than the repository’s mutable internal map.
lib/src/bootstrap.dart

Reload files

Call reload() to rebuild configuration from disk. Set keepOverrides: true to reapply runtime values after loading.
lib/src/bootstrap.dart
Configuration keys must use valid dotted segments. Do not store secrets in committed JSON files; inject them through your deployment process and set them before dependent services boot.