#env #configuration #environment #generation #env-var #config-file

bin+lib reify

Write configuration files from templates using env variables

7 releases (4 breaking)

0.5.5 Dec 4, 2021
0.5.2 Dec 2, 2021
0.4.0 Nov 27, 2021
0.3.0 Nov 27, 2021
0.1.0 Nov 24, 2021

#873 in Configuration

MIT license

17KB
357 lines

Reify

Test Status Crate API

Quick start

Install using cargo:

cargo install reify

Write a template:

{
  "host": "{{hostname}}",
  "features": {
    "showBetaBadge": "{{showBetaBadge}}",
    "onlyBetaUsers": "{{onlyBetaUsers}}"
  }
}

Write a configuration file:

[[mounts]]
source = "templates/environment.json"
destination = "out/environment.json"
processor = "handlebars"

Invoke the command to generate filled files:

dev_hostname=dev.com reify -c reify.toml -e dev

Supported Templates

  • copy simply copy source file to destination path
  • handlebars rust implementation of handlebars templating language
  • tera tera templating engine

Dependencies

~11–21MB
~278K SLoC