This is the command line frontend for Tera template engine
you can get binary from Release page. There is no prerequisits.
You must install Cargo, which usually install from rustup.
And then you run following command.
cargo install --git https://github.com/itn3000/teracli.git --tag [version tag]
run binary with three options
name | description |
---|---|
-i,--input | input file(or STDIN by default) |
-o,--output | output file(or STDOUT by default) |
-j,--json-parameter | parameter json file |
-k,--key-parameter | keyvalue parameter pair delimited by '=', overwrite json parameter if same key |
- read from "x.template", replace "abc" to "def", "ghi" to "jkl", output to STDOUT
teracli -i "x.template" -k abc=def -k ghi=jkl
- read from "x.template", read parameters from "params.json", output to "x-replaced.txt"
teracli -i "x.template" -j "params.json" -o "x-replaced.txt"