{"id":19325950,"url":"https://github.com/alephao/stencil-cli","last_synced_at":"2025-04-22T20:32:03.467Z","repository":{"id":87476034,"uuid":"211307268","full_name":"alephao/Stencil-CLI","owner":"alephao","description":"Render a Stencil template by using a JSON or Yaml data source","archived":false,"fork":false,"pushed_at":"2020-05-18T05:16:43.000Z","size":35,"stargazers_count":17,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T13:55:23.121Z","etag":null,"topics":["cli","codegen","stencil-template","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/alephao.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":"2019-09-27T11:47:20.000Z","updated_at":"2024-02-01T19:24:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4b87cb2-cdfa-45a9-bc61-037d5cab393f","html_url":"https://github.com/alephao/Stencil-CLI","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alephao%2FStencil-CLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alephao%2FStencil-CLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alephao%2FStencil-CLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alephao%2FStencil-CLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alephao","download_url":"https://codeload.github.com/alephao/Stencil-CLI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250318825,"owners_count":21410996,"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":["cli","codegen","stencil-template","swift"],"created_at":"2024-11-10T02:12:00.340Z","updated_at":"2025-04-22T20:32:03.462Z","avatar_url":"https://github.com/alephao.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stencil CLI\n\nA CLI tool to render [Stencil](https://github.com/stencilproject/Stencil) templates by using a JSON or Yaml data source.\n\nTags and filters from [StencilSwiftKit](https://github.com/SwiftGen/StencilSwiftKit) are supported.\n\n## Installing\n\n### Using Homebrew\n\n```\nbrew install alephao/formulae/stencil\n```\n\n### Using [Mint](https://github.com/yonaskolb/mint):\n\n```\n$ mint install alephao/Stencil-CLI\n```\n\n### Using Make\n\n```\n$ git clone https://github.com/alephao/Stencil-CLI.git\n$ cd stencil-cli\n$ make install\n```\n\n## Usage\n\n```\n$ stencil render -t path/to/template.stencil -d path/to/datasource.yaml -o path/to/output\n```\n\n## Example\n\nGiven the stencil template\n\n```\nextension Color {\n    {% for color in colors %}\n    public static let {{ color.name }} = Color(hex: 0x{{ color.hex }})\n    {% endfor %}\n}\n```\n\nAnd the yaml file\n\n```yaml\ncolors:\n- name: color1\n  hex: '111111'\n- name: color2\n  hex: '222222'\n- name: color3\n  hex: '333333'\n- name: color4\n  hex: '444444'\n```\n\nstencil-cli generates\n\n```swift\nextension Color {\n    public static let color1 = Color(hex: 0x111111)\n    public static let color2 = Color(hex: 0x222222)\n    public static let color3 = Color(hex: 0x333333)\n    public static let color4 = Color(hex: 0x444444)\n}\n\n```\n\n## Attributions\n\nThis tool is powered by:\n\n* [Stencil](https://github.com/stencilproject/Stencil)\n* [SwiftStencilKit](https://github.com/SwiftGen/StencilSwiftKit)\n* [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON)\n* [Yams](https://github.com/jpsim/Yams)\n* [swift-argument-parser](https://github.com/apple/swift-argument-parser)\n* Tested using [swift-snapshot-testing](https://github.com/pointfreeco/swift-snapshot-testing)\n\n## License\n\nStencil CLI is available under the MIT license. See LICENSE for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falephao%2Fstencil-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falephao%2Fstencil-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falephao%2Fstencil-cli/lists"}