envtpl
envtpl
renders Crinja templates on the command line using environment variables.
Installation
Grab the latest binary from the releases page and run it :)
Usage
Usage: envtpl [arguments]
-i FILE, --in=FILE Specifies the input file (STDIN by default)
-o FILE, --out=FILE Specifies the output file (STDOUT by default)
-h, --help Show this help
Examples
nicolas@laptop:~/PROJECTS/CRYSTAL/envtpl$ echo "Hello: {{ SHELL }}" | bin/envtpl
Hello: /bin/bash
nicolas@laptop:~/PROJECTS/CRYSTAL/envtpl$ echo "Hello: {{ env('SHELL') }}" | bin/envtpl
Hello: /bin/bash
nicolas@laptop:~/PROJECTS/CRYSTAL/envtpl$ echo "Hello: {{ env('SHELL', 'USER') }}" | bin/envtpl
Hello: {'SHELL' => '/bin/bash', 'USER' => 'nicolas'}
Contributing
- Fork it (https://github.com/your-github-user/envtpl/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Nicolas Rodriguez - creator and maintainer
Similar Tools
- https://github.com/envtpl/envtpl (Python)
- https://github.com/subfuzion/envtpl (Go)
- https://github.com/mattrobenolt/envtpl (Go)
- https://github.com/arschles/envtpl (Go)
- https://github.com/niquola/envtpl (Rust)