{"id":18045257,"url":"https://github.com/dpb587/gotmpl","last_synced_at":"2025-04-05T03:41:45.892Z","repository":{"id":57541594,"uuid":"287833666","full_name":"dpb587/gotmpl","owner":"dpb587","description":"A lightweight tool for rendering Go templates from the command line.","archived":false,"fork":false,"pushed_at":"2020-08-17T02:44:47.000Z","size":20,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-10T11:48:30.815Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dpb587.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-15T22:21:45.000Z","updated_at":"2022-03-09T20:30:56.000Z","dependencies_parsed_at":"2022-09-26T18:30:52.728Z","dependency_job_id":null,"html_url":"https://github.com/dpb587/gotmpl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Fgotmpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Fgotmpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Fgotmpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpb587%2Fgotmpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpb587","download_url":"https://codeload.github.com/dpb587/gotmpl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284914,"owners_count":20913691,"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":[],"created_at":"2024-10-30T18:12:39.513Z","updated_at":"2025-04-05T03:41:45.872Z","avatar_url":"https://github.com/dpb587.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gotmpl\n\nA lightweight tool for rendering Go templates from the command line.\n\n## Command Line Usage\n\nPass the template file(s) and they will be rendered to standard out.\n\n```console\n$ gotmpl /app/etc/wp-config.php.tmpl\n```\n\nTemplates may use [sprig](https://masterminds.github.io/sprig/) functions.\n\n```go-template\ndefine('DB_HOST', {{ squote ( env \"WORDPRESS_DB_HOST\" ) }});\n```\n\nInline templates may be used with the `--template` option.\n\n```console\n$ gotmpl \\\n  --template '{{ now | date \"2006-01-02\" }}'\n```\n\nExternal data from files or URLs may also be used (JSON, YAML, or raw).\n\n```console\n$ gotmpl \\\n  --json data.json \\\n  --template '{{ .location }}'\n```\n\nMultiple data sources may be used by prefixing the source with a key.\n\n```console\n$ gotmpl \\\n  --json jdat=data.json \\\n  --yaml ydat=data.yaml \\\n  --template '{{ .jdat.location }} vs {{ .ydat.location }}'\n```\n\nOutput may be redirected elsewhere (or to multiple copies).\n\n```console\n$ gotmpl template.tmpl \\\n  --output /mnt/mirror-1/result.txt \\\n  --output /mnt/mirror-2/result.txt\n```\n\nOutputs may specify a [`block` name](https://golang.org/pkg/text/template/) to render different things to files.\n\n```console\n$ gotmpl templates/*.tmpl \\\n  --output summary.txt=summary \\\n  --output results.csv=csv\n```\n\nUse `--help` to see the full list of options for more advanced usage.\n\n### Installation\n\nBinaries for Linux, macOS, and Windows can be downloaded from the [releases](https://github.com/dpb587/gotmpl/releases) page. A [Homebrew](https://brew.sh/) recipe is also available for Linux and macOS.\n\n```\nbrew install dpb587/tap/gotmpl\n```\n\n## Alternatives\n\n * [`consul-template`](https://github.com/hashicorp/consul-template) – similar for Consul and Vault integration\n * [`gotmpl`](https://github.com/NateScarlet/gotmpl) - with JSON and template support\n * [`gotmplcli`](https://github.com/zbblanton/gotmplcli) - with YAML and basic template support\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpb587%2Fgotmpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpb587%2Fgotmpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpb587%2Fgotmpl/lists"}