{"id":15653172,"url":"https://github.com/cbrgm/structuresmith","last_synced_at":"2026-02-01T14:03:28.889Z","repository":{"id":211810122,"uuid":"729983077","full_name":"cbrgm/structuresmith","owner":"cbrgm","description":"Validate, Diff, Render - A powerful tool designed to automate the generation of project files using customizable templates.","archived":false,"fork":false,"pushed_at":"2026-01-13T04:46:31.000Z","size":416,"stargazers_count":36,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-13T07:51:24.312Z","etag":null,"topics":["automation","codegen","directory","files","go","rendering","repository","structure","template","yaml"],"latest_commit_sha":null,"homepage":"https://cbrgm.net","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbrgm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"ko_fi":"chrisbargmann"}},"created_at":"2023-12-10T23:43:52.000Z","updated_at":"2026-01-13T04:46:35.000Z","dependencies_parsed_at":"2023-12-11T02:24:35.479Z","dependency_job_id":"c8e741e7-a674-4834-9fd7-a2719fb0acca","html_url":"https://github.com/cbrgm/structuresmith","commit_stats":null,"previous_names":["cbrgm/structuresmith"],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/cbrgm/structuresmith","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrgm%2Fstructuresmith","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrgm%2Fstructuresmith/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrgm%2Fstructuresmith/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrgm%2Fstructuresmith/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbrgm","download_url":"https://codeload.github.com/cbrgm/structuresmith/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrgm%2Fstructuresmith/sbom","scorecard":{"id":268712,"data":{"date":"2025-08-11","repo":{"name":"github.com/cbrgm/structuresmith","commit":"6fc99674c39a11aa2b25478dbadfe9342c69f0c5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"29 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: topLevel 'contents' permission set to 'write': .github/workflows/automerge.yml:7","Info: topLevel 'contents' permission set to 'read': .github/workflows/container.yml:16","Warn: topLevel 'packages' permission set to 'write': .github/workflows/container.yml:17","Warn: no topLevel permission defined: .github/workflows/example-workflow.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/go-binaries.yml:16","Info: topLevel 'contents' permission set to 'read': .github/workflows/go-lint-test.yml:14","Info: topLevel 'contents' permission set to 'read': .github/workflows/notify.yml:9","Warn: topLevel 'contents' permission set to 'write': .github/workflows/stale.yml:10","Warn: topLevel 'contents' permission set to 'write': .github/workflows/tag.yml:30","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":6,"reason":"dependency not pinned by hash detected -- score normalized to 6","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/example-workflow.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/cbrgm/structuresmith/example-workflow.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/stale.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/cbrgm/structuresmith/stale.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tag.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/cbrgm/structuresmith/tag.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile.linux.386:1","Warn: containerImage not pinned by hash: Dockerfile.linux.amd64:1","Warn: containerImage not pinned by hash: Dockerfile.linux.arm:1","Warn: containerImage not pinned by hash: Dockerfile.linux.arm64:1","Info:  11 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:  14 out of  17 third-party GitHubAction dependencies pinned","Info:   0 out of   4 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.2.32 not signed: https://api.github.com/repos/cbrgm/structuresmith/releases/236870476","Warn: release artifact v1.2.31 not signed: https://api.github.com/repos/cbrgm/structuresmith/releases/229097363","Warn: release artifact v1.2.30 not signed: https://api.github.com/repos/cbrgm/structuresmith/releases/222276583","Warn: release artifact v1.2.29 not signed: https://api.github.com/repos/cbrgm/structuresmith/releases/215976352","Warn: release artifact v1.2.28 not signed: https://api.github.com/repos/cbrgm/structuresmith/releases/209584602","Warn: release artifact v1.2.32 does not have provenance: https://api.github.com/repos/cbrgm/structuresmith/releases/236870476","Warn: release artifact v1.2.31 does not have provenance: https://api.github.com/repos/cbrgm/structuresmith/releases/229097363","Warn: release artifact v1.2.30 does not have provenance: https://api.github.com/repos/cbrgm/structuresmith/releases/222276583","Warn: release artifact v1.2.29 does not have provenance: https://api.github.com/repos/cbrgm/structuresmith/releases/215976352","Warn: release artifact v1.2.28 does not have provenance: https://api.github.com/repos/cbrgm/structuresmith/releases/209584602"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/container.yml:20"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T12:49:32.421Z","repository_id":211810122,"created_at":"2025-08-17T12:49:32.421Z","updated_at":"2025-08-17T12:49:32.421Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28980159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T13:38:33.235Z","status":"ssl_error","status_checked_at":"2026-02-01T13:38:32.912Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["automation","codegen","directory","files","go","rendering","repository","structure","template","yaml"],"created_at":"2024-10-03T12:44:52.498Z","updated_at":"2026-02-01T14:03:28.871Z","avatar_url":"https://github.com/cbrgm.png","language":"Go","readme":"\u003ch1 align=\"center\"\u003e\n\u003cimg src=\".img/logo.png\" width=\"125px\"/\u003e\n \u003cbr\u003e\n structuresmith\n \u003c/br\u003e\n\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eStructuresmith is a powerful tool designed to automate the generation of project files, streamlining repository setup and more using customizable templates. It's ideal for developers looking to maintain consistency and efficiency in their project configurations.\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/cbrgm/structuresmith\"\u003e\u003cimg src=\"https://img.shields.io/github/release/cbrgm/structuresmith.svg\" alt=\"GitHub release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/cbrgm/structuresmith\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/cbrgm/structuresmith\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/cbrgm/structuresmith/actions/workflows/go-lint-test.yml\"\u003e\u003cimg src=\"https://github.com/cbrgm/structuresmith/actions/workflows/go-lint-test.yml/badge.svg\" alt=\"go-lint-test\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/cbrgm/structuresmith/actions/workflows/go-binaries.yml\"\u003e\u003cimg src=\"https://github.com/cbrgm/structuresmith/actions/workflows/go-binaries.yml/badge.svg\" alt=\"go-binaries\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/cbrgm/structuresmith/actions/workflows/container.yml\"\u003e\u003cimg src=\"https://github.com/cbrgm/structuresmith/actions/workflows/container.yml/badge.svg\" alt=\"container\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n- [Features 🌟](#features-)\n- [What can this tool do for you?](#what-can-this-tool-do-for-you)\n- [Installation](#installation)\n- [CLI Usage](#cli-usage)\n   * [Validate](#validate)\n   * [Diff](#diff)\n   * [Render](#render)\n- [Container](#container)\n- [GitHub Actions](#github-actions)\n- [Configuration Overview](#configuration-overview)\n- [Examples](#examples)\n   * [Example 1: Simple Inline Content for a Single Project](#example-1-simple-inline-content-for-a-single-project)\n   * [Example 2: Single File Template with Value](#example-2-single-file-template-with-value)\n   * [Example 3: Templated File with Nested Values](#example-3-templated-file-with-nested-values)\n   * [Example 4: Using Template Group with Overwritten Values](#example-4-using-template-group-with-overwritten-values)\n   * [Example 5: Multiple Template Groups](#example-5-multiple-template-groups)\n   * [Example 6: Mix of Direct Files and Template Groups](#example-6-mix-of-direct-files-and-template-groups)\n   * [Example 7: Templating a Whole Directory](#example-7-templating-a-whole-directory)\n   * [Example 8: Downloading Content from URLs](#example-8-downloading-content-from-urls)\n- [Lockfile `.anvil.lock`](#lockfile-anvillock)\n- [Templating Explained](#templating-explained)\n   * [How It Works](#how-it-works)\n   * [Go Templating Syntax](#go-templating-syntax)\n- [Contributing \u0026 License](#contributing-license)\n\n---\n\n## Features 🌟\n\n- **Template Generation**: Automates the creation of project files, ensuring consistency and standardization across different projects\n- **YAML Configuration**: Easily define templates and file structures in YAML format.\n- **Robust Validation**: Ensures configuration integrity with comprehensive checks and file diffing before processing.\n- **Content Flexibility**:  Supports a variety of content sources, including external templates, direct YAML content, and files from URLs, making it adaptable to different project requirements.\n\n## What can this tool do for you?\n\n1. **Automated Project Setup**: Streamline new project initialization with predefined templates, significantly reducing setup time.\n2. **Standardization Across Projects**: Ensure consistent file structures and setups across multiple projects or repositories, crucial for team coherence and project maintenance.\n3. **Bootstrapping**: Accelerate the creation of initial project structures for quick prototyping and development iterations.\n4. **Custom Template Management**: Efficiently manage and apply custom templates across various projects, especially beneficial in large teams or organizations.\n5. **Configuration Auditing**: Validate YAML configurations before deployment to ensure compliance with required standards and specifications, enhancing reliability and reducing configuration errors.\n\n## Installation\n\nYou can download the latest release of structuresmith with this one-liner on MacOS / Linux (amd64 + arm64):\n\n```\nwget -O structuresmith \"https://github.com/cbrgm/structuresmith/releases/latest/download/structuresmith_$(uname -s)-$(uname -m)\"\n```\n\nYou may also download the latest pre-compiled binaries from the [GitHub releases page](https://github.com/cbrgm/structuresmith/releases/latest) or build `structuresmith` from source using `Go` (1.21+):\n\n```bash\nmake build\n```\n\n## CLI Usage\n\nAfter installing, you can run Structuresmith with the following command-line arguments:\n\n```bash\nstructuresmith -h\n```\n\n- `-h, --help`: Shows context-sensitive help. This flag can be used with any command to get more information about its usage and options.\n- `--config=\"anvil.yml\"`: Specifies the path to the YAML configuration file. This flag allows you to define a custom configuration file for the tool to use.\n- `--output=\"out\"`: Sets the output path prefix for the generated files. This flag lets you specify where the generated files should be stored.\n- `--templates=\"templates\"`: Indicates the directory where template files are stored. With this flag, you can define a custom location for your template files.\n\n### Validate\n\nValidates the YAML configuration (`anvil.yml`) to ensure its integrity and checks for any potential issues.\n\n```bash\nstructuresmith validate --config path/to/config.yaml\n```\n\n### Diff\n\nConducts a dry-run to display the file paths that would be generated, helping to preview changes without actual file creation.\n\n```bash\nstructuresmith diff --config path/to/config.yaml --output output/directory --templates path/to/templates project-to-render\n```\n\nExample output:\n\n```bash\ndelete:     .gitignore\noverwrite:  .golangci.yml\noverwrite:  Dockerfile\noverwrite:  LICENSE\nnew:        foobar.txt\noverwrite:  sub/bar.txt\noverwrite:  sub/foo.txt\ndelete:     sub/nested/foo.txt\n```\n\n### Render\n\nProcesses and writes the templated files to the disk, applying the configurations to generate the specified project structure.\n\n```bash\nstructuresmith render --config path/to/config.yaml --output output/directory --templates path/to/templates project-to-render\n```\n\n## Container\n\n```bash\npodman run --rm -it ghcr.io/cbrgm/structuresmith:latest\n```\n\n## GitHub Actions\n\nPlease check out the [action.yml](./action.yml) and the example [workflow](.github/workflows/example-workflow.yml).\n\n## Configuration Overview\n\nThese examples showcase the versatility and capabilities of `structuresmith`, ranging from simple inline content to more complex configurations using template groups and nested values. Please take a look at the sample [anvil.yml](./anvil.yml).\n\n```yaml\n# Structuresmith YAML Configuration\n# This configuration showcases the use of template groups, custom values for templating,\n# and the definition of project-specific files. Modify paths and values as needed.\n\n# Define projects to apply template groups\nprojects:\n\n  # Example Go project configuration\n  - name: \"example/go-project\"\n    groups:\n      - groupName: \"commonFiles\"\n      - groupName: \"goProjectFiles\"\n        values:\n          packageName: \"main\"   # Custom value used in Go template\n\n  # Example for a general project using inline content\n  - name: \"example/general-project\"\n    groups:\n      - groupName: \"commonFiles\"\n    files:\n      - destination: \"config.json\"\n        content: |\n          {\n            \"setting\": \"value\",\n            \"enabled\": true\n          }\n\n# Define template groups with sets of files\ntemplateGroups:\n\n  # Common files for all projects\n  commonFiles:\n    - destination: \".gitignore\"\n      source: \"templates/gitignore.tmpl\"  # Template for .gitignore\n    - destination: \"README.md\"\n      source: \"templates/readme.tmpl\"     # Template for README.md\n\n# Group for specific project types, e.g., Go projects\n  goProjectFiles:\n    - destination: \"main.go\"\n      source: \"templates/main.go.tmpl\"    # Main file for Go project\n    - destination: \"Makefile\"\n      source: \"templates/Makefile.tmpl\"   # Makefile for build commands\n\n# Uncomment to demonstrate downloading files from URLs\n#   - destination: \"Dockerfile\"\n#     sourceUrl: \"https://example.com/Dockerfile\"\n# Uncomment to demonstrate copying whole directories\n#   - destination: \"docs/\"\n#     source: \"docs_templates/\"\n\n```\n\n## Examples\n\n### Example 1: Simple Inline Content for a Single Project\n\n**Description**: A basic configuration creating a `README.md` file with inline content.\n\n**YAML Configuration**:\n```yaml\nprojects:\n  - name: \"simple-project\"\n    files:\n      - destination: \"README.md\"\n        content: \"Welcome to Simple Project\"\n```\n\n**Output:**\n\n* `out/README.md` containing \"Welcome to Simple Project\".\n\n### Example 2: Single File Template with Value\n\n**Description**: Creating a `config.txt` file from a template, substituting a value.\n**YAML Configuration**:\n```yaml\ntemplateGroups:\n  configFile:\n    - destination: \"config.txt\"\n      source: \"templates/config.tmpl\"\nprojects:\n  - name: \"config-project\"\n    groups:\n      - groupName: \"configFile\"\n        values:\n          setting: \"Enabled\"\n```\n\n**Output:**\n\n* `out/config.txt` with content from `config.tmpl`, where a template value like `{{ .setting }}` is replaced by \"Enabled\".\n\n### Example 3: Templated File with Nested Values\n\n**Description**: Creating a file with nested template values.\n**YAML Configuration**:\n```yaml\ntemplateGroups:\n  detailFile:\n    - destination: \"details.txt\"\n      source: \"templates/details.tmpl\"\nprojects:\n  - name: \"detail-project\"\n    groups:\n      - groupName: \"detailFile\"\n        values:\n          user:\n            name: \"Alice\"\n            role: \"Developer\"\n\n```\n\n**Output:**\n\n* `out/details.txt` with content from `details.tmpl`, where template values like `{{ .user.name }}` are replaced by \"Alice\" and `{{ .user.role }}` by \"Developer\".\n\n### Example 4: Using Template Group with Overwritten Values\n\n**Description**: Utilizing a template group with values defined in the group and overwritten in the project definition.\n**YAML Configuration**:\n```yaml\ntemplateGroups:\n  baseFiles:\n    - destination: \"base.txt\"\n      source: \"templates/base.tmpl\"\n      values:\n        defaultText: \"Default\"\nprojects:\n  - name: \"base-project\"\n    groups:\n      - groupName: \"baseFiles\"\n        values:\n          defaultText: \"Customized Text\"\n```\n\n**Output:**\n\n* `out/base.txt` with content from `base.tmpl`, where the default text is overwritten by \"Customized Text\".\n\n### Example 5: Multiple Template Groups\n\n**Description**: Combining multiple template groups in a single project.\n**YAML Configuration**:\n```yaml\ntemplateGroups:\n  commonFiles:\n    - destination: \"README.md\"\n      source: \"templates/readme.tmpl\"\n  additionalFiles:\n    - destination: \"extra.txt\"\n      source: \"templates/extra.tmpl\"\nprojects:\n  - name: \"multi-group-project\"\n    groups:\n      - groupName: \"commonFiles\"\n      - groupName: \"additionalFiles\"\n```\n\n**Output:**\n\n* `out/README.md` from `readme.tmpl`.\n* `out/extra.txt` from `extra.tmpl`.\n\n### Example 6: Mix of Direct Files and Template Groups\n\n**Description**: A project configuration using a mix of direct file definitions and template groups.\n**YAML Configuration**:\n```yaml\ntemplateGroups:\n  documentationFiles:\n    - destination: \"docs/intro.md\"\n      source: \"templates/docs/intro.tmpl\"\nprojects:\n  - name: \"mixed-project\"\n    files:\n      - destination: \"overview.txt\"\n        content: \"Project Overview\"\n    groups:\n      - groupName: \"documentationFiles\"\n```\n\n**Output:**\n\n* `out/overview.txt` with \"Project Overview\".\n* `out/docs/intro.md` generated from intro.tmpl.\n\n### Example 7: Templating a Whole Directory\n\n**Description**: Applying templates to an entire directory.\n**YAML Configuration**:\n```yaml\nprojects:\n  completeDirectory:\n    - destination: \"config/\"\n      source: \"templates/config_directory/\"\n      values:\n        appName: \"MyApp\"\n\nrepositories:\n  - name: \"directory-project\"\n    groups:\n      - groupName: \"completeDirectory\"\n```\n\n**Output:**\n\n* Directory `out/config/` with files from `templates/config_directory/`, where template values like `{{ .appName }}` are replaced with \"MyApp\".\n\n### Example 8: Downloading Content from URLs\n\n**Description**: Fetching a file from a URL and placing it into the project directory.\n**YAML Configuration**:\n```yaml\nprojects:\n  - name: \"download-project\"\n    files:\n      - destination: \"Dockerfile\"\n        sourceUrl: \"https://raw.githubusercontent.com/exampleuser/project/main/Dockerfile\"\n```\n\n**Output:**\n\n* `out/Dockerfile` containing the content fetched from the provided URL.\n\n## Lockfile `.anvil.lock`\n\nStructuresmith's `anvil.lock` file is vital for managing project files. It keeps a record of used files and templates, tracking updates since the last use of the tool. An important feature of Structuresmith is its ability to automatically remove files from the project's output directory that are no longer present in the original project configuration. This ensures the output remains synchronized with the current project setup.\n\nIncluding `anvil.lock` in the project's versioning is beneficial. It provides a clear history of file changes, especially important in team settings to maintain consistency and prevent conflicts in the project's files.\n\n## Templating Explained\n\nStructuresmith leverages Go's powerful templating system, allowing you to define dynamic content in your templates. This system provides a flexible way to insert values into your files, making your templates adaptable to different contexts.\n\n### How It Works\n\n- **Placeholders**: In your templates, you can use placeholders in the form `{{ .VariableName }}` to insert values dynamically. These placeholders will be replaced with actual values when the template is processed.\n- **YAML Configuration**: Define the values for these placeholders in the YAML configuration under the `values` key for each template group or individual file.\n- **Example**: If your template contains `{{ .Author }}`, you can specify the author's name in the YAML configuration, and it will be replaced in the generated file.\n\n### Go Templating Syntax\n\n- Structuresmith uses Go's `text/template` package syntax. This includes conditional statements, range loops, and more, providing a rich set of features for creating complex templates.\n- For detailed information on Go's templating syntax, visit the official documentation: [Go's text/template package](https://golang.org/pkg/text/template/)\n\n## Contributing \u0026 License\n\nWe welcome and value your contributions to this project! 👍 If you're interested in making improvements or adding features, please refer to our [Contributing Guide](https://github.com/cbrgm/semver-bump-action/blob/main/CONTRIBUTING.md). This guide provides comprehensive instructions on how to submit changes, set up your development environment, and more.\n\nPlease note that this project is developed in my spare time and is available for free 🕒💻. As an open-source initiative, it is governed by the [Apache 2.0 License](https://github.com/cbrgm/semver-bump-action/blob/main/LICENSE). This license outlines your rights and obligations when using, modifying, and distributing this software.\n\nYour involvement, whether it's through code contributions, suggestions, or feedback, is crucial for the ongoing improvement and success of this project. Together, we can ensure it remains a useful and well-maintained resource for everyone 🌍.\n","funding_links":["https://ko-fi.com/chrisbargmann"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbrgm%2Fstructuresmith","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbrgm%2Fstructuresmith","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbrgm%2Fstructuresmith/lists"}