{"id":31358306,"url":"https://github.com/leonsteinhaeuser/tmplx","last_synced_at":"2026-05-02T23:36:18.642Z","repository":{"id":207853270,"uuid":"720146075","full_name":"leonsteinhaeuser/tmplx","owner":"leonsteinhaeuser","description":"tmplx is a simple template renderer based on the Go template engine. It is designed to be used in a shell pipeline. It reads a template from disk, parses it, reads data from env, json file or yaml file, and renders the template to stdout (dry-run) or to a file.","archived":false,"fork":false,"pushed_at":"2024-04-29T21:50:55.000Z","size":58,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T20:42:49.972Z","etag":null,"topics":["docker","docker-image","go","template","template-engine"],"latest_commit_sha":null,"homepage":"https://github.com/leonsteinhaeuser/tmplx","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leonsteinhaeuser.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-17T17:14:34.000Z","updated_at":"2024-04-03T06:26:03.000Z","dependencies_parsed_at":"2024-04-29T23:06:03.414Z","dependency_job_id":null,"html_url":"https://github.com/leonsteinhaeuser/tmplx","commit_stats":null,"previous_names":["leonsteinhaeuser/tmplx"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/leonsteinhaeuser/tmplx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonsteinhaeuser%2Ftmplx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonsteinhaeuser%2Ftmplx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonsteinhaeuser%2Ftmplx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonsteinhaeuser%2Ftmplx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leonsteinhaeuser","download_url":"https://codeload.github.com/leonsteinhaeuser/tmplx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonsteinhaeuser%2Ftmplx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32553685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T22:28:24.418Z","status":"ssl_error","status_checked_at":"2026-05-02T22:28:14.225Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","docker-image","go","template","template-engine"],"created_at":"2025-09-26T21:58:24.050Z","updated_at":"2026-05-02T23:36:18.624Z","avatar_url":"https://github.com/leonsteinhaeuser.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tmplx\n\ntmplx is a simple template renderer based on the [Go template engine](https://golang.org/pkg/text/template/). It is designed to be used in a shell pipeline. It reads a template from disk, parses it, reads data from ***env***, ***json file*** or ***yaml file***, and renders the template to ***stdout*** (dry-run) or to a ***file***.\n\n## Installation\n\nWe provide pre-built binaries for Linux, MacOS and Windows. You can download them from the [releases page](https://github.com/leonsteinhaeuser/tmplx/releases). Alternatively, you can build the binary yourself using the [build instructions](#build), using the [Docker image](#docker) or using Go directly:\n\n### Go\n\n```bash\ngo install github.com/leonsteinhaeuser/tmplx@latest\n```\n\n### Docker\n\nYou can also use the Docker image to run tmplx. The image is based on [gcr.io/distroless/static](gcr.io/distroless/static) and is only a few MB in size.\n\n## Build\n\nTo build the binary yourself, you need to have Go installed. Then, clone the repository and run `go build -o tmplx .` in the root directory of the repository.\n\n## Usage\n\n| Short Flag | Long Short | Type | Default | Description |\n| -----------| -----------| ---- | --------| ----------- |\n| `-d` | `--dry-run` | bool | If set, the output will not be written to the output file. |\n| `-f` | `--format` | string | The format of the template data. Valid values are: env, json, yaml. (default \"env\") |\n| `-h` | `--help` | |help for tmpls |\n| `-o` | `--output` | string | The path to the output file. (default \"output.txt\") |\n| `-s` | `--source` | string | The path to the source file containing template data. Valid values are: \u003cfile\u003e.\u003cjson|yaml\u003e. If format is env, this flag caries the  |prefix for the environment variables. (default \"TMPLX_\")\n| `-t` | `--template` | string | The path to the template file. (default \"template.tmpl\") |\n| `-l` | `--delim-left` | string | `{{` | The left delimiter for the template engine. |\n| `-r` | `--delim-right` | string | `}}` | The right delimiter for the template engine. |\n| `-v` | `--version` | | version for tmpls |\n\n### Example\n\nThe following example shows how to use tmplx to render a template using data from environment variables.\n\n### Setup environment variables\n\n```bash\nexport TMPLX_USER_ACCOUNT_0=\"user0:pass0\"\nexport TMPLX_USER_ACCOUNT_1=\"user1:pass1\"\nexport TMPLX_USER_ACCOUNT_2=\"user2:pass2\"\nexport TMPLX_USER_ACCOUNT_3=\"user3:pass3\"\nexport TMPLX_USER_ACCOUNT_4=\"user4:pass4\"\nexport TMPLX_USER_ACCOUNT_5=\"user5:pass5\"\nexport TMPLX_USER_ACCOUNT_6=\"user6:pass6\"\nexport TMPLX_USER_ACCOUNT_7=\"user7:pass7\"\nexport TMPLX_USER_ACCOUNT_8=\"user8:pass8\"\nexport TMPLX_USER_ACCOUNT_9=\"user9:pass9\"\nexport TMPLX_USER_ACCOUNT_10=\"user10:pass10\"\n```\n\n### Execute tmplx\n\n```bash\ntmplx -t _tests/template.tmpl --dry-run\n```\n\nWith custom delim:\n\n```bash\ngo run main.go -t _tests/custom_delim.tmpl --dry-run -l '{|' -r '|}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonsteinhaeuser%2Ftmplx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleonsteinhaeuser%2Ftmplx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonsteinhaeuser%2Ftmplx/lists"}