zachwalton / bkl

Layered Configuration Language

Home Page:https://bkl.gopatchy.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bkl (short for Baklava because it has layers) is a templating configuration language without the templates. It's designed to be simple to read and write with obvious behavior.

Write your configuration in your favorite format: JSON, YAML, or TOML. Layer configurations on top of each other, even from different file formats. Use filenames to define the inheritance. Have as many layers as you like. bkl merges your layers together with sane default behavior that you can override. Export your results in any supported format for human or machine consumption. Use the CLI directly or in scripts or automate with the library.

Go Reference GitHub: bkl Discord: bkl

Example

service.yaml

addr: 127.0.0.1
name: myService
port: 8080

service.test.toml

port = 8081

Run it!

$ bkl service.test.toml
addr = '127.0.0.1'
name = 'myService'
port = 8081

bkl knows that service.test.toml inherits from service.yaml by the filename pattern (override with $parent) and uses filename extensions to determine formats.

Install

$ go install github.com/gopatchy/bkl/...@latest

Verify that ~/go/bin is in your $PATH.

You can also download binaries directly here.

Links

About

Layered Configuration Language

https://bkl.gopatchy.io/

License:Apache License 2.0


Languages

Language:Go 96.8%Language:Just 1.8%Language:Dockerfile 0.7%Language:Shell 0.7%