{"id":24716598,"url":"https://github.com/template-tools/template-tools.github.io","last_synced_at":"2026-04-25T23:34:39.237Z","repository":{"id":103090976,"uuid":"332244645","full_name":"template-tools/template-tools.github.io","owner":"template-tools","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-01T21:23:00.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-29T11:22:04.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/template-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-01-23T15:38:12.000Z","updated_at":"2024-08-01T21:23:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"74c33e6c-b289-4bd3-9083-92dbba4042da","html_url":"https://github.com/template-tools/template-tools.github.io","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/template-tools/template-tools.github.io","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/template-tools%2Ftemplate-tools.github.io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/template-tools%2Ftemplate-tools.github.io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/template-tools%2Ftemplate-tools.github.io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/template-tools%2Ftemplate-tools.github.io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/template-tools","download_url":"https://codeload.github.com/template-tools/template-tools.github.io/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/template-tools%2Ftemplate-tools.github.io/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32280975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"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":[],"created_at":"2025-01-27T09:13:22.146Z","updated_at":"2026-04-25T23:34:39.222Z","avatar_url":"https://github.com/template-tools.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/@template-tools/sync-cli.svg)](https://www.npmjs.com/package/@template-tools/sync-cli)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![install size](https://packagephobia.now.sh/badge?p=@template-tools/sync-cli/@2.1.11)](https://packagephobia.now.sh/result?p=@template-tools/sync-cli@2.1.11)\n[![minified size](https://badgen.net/bundlephobia/min/@template-tools/sync-cli)](https://bundlephobia.com/result?p=@template-tools/sync-cli)\n[![downloads](http://img.shields.io/npm/dm/@template-tools/sync-cli.svg?style=flat-square)](https://npmjs.org/package/@template-tools/sync-cli)\n[![GitHub Issues](https://img.shields.io/github/issues/template-tools/template-sync-cli.svg?style=flat-square)](https://github.com/template-tools/template-sync-cli/issues)\n[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Ftemplate-tools%2Ftemplate-sync-cli%2Fbadge\\\u0026style=flat)](https://actions-badge.atrox.dev/template-tools/template-sync-cli/goto)\n[![Coverage Status](https://coveralls.io/repos/template-tools/template-sync-cli/badge.svg)](https://coveralls.io/github/template-tools/template-sync-cli)\n\n## @template-tools/sync-cli\n\nKeep repository in sync with its template.\n\nGenerates pull requests to bring a repository back in sync with its template.\n\nSo by making changes to the template and applying npm-template-sync the target project will be updated accoring to the template.\n\nWorks with github and bitbucket.\n\n```shell\nexport AGGREGATION_FACTORY=\"github-repository-provider\" # for github repos\nexport GITHUB_TOKEN='token providing repositroy write access' # for github repos\n\ntemplate-sync --template aTemplateGithubUser/aRepo myGithubUser/myRepo\n```\n\nDefine (initial) properties to be used in the template\n\n```shell\nexport AGGREGATION_FACTORY=\"github-repository-provider\" # for github repos\nexport GITHUB_TOKEN='token providing repositroy write access' # for github repos\n\ntemplate-sync --define \"description=a very new fantastic module\" -t myUser/myTemplate myUser/newModule#aBranch\n```\n\nCreate new repository and bind it to aTemplateGithubUser/aRepo\n\n```shell\nexport GITHUB_TOKEN='token providing repositroy write access' # for github repos\n\ntemplate-sync --track --create --template aTemplateGithubUser/aRepo myGithubUser/myRepo\n```\n\nSwitch from [arlac77/template-github](https://github.com/arlac77/template-github) to [arlac77/template-arlac77-github](https://github.com/arlac77/template-arlac77-github) template for [arlac77/url-cmd](https://github.com/arlac77/url-cmd), [arlac77/uti](https://github.com/arlac77/uti), [arlac77/content-entry](https://github.com/arlac77/content-entry) and [arlac77/repository-provider](https://github.com/arlac77/repository-provider)\n\n```shell\nexport GITHUB_TOKEN='token providing repositroy write access' # for github repos\n\ntemplate-sync --track --template arlac77/template-arlac77-github --template -arlac77/template-github arlac77/url-cmd arlac77/uti arlac77/content-entry arlac77/repository-provider\n```\n\nMerges contents from template branch into destination branch handling some special cases for:\n\n-   Licenses - rewriting license years\n-   line set files like .npmignore and .gitignore - by merging both sets together\n-   package.json - merge (.\\*)[Dd]ependencies, engines and scripts\n-   rollup.conf.\\*js - copy / rewrite + detect dev dependencies\n-   [\\*.yaml - merge](doc/yaml/README.md)\n-   [.travis.yml - merge with hints](doc/travis/README.md)\n-   [\\*.toml - merge](doc/toml/README.md)\n-   [\\*.ini - merge](doc/ini/README.md)\n-   [\\*.json - merge](doc/json/README.md)\n-   README.md - merge badges\n\n![generated pull request](doc/pr_sample.png)\n\n## Some templates\n\n-   [arlac77/template-cli-app](https://github.com/arlac77/template-cli-app) _rollup_ _ava_ _travis_\n-   [arlac77/template-esm-only](https://github.com/arlac77/template-esm-only) _ava_ _travis_\n-   [arlac77/template-svelte-component](https://github.com/arlac77/template-svelte-component) _svelte_ _rollup_ _testcafe_ _travis_\n-   [arlac77/template-svelte-app](https://github.com/arlac77/template-svelte-app) _svelte_ _rollup_ _pkgbuild_ _travis_\n-   [arlac77/template-kronos-component](https://github.com/arlac77/template-kronos-component) template-esm-only with node 14\n-   [arlac77/template-kronos-app](https://github.com/arlac77/template-kronos-app) node 14 + systemd\n\n# API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n### Table of Contents\n\n-   [Context](#context)\n    -   [Parameters](#parameters)\n    -   [Properties](#properties)\n    -   [execute](#execute)\n    -   [commits](#commits)\n    -   [executeBranch](#executebranch)\n-   [sortedKeys](#sortedkeys)\n-   [Package](#package)\n    -   [properties](#properties-1)\n        -   [Parameters](#parameters-1)\n-   [Merger](#merger)\n    -   [properties](#properties-2)\n        -   [Parameters](#parameters-2)\n    -   [commits](#commits-1)\n        -   [Parameters](#parameters-3)\n-   [Merger](#merger-1)\n    -   [Properties](#properties-3)\n    -   [properties](#properties-4)\n        -   [Parameters](#parameters-4)\n    -   [commits](#commits-2)\n        -   [Parameters](#parameters-5)\n-   [EntryMerger](#entrymerger)\n    -   [Properties](#properties-5)\n-   [Template](#template)\n    -   [Parameters](#parameters-6)\n    -   [Properties](#properties-6)\n    -   [entryMerger](#entrymerger-1)\n        -   [Parameters](#parameters-7)\n    -   [mergerFor](#mergerfor)\n        -   [Parameters](#parameters-8)\n    -   [\\_templateFrom](#_templatefrom)\n        -   [Parameters](#parameters-9)\n    -   [updateUsedBy](#updateusedby)\n        -   [Parameters](#parameters-10)\n    -   [templateFor](#templatefor)\n        -   [Parameters](#parameters-11)\n-   [ReplaceIfEmpty](#replaceifempty)\n-   [Readme](#readme)\n-   [MergeLineSet](#mergelineset)\n-   [Replace](#replace)\n-   [Skip](#skip)\n-   [Delete](#delete)\n-   [normalizeTemplateSources](#normalizetemplatesources)\n    -   [Parameters](#parameters-12)\n-   [jspath](#jspath)\n    -   [Parameters](#parameters-13)\n\n## Context\n\n**Extends LogLevelMixin(class \\_Context {})**\n\nContext prepared to execute one branch.\n\n### Parameters\n\n-   `provider`  \n-   `targetBranchName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** \n-   `options`   (optional, default `{}`)\n\n### Properties\n\n-   `ctx` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n-   `files` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e** \n\n### execute\n\nGenerate Pull Requests.\n\nReturns **AsyncIterator\u0026lt;PullRequest\u003e** \n\n### commits\n\nGenerate all commits from the template entry merges.\n\nReturns **Commit\u0026lt;AsyncIterator\u003e** \n\n### executeBranch\n\nGenerate Pull Requests.\n\nReturns **AsyncIterator\u0026lt;PullRequest\u003e** the actual PRs\n\n## sortedKeys\n\norder in which json keys are written\n\n## Package\n\n**Extends Merger**\n\nMerger for package.json\n\n### properties\n\nDeliver some key properties.\n\n-   name\n-   version\n-   description\n-   main\n\n#### Parameters\n\n-   `entry` **ContentEntry** \n\nReturns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n\n## Merger\n\nMergable content\n\n### properties\n\nDeliver some key properties.\n\n#### Parameters\n\n-   `entry` **ContentEntry** \n\nReturns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** extracted properties\n\n### commits\n\nGenerate commits as result of merging two entries.\n\n#### Parameters\n\n-   `context`  \n-   `destinationEntry`  \n-   `sourceEntry`  \n-   `options`  \n\n## Merger\n\nType: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\n\n### Properties\n\n-   `type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** \n-   `pattern` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** \n-   `factory` **Class** \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n\n### properties\n\nDeliver some key properties.\n\n#### Parameters\n\n-   `entry` **ContentEntry** \n\nReturns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** extracted properties\n\n### commits\n\nGenerate commits as result of merging two entries.\n\n#### Parameters\n\n-   `context`  \n-   `destinationEntry`  \n-   `sourceEntry`  \n-   `options`  \n\n## EntryMerger\n\nType: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\n\n### Properties\n\n-   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** \n-   `factory` **Class** \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n\n## Template\n\n**Extends LogLevelMixin(class {})**\n\n### Parameters\n\n-   `context` **Conext** \n-   `sources` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**  (optional, default `{}`)\n\n### Properties\n\n-   `context` **Conext** \n-   `sources` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** \n-   `toBeRemovedSources` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** \n-   `mergers` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Merger](#merger)\u003e** \n-   `branches` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)\u0026lt;Branch\u003e** all used branches direct and inherited\n-   `keyBranches` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)\u0026lt;Branch\u003e** branches used to define the template\n\n### entryMerger\n\nFind a suitable merger for each entry\n\n#### Parameters\n\n-   `entries` **Iterator\u0026lt;ContentEntry\u003e** \n\nReturns **Iterator\u0026lt;\\[ContentEntry, [Merger](#merger)]\u003e** \n\n### mergerFor\n\nFind a suitable merger\n\n#### Parameters\n\n-   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the entry\n\nReturns **[Merger](#merger)** \n\n### \\_templateFrom\n\nLoad all templates and collects the entries.\n\n#### Parameters\n\n-   `sources` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** branch names\n-   `inheritencePath` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;Branch\u003e** who was requesting us (optional, default `[]`)\n\nReturns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** package as merged from sources\n\n### updateUsedBy\n\nUpdates usedBy section of the template branch.\n\n#### Parameters\n\n-   `targetBranch` **Branch** template to be updated\n-   `templateSources` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** original branch identifiers (even with deletion hints)\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as passed to commitIntoPullRequest\n\nReturns **AsyncIterator\u0026lt;PullRequest\u003e** \n\n### templateFor\n\nLoad a template\n\n#### Parameters\n\n-   `context` **[Context](#context)** \n-   `sources` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n\n## ReplaceIfEmpty\n\n**Extends Merger**\n\nOverwrites none existing entries from template\n\n## Readme\n\n**Extends Merger**\n\ninjects badges into README.md\n\n## MergeLineSet\n\n**Extends Merger**\n\n## Replace\n\n**Extends Merger**\n\nReplace file from template (always)\n\n## Skip\n\n**Extends Merger**\n\nDoes not generate destination entry\n\n## Delete\n\n**Extends Merger**\n\nDelete entry.\n\n## normalizeTemplateSources\n\nRemove duplicate sources.\nSources staring with '-' will be removed\n\n### Parameters\n\n-   `sources` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** \n-   `remove` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e**  (optional, default `[]`)\n\nReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** normalized sources\n\n## jspath\n\n### Parameters\n\n-   `object`  \n-   `path`  \n-   `cb`  \n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```shell\nnpm install -g @template-tools/sync-cli\n\n# template-sync --help\n```\n\n# license\n\nBSD-2-Clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemplate-tools%2Ftemplate-tools.github.io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemplate-tools%2Ftemplate-tools.github.io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemplate-tools%2Ftemplate-tools.github.io/lists"}