{"id":13489821,"url":"https://github.com/hairyhenderson/gomplate","last_synced_at":"2025-05-14T07:07:36.101Z","repository":{"id":37270145,"uuid":"50242144","full_name":"hairyhenderson/gomplate","owner":"hairyhenderson","description":"A flexible commandline tool for template rendering. Supports lots of local and remote datasources.","archived":false,"fork":false,"pushed_at":"2025-05-05T20:02:28.000Z","size":43654,"stargazers_count":2844,"open_issues_count":21,"forks_count":197,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-05-07T06:38:32.711Z","etag":null,"topics":["boltdb","cli","cloud","config","consul","devops","devops-tools","docker","go","golang","sysadmin","sysops","template","templating","vault"],"latest_commit_sha":null,"homepage":"https://gomplate.ca","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hairyhenderson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"hairyhenderson"}},"created_at":"2016-01-23T14:36:27.000Z","updated_at":"2025-05-06T17:43:58.000Z","dependencies_parsed_at":"2022-07-09T14:00:25.547Z","dependency_job_id":"43640e30-b05e-4d02-952e-4a07b848753f","html_url":"https://github.com/hairyhenderson/gomplate","commit_stats":{"total_commits":1434,"total_committers":63,"mean_commits":"22.761904761904763","dds":0.5111576011157601,"last_synced_commit":"29bd9ed54a89918e6225d382b4306e1f68c74f3f"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hairyhenderson%2Fgomplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hairyhenderson%2Fgomplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hairyhenderson%2Fgomplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hairyhenderson%2Fgomplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hairyhenderson","download_url":"https://codeload.github.com/hairyhenderson/gomplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092648,"owners_count":22013290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boltdb","cli","cloud","config","consul","devops","devops-tools","docker","go","golang","sysadmin","sysops","template","templating","vault"],"created_at":"2024-07-31T19:00:35.963Z","updated_at":"2025-05-14T07:07:36.044Z","avatar_url":"https://github.com/hairyhenderson.png","language":"Go","funding_links":["https://github.com/sponsors/hairyhenderson"],"categories":["General Purpose Preprocessor","Go","Templating","Repositories","Templating and configuration management"],"sub_categories":["Snippets Manager","YAML is a **supserset of JSON**","Files templating","Observability"],"readme":"\u003cimg src=\"docs/static/images/gomplate.png\" width=\"512px\" alt=\"gomplate logo\"/\u003e\n\n_Read the docs at [docs.gomplate.ca][docs-url], chat with developers and community in the [#gomplate channel][] on [Gophers Slack][]_\n\n[![Build][gh-actions-image]][gh-actions-url]\n[![Go Report Card][reportcard-image]][reportcard-url]\n[![Codebeat Status][codebeat-image]][codebeat-url]\n[![Coverage][gocover-image]][gocover-url]\n[![Total Downloads][gh-downloads-image]][gh-downloads-url]\n[![CII Best Practices][cii-bp-image]][cii-bp-url]\n\n[![DockerHub Pulls][dockerhub-pulls-image]][dockerhub-url]\n\n[![Chocolatey](https://img.shields.io/chocolatey/v/gomplate.svg)](https://chocolatey.org/packages/gomplate)\n[![Chocolatey](https://img.shields.io/chocolatey/dt/gomplate.svg)](https://chocolatey.org/packages/gomplate)\n\n[![Install Docs][install-docs-image]][install-docs-url]\n[![Slack][slack-image]][slack-url]\n[![Discussions][discussions-image]][discussions-url]\n\n`gomplate` is a template renderer which supports a growing list of datasources,\nsuch as: JSON (_including EJSON - encrypted JSON_), YAML, AWS EC2 metadata,\n[Hashicorp Consul](https://www.consul.io/) and [Hashicorp Vault](https://www.vaultproject.io/) secrets.\n\nCome chat with developers and community in the [#gomplate channel][] on [Gophers Slack][] and on [GitHub Discussions][discussions-url]!\n\nHere are some hands-on examples of how `gomplate` works:\n\n```console\n$ # at its most basic, gomplate can be used with environment variables...\n$ echo 'Hello, {{ .Env.USER }}' | gomplate\nHello, hairyhenderson\n\n$ # but that's kind of boring. gomplate has tons of functions to do useful stuff, too\n$ gomplate -i 'the answer is: {{ mul 6 7 }}'\nthe answer is: 42\n\n$ # and, since gomplate uses Go's templating syntax, you can do fun things like:\n$ gomplate -i '{{ range seq 5 1 }}{{ . }} {{ if eq . 1 }}{{ \"blastoff\" | toUpper }}{{ end }}{{ end }}'\n5 4 3 2 1 BLASTOFF\n\n$ # the real fun comes when you use datasources!\n$ cat ./config.yaml\nfoo:\n  bar:\n    baz: qux\n$ gomplate -d config=./config.yaml -i 'the value we want is: {{ (datasource \"config\").foo.bar.baz }}'\nthe value we want is: qux\n\n$ # datasources are defined by URLs, and gomplate is not limited to just file-based datasources:\n$ gomplate -d ip=https://ipinfo.io -i 'country code: {{ (ds \"ip\").country }}'\ncountry code: CA\n\n$ # standard input can be used as a datasource too:\n$ echo '{\"cities\":[\"London\", \"Johannesburg\", \"Windhoek\"]}' | gomplate -d city=stdin:///in.json -i '{{ range (ds \"city\").cities }}{{.}}, {{end}}'\nLondon, Johannesburg, Windhoek, \n\n$ # and here's something a little more complicated:\n$ export CITIES='city: [London, Johannesburg, Windhoek]'\n$ cat in.tmpl\n{{ range $i, $city := (ds \"cities\").city -}}\n{{ add 1 $i }}: {{ include \"weather\" (print $city \"?0\") }}\n{{ end }}\n$ gomplate -d 'cities=env:///CITIES?type=application/yaml' -d 'weather=https://wttr.in/?0' -H 'weather=User-Agent: curl' -f in.tmpl\n1: Weather report: London\n\n    \\  /       Partly cloudy\n  _ /\"\".-.     4-7 °C\n    \\_(   ).   ↑ 20 km/h\n    /(___(__)  10 km\n               0.0 mm\n\n2: Weather report: Johannesburg\n\n    \\  /       Partly cloudy\n  _ /\"\".-.     15 °C\n    \\_(   ).   ↘ 0 km/h\n    /(___(__)  10 km\n               2.2 mm\n\n3: Weather report: Windhoek\n\n    \\  /       Partly cloudy\n  _ /\"\".-.     20 °C\n    \\_(   ).   ↑ 6 km/h\n    /(___(__)  20 km\n               0.0 mm\n```\n\nRead the documentation at [docs.gomplate.ca][docs-url], and join the discussion\nin [GitHub Discussions][discussions-url]!\n\n_Please report any bugs found in the [issue tracker](https://github.com/hairyhenderson/gomplate/issues/)._\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2016-2023 Dave Henderson\n\n[gh-actions-image]: https://github.com/hairyhenderson/gomplate/workflows/Build/badge.svg?branch=main\n[gh-actions-url]: https://github.com/hairyhenderson/gomplate/actions?workflow=Build\u0026branch=main\n\n[reportcard-image]: https://goreportcard.com/badge/github.com/hairyhenderson/gomplate\n[reportcard-url]: https://goreportcard.com/report/github.com/hairyhenderson/gomplate\n[codebeat-image]: https://codebeat.co/badges/39ed2148-4b86-4d1e-8526-25f60e159ba1\n[codebeat-url]: https://codebeat.co/projects/github-com-hairyhenderson-gomplate\n[gocover-image]: https://gocover.io/_badge/github.com/hairyhenderson/gomplate\n[gocover-url]: https://gocover.io/github.com/hairyhenderson/gomplate\n[gh-downloads-image]: https://img.shields.io/github/downloads/hairyhenderson/gomplate/total.svg\n[gh-downloads-url]: https://github.com/hairyhenderson/gomplate/releases\n\n[cii-bp-image]: https://bestpractices.coreinfrastructure.org/projects/337/badge\n[cii-bp-url]: https://bestpractices.coreinfrastructure.org/projects/337\n\n[dockerhub-url]: https://hub.docker.com/r/hairyhenderson/gomplate\n[dockerhub-pulls-image]: https://img.shields.io/docker/pulls/hairyhenderson/gomplate.svg\n\n[docs-url]: https://docs.gomplate.ca\n[install-docs-image]: https://img.shields.io/badge/install-docs-blue.svg\n[install-docs-url]: https://docs.gomplate.ca/installing\n\n[Gophers Slack]: https://invite.slack.golangbridge.org\n[#gomplate channel]: https://gophers.slack.com/messages/CGTR16RM2/\n\n[slack-image]: https://img.shields.io/badge/slack-gophers/%23gomplate-00ADD8.svg?logo=slack\n[slack-url]: https://gophers.slack.com/messages/CGTR16RM2/\n\n[discussions-image]: https://img.shields.io/badge/discussions-gomplate-blue.svg?logo=github\n[discussions-url]: https://github.com/hairyhenderson/gomplate/discussions\n\n[![Analytics](https://ga-beacon.appspot.com/UA-82637990-1/gomplate/README.md?pixel)](https://github.com/igrigorik/ga-beacon)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhairyhenderson%2Fgomplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhairyhenderson%2Fgomplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhairyhenderson%2Fgomplate/lists"}