{"id":36800075,"url":"https://github.com/mxcd/tmpltr","last_synced_at":"2026-01-12T13:33:24.475Z","repository":{"id":53873149,"uuid":"497102450","full_name":"mxcd/tmpltr","owner":"mxcd","description":"Templating files with mustache and YAML files","archived":false,"fork":false,"pushed_at":"2022-08-29T11:11:19.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-22T13:55:31.167Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mxcd.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":"2022-05-27T18:40:08.000Z","updated_at":"2022-05-29T16:38:54.000Z","dependencies_parsed_at":"2022-09-04T19:02:16.654Z","dependency_job_id":null,"html_url":"https://github.com/mxcd/tmpltr","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/mxcd/tmpltr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcd%2Ftmpltr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcd%2Ftmpltr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcd%2Ftmpltr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcd%2Ftmpltr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxcd","download_url":"https://codeload.github.com/mxcd/tmpltr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxcd%2Ftmpltr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28339181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-01-12T13:33:23.147Z","updated_at":"2026-01-12T13:33:24.427Z","avatar_url":"https://github.com/mxcd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tmpltr - templating files with mustache and YAML\n```\n__       __                  ____      \n\\ \\     / /_____ ___  ____  / / /______\n \\ \\   / __/ __ `__ \\/ __ \\/ / __/ ___/\n / /  / /_/ / / / / / /_/ / / /_/ /    \n/_/   \\__/_/ /_/ /_/ .___/_/\\__/_/     \n                  /_/                  \n```\n\n## Concept\nThis tool generates a set of files based on one or more templates in combination with a set of values used as tempalte variables.  \nFor tempaltes, mustache is used. For the manifest file, YAML is used (`*.yaml` and `*.yml` are equally supported).  \nFor execution, at least one `*.mustache` template and one `*.yml` manifest file are required.\n\n## Usage\n```\ntmpltr [workingDirectory] [--manifest \u003cmanifest yml file\u003e] [--verbose] [--dryrun] [--console]\n```\n\n### Options and switches\n| option           | optional | default | description                                                                                                  |\n|------------------|----------|---------|--------------------------------------------------------------------------------------------------------------|\n| workingDirectory | true     | .       | working directory in which to search for the templates and the manifest.yml files (if not further specified) |\n| --verbose        | true     | false   | increased output on \"debug\" level                                                                            |\n| --dryrun         | true     | false   | do not write any templated files                                                                             |\n| --console        | true     | false   | print the templated files to the console                                                                     |\n| --manifest       | true     | ''      | location of the manifest.yml file. absolute or relative to the pwd                                           |\n| --stdin          | true     | false   | reads the manifest file data from stdin. useful for usage with secrets                                       |\n\n\n### File structure\nFor mustache template files, please refer to [the official documentation](https://mustache.github.io/mustache.5.html)  \n`manifest.yml` file structure:\n``` yaml\n---\n# list of files to be generated\nfiles: \n    # destination file relative to the working directory\n  - destination: ./foo.txt \n    # template file name. all template files must be in the working directory. \n    # *.mustache file extension is optional.\n    template: my-template[.mustache] \n    # object of values to be rendered into the template\n    values:\n      foo: \"foo\"\n      bar: \"bar\"\n      fizzBuzz: 42\n```\n\n### Locating the manifest file\nThe `--manifest` switch of the `tmpltr` command can be used to specify the manifest file. It has highest priority and is considered to be either absolute or relative to the `pwd`.  \n```\n/home/\n├─ some-project/\n│  ├─ templates/\n│  │  ├─ manifest.yml\n│  │  ├─ template-a.mustache\n│  │  ├─ template-b.mustache\n│  ├─ README.md\n│  ├─ my-manifest.yml\n```\n``` bash\ncd /home/some-project/\ntmpltr --manifest ./my-manifest.yml templates\n# equivalent to\ntmpltr --manifest /home/some-project/my-manifest.yml templates\n```  \n\nIf no `--manifest` switch is specified, the `manifest.y[a]ml` file is searched in the working directory.\n``` bash\ncd /home/some-project/\ntmpltr templates # uses the manifest.yml file in the templates directory\n# equivalet to\ncd /home/some-project/templates/\ntmpltr # uses the pwd (/home/some-project/templates/) as working directory and uses the manifest.yml file\n```\n\nIf no `manifest.y[a]ml` file is found, all `*.y[a]ml` files in the working directory are considered to be manifest files and checked against the YAML validator.\n```\n/home/\n├─ some-project/\n│  ├─ templates/\n│  │  ├─ manifest-a.yml\n│  │  ├─ manifest-b.yaml\n│  │  ├─ template-a.mustache\n│  │  ├─ template-b.mustache\n│  ├─ README.md\n│  ├─ my-manifest.yml\n```\n``` bash\ncd /home/some-project/\ntmpltr templates # uses manifest-a.yml AND manifest-b.yaml\n```\n\n### With npm/npx\n``` bash\nnpm i -g tmpltr\n# OR\nnpx tmpltr\n```\n### With docker\n``` bash\ndocker run --rm -v ${PWD}:/usr/src mxcd/tmpltr\n```\n  \n  \nMade with \u0026#9829;, pizza and beer by MaPa","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxcd%2Ftmpltr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxcd%2Ftmpltr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxcd%2Ftmpltr/lists"}