{"id":13779389,"url":"https://github.com/Meyhem/Skid","last_synced_at":"2025-05-11T12:33:21.174Z","repository":{"id":56797698,"uuid":"423206443","full_name":"Meyhem/Skid","owner":"Meyhem","description":"Simple, single-file portable CLI utility for configuration templating","archived":false,"fork":false,"pushed_at":"2022-08-16T19:49:28.000Z","size":33,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T16:41:29.221Z","etag":null,"topics":["configuration","configuration-management","templating"],"latest_commit_sha":null,"homepage":"","language":"F#","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/Meyhem.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":"2021-10-31T16:52:11.000Z","updated_at":"2022-08-11T22:14:27.000Z","dependencies_parsed_at":"2022-08-16T20:31:11.753Z","dependency_job_id":null,"html_url":"https://github.com/Meyhem/Skid","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meyhem%2FSkid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meyhem%2FSkid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meyhem%2FSkid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Meyhem%2FSkid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Meyhem","download_url":"https://codeload.github.com/Meyhem/Skid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253567589,"owners_count":21928857,"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":["configuration","configuration-management","templating"],"created_at":"2024-08-03T18:01:04.616Z","updated_at":"2025-05-11T12:33:20.929Z","avatar_url":"https://github.com/Meyhem.png","language":"F#","funding_links":[],"categories":["Configuration"],"sub_categories":[],"readme":"# Skid\n\nSimple, single-file portable CLI utility for configuration templating of all text-based config formats.\n\n### [Download here](https://github.com/Meyhem/Skid/releases/latest)\n\n- [How it works](#how-it-works)\n- [Usage](#usage)\n- [Example having multiple environments](#example-having-multiple-environments)\n- [Features](#features)\n  * [Mandatory values](#mandatory-values)\n  * [Recursive running](#recursive-running)\n  * [Pruning templates](#pruning-templates)\n  * [Multiple value files overrides](#multiple-value-files-overrides)\n  * [Custom formatting marks](#custom-formatting-marks)\n  * [JSON Path selectors](#json-path-selectors)\n\n\n## How it works\n\nSkid will load your JSON files, containing your configuration values, then it will render these values into your\nconfiguration templates. With single command you can create instantly configured package for specific environment.\n\n## Usage\n```\nUSAGE: skid [--help] --file \u003cpath\u003e [--recursive] [--prune] [--mark-start \u003cmarkStart\u003e] [--mark-end \u003cmarkEnd\u003e]\n            \u003ctargetPath\u003e\n\nTARGET:\n\n    \u003ctargetPath\u003e          Target skid file or directory to run templating on. In case of directory, it searches all\n                          '*.skid' files\nOPTIONS:\n    --file, -f \u003cpath\u003e     Json value file path to load (can be specified multiple times)\n    --recursive, -r       Recurse into subdirectories if \u003ctarget\u003e is directory\n    --prune, -p           Delete .skid file template after templating succeeded without error\n    --mark-start \u003cmarkStart\u003e Characters that denote start of value interpolation. Default is '{{'\n    --mark-end \u003cmarkEnd\u003e  Characters that denote end of value interpolation. Default is '}}'\n    --help                display this list of options.\n```\n\n## Example having multiple environments\n\nLets assume you have ```config.xml``` file, that you want to have templatable for **local** and **prod** environments\n\n```xml\n\u003cconfig\u003e\n    \u003cconnectionString\u003eServer=localhost;Database=MyDb;User=Tom;Password=Tom123\u003c/connectionString\u003e\n    \u003clogLevel\u003eInformation\u003c/logLevel\u003e\n\u003c/config\u003e\n```\n\nFirst lets create value file ```local.json``` and fill it with values:\n\n```json\n{\n  \"connectionString\": \"Server=localhost;Database=MyDb;User=Tom;Password=Tom123\",\n  \"logging\": {\n    \"level\": \"Information\"\n  }\n}\n```\n\nAnd ```prod.json``` and fill it with values:\n\n```json\n{\n  \"connectionString\": \"Server=prodserver.com;Database=ProdDb;User=Tomtheprodadmin;Password=Tom123!\",\n  \"logging\": {\n    \"level\": \"Warning\"\n  }\n}\n```\n\nThen create template ```config.xml.skid``` file template from your config\n\n```xml\n\u003cconfig\u003e\n    \u003cconnectionString\u003e{{!connectionString}}\u003c/connectionString\u003e\n    \u003clogLevel\u003e{{!logging.level}}\u003c/logLevel\u003e\n\u003c/config\u003e\n```\n\n---\n**Then run skid for local environment**\n\n```sh\nskid -f local.json config.xml.skid\n```\n\nWhich will render the values from ```local.json``` into ```config.xml.skid``` template creating ```config.xml``` file\nwith filled values\n\n```xml\n\u003cconfig\u003e\n    \u003cconnectionString\u003eServer=localhost;Database=MyDb;User=Tom;Password=Tom123\u003c/connectionString\u003e\n    \u003clogLevel\u003eInformation\u003c/logLevel\u003e\n\u003c/config\u003e\n```\n\n---\n**Or run skid for prod environment**\n\n```sh\nskid -f prod.json config.xml.skid\n```\n\nWhich will render the values from ```prod.json``` into ```config.xml.skid``` template creating ```config.xml``` file\nwith filled values\n\n```xml\n\u003cconfig\u003e\n    \u003cconnectionString\u003eServer=prodserver.com;Database=ProdDb;User=Tomtheprodadmin;Password=Tom123!\u003c/connectionString\u003e\n    \u003clogLevel\u003eWarning\u003c/logLevel\u003e\n\u003c/config\u003e\n```\n\n## Features\n\n### Mandatory values\n\nIn case of many config values in multiple files, it's easy to miss something. Skid allows you to mark mandatory (\nnon-empty) in your templates which will generate warning if the value for interpolation is missing.  \nSimply add \"!\" in front of json selector to mark interpolation as mandatory like this:\n\n```sh\nconnectionString={{ ! connectionString }}\n```\n\nwill produce warning\n\n```\n\u003c!\u003e missing required value 'connectionString ' used in 'D:\\app\\config.txt.skid'\n```\n\n### Recursive running\n\nSkid supports specifying the target either by File or Folder (in case of folder Skid searches for _.skid_ files).\n\n```sh\nskid -f values.json config.xml.skid\nskid -f values.json my-folder-with-configs\n```\n\nYou can specify the ```-r``` option to recursively scan target folder and its children for _.skid_ files.\n\n```sh\nskid -r -f values.json my-app-package-with-deep-structure\n```\n\n### Pruning templates\nSkid allows you to pass ```--prune``` or ```-p``` option, which deletes .skid file templates\nafter it's rendered without any error.  \nThis feature is handy if you want to clear your deployment package of .skid templates after \nthey are used and are no longer needed.\n```sh\nskid -f values.json --prune config.xml.skid\nskid -f values.json -p config.xml.skid\n```\n\n### Multiple value files overrides\n\nSkid supports loading multiple JSON files and merge their values. This feature is handy for example when\nhaving ```base.json``` filled with commom values, then ```prod.json``` containing production specific values\nand ```secrets.json``` containing access credentials that is kept outside version control.  \nFor such case you can create these JSON files and feed them to skid like this:\n\n```sh\nskid -f base.json -f prod.json -f secrets.json ./MyApplicationPackage\n```\n\nNote that **-f** options can be specified multiple times and are order dependent, the **last available value wins**.\n\n### Custom formatting marks\n\nSkid by default uses the '{{ ... }}' style interpolation. In some rare scenarios these might be already used for\ndifferent purposes. Skid allows you to define custom formatting marks to avoid this scenario simply like this:\n\n```\nskid -f values.json --mark-start \"\u003c\u003c\" --mark-end \"\u003e\u003e\" app-package\n```\n\nSkid will now look for value interpolations '\u003c\u003c ... \u003e\u003e'\n\n### JSON Path selectors\n\nSkid supports [JsonPath](https://goessner.net/articles/JsonPath/index.html#e2) selectors in your template interpolations\nallowing you to select deep nested properties through arrays and maps.   \nExample values file:\n\n```json\n{\n  \"Tenants\": [\n    {\n      \"Region\": {\n        \"Name\": \"Europe\"\n      }\n    }\n  ]\n}\n```\nThe value can be interpolated via ```{{ Tenants[0].Region.Name }}```  \nSee [JsonPath docs](https://goessner.net/articles/JsonPath/index.html#e2) for all features.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMeyhem%2FSkid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMeyhem%2FSkid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMeyhem%2FSkid/lists"}