All Projects → hairyhenderson → Gomplate

hairyhenderson / Gomplate

Licence: mit
A flexible commandline tool for template rendering. Supports lots of local and remote datasources.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Gomplate

Awless
A Mighty CLI for AWS
Stars: ✭ 4,821 (+279.61%)
Mutual labels:  cloud, cli, devops, devops-tools
Mrm
Codemods for your project config files
Stars: ✭ 900 (-29.13%)
Mutual labels:  cli, hacktoberfest, config, template
Awless Templates
Repository of examples for awless templates (see https://github.com/wallix/awless)
Stars: ✭ 59 (-95.35%)
Mutual labels:  cloud, cli, devops, devops-tools
Hashi Up
bootstrap HashiCorp Consul, Nomad, or Vault over SSH < 1 minute
Stars: ✭ 113 (-91.1%)
Mutual labels:  cloud, consul, devops, vault
Terraform Modules
Reusable Terraform modules
Stars: ✭ 63 (-95.04%)
Mutual labels:  cloud, consul, devops, vault
polymerase
A tool for populating templates with environment variables and Vault values
Stars: ✭ 84 (-93.39%)
Mutual labels:  config, vault, templating
Takeoff
A rapid development environment using docker for convenience.
Stars: ✭ 271 (-78.66%)
Mutual labels:  hacktoberfest, devops, devops-tools
Sceptre
Build better AWS infrastructure
Stars: ✭ 1,160 (-8.66%)
Mutual labels:  cloud, hacktoberfest, devops
Awesome Open Source Supporters
⭐️ A curated list of companies that offer their services for free to Open Source projects
Stars: ✭ 457 (-64.02%)
Mutual labels:  hacktoberfest, devops, devops-tools
Devspace
DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
Stars: ✭ 2,559 (+101.5%)
Mutual labels:  cli, devops, devops-tools
Terracognita
Reads from existing Cloud Providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration
Stars: ✭ 452 (-64.41%)
Mutual labels:  cloud, devops, devops-tools
Faas Cli
Official CLI for OpenFaaS
Stars: ✭ 633 (-50.16%)
Mutual labels:  cli, hacktoberfest, templating
Vagrant Openstack Provider
Use Vagrant to manage OpenStack Cloud instances.
Stars: ✭ 229 (-81.97%)
Mutual labels:  cloud, devops, devops-tools
Launcher
Osquery launcher, autoupdater, and packager
Stars: ✭ 346 (-72.76%)
Mutual labels:  hacktoberfest, devops, sysadmin
Awstaghelper
AWS bulk tagging tool
Stars: ✭ 98 (-92.28%)
Mutual labels:  cloud, devops, devops-tools
Carvel Ytt
YAML templating tool that works on YAML structure instead of text
Stars: ✭ 816 (-35.75%)
Mutual labels:  cli, devops, templating
Azure
Azure-related repository
Stars: ✭ 78 (-93.86%)
Mutual labels:  cloud, devops, devops-tools
Mobile.buildtools
The Mobile.BuildTools makes it easier to develop code bases in a clean, consistent, secure, and configurable way. Determine at Build which environment your app needs to run on, and what Client Secrets it should have. Plus many more amazing features!
Stars: ✭ 162 (-87.24%)
Mutual labels:  hacktoberfest, devops, devops-tools
Sysadmin Reading List
A reading/viewing list for larval stage sysadmins and SREs
Stars: ✭ 240 (-81.1%)
Mutual labels:  hacktoberfest, devops, sysadmin
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (-40.24%)
Mutual labels:  cli, config, devops-tools
gomplate logo

Read the docs at docs.gomplate.ca, chat with developers and community in the #gomplate channel on Gophers Slack

Build Status Build Go Report Card Codebeat Status Coverage Total Downloads CII Best Practices

hairyhenderson/gomplate on DockerHub DockerHub Stars DockerHub Pulls DockerHub Image Layers DockerHub Latest Version DockerHub Latest Commit

Install Docs Slack Discussions

gomplate is a template renderer which supports a growing list of datasources, such as: JSON (including EJSON - encrypted JSON), YAML, AWS EC2 metadata, BoltDB, Hashicorp Consul and Hashicorp Vault secrets.

Come chat with developers and community in the #gomplate channel on Gophers Slack and on GitHub Discussions!

Here are some hands-on examples of how gomplate works:

$ # at its most basic, gomplate can be used with environment variables...
$ echo 'Hello, {{ .Env.USER }}' | gomplate
Hello, hairyhenderson

$ # but that's kind of boring. gomplate has tons of functions to do useful stuff, too
$ gomplate -i 'the answer is: {{ mul 6 7 }}'
the answer is: 42

$ # and, since gomplate uses Go's templating syntax, you can do fun things like:
$ gomplate -i '{{ range seq 5 1 }}{{ . }} {{ if eq . 1 }}{{ "blastoff" | toUpper }}{{ end }}{{ end }}'
5 4 3 2 1 BLASTOFF

$ # the real fun comes when you use datasources!
$ cat ./config.yaml
foo:
  bar:
    baz: qux
$ gomplate -d config=./config.yaml -i 'the value we want is: {{ (datasource "config").foo.bar.baz }}'
the value we want is: qux

$ # datasources are defined by URLs, and gomplate is not limited to just file-based datasources:
$ gomplate -d ip=https://ipinfo.io -i 'country code: {{ (ds "ip").country }}'
country code: CA

$ # standard input can be used as a datasource too:
$ echo '{"cities":["London", "Johannesburg", "Windhoek"]}' | gomplate -d city=stdin:///in.json -i '{{ range (ds "city").cities }}{{.}}, {{end}}'
London, Johannesburg, Windhoek, 

$ # and here's something a little more complicated:
$ export CITIES='city: [London, Johannesburg, Windhoek]'
$ cat in.tmpl
{{ range $i, $city := (ds "cities").city -}}
{{ add 1 $i }}: {{ include "weather" (print $city "?0") }}
{{ end }}
$ gomplate -d 'cities=env:///CITIES?type=application/yaml' -d 'weather=https://wttr.in/?0' -H 'weather=User-Agent: curl' -f in.tmpl
1: Weather report: London

    \  /       Partly cloudy
  _ /"".-.     4-7 °C
    \_(   ).   ↑ 20 km/h
    /(___(__)  10 km
               0.0 mm

2: Weather report: Johannesburg

    \  /       Partly cloudy
  _ /"".-.     15 °C
    \_(   ).   ↘ 0 km/h
    /(___(__)  10 km
               2.2 mm

3: Weather report: Windhoek

    \  /       Partly cloudy
  _ /"".-.     20 °C
    \_(   ).   ↑ 6 km/h
    /(___(__)  20 km
               0.0 mm

Read the documentation at docs.gomplate.ca, and join the discussion in GitHub Discussions!

Please report any bugs found in the issue tracker.

License

The MIT License

Copyright (c) 2016-2021 Dave Henderson

Analytics

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].