{"id":37040271,"url":"https://github.com/personball/vz-generator","last_synced_at":"2026-01-14T04:46:27.396Z","repository":{"id":182733988,"uuid":"669020019","full_name":"personball/vz-generator","owner":"personball","description":"A CLI Tool for File / Code Generation with templates in any language any scenario. ","archived":false,"fork":false,"pushed_at":"2025-09-09T03:36:34.000Z","size":298,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T01:07:29.299Z","etag":null,"topics":["code-generator","file-generator","scaffold","template-generator"],"latest_commit_sha":null,"homepage":"","language":"C#","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/personball.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-21T06:45:15.000Z","updated_at":"2025-09-09T03:36:38.000Z","dependencies_parsed_at":"2025-09-09T05:25:19.556Z","dependency_job_id":"70ff876d-d5a7-4278-9be5-d216d28764ea","html_url":"https://github.com/personball/vz-generator","commit_stats":null,"previous_names":["personball/vz-generator"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/personball/vz-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personball%2Fvz-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personball%2Fvz-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personball%2Fvz-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personball%2Fvz-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/personball","download_url":"https://codeload.github.com/personball/vz-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/personball%2Fvz-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28409852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["code-generator","file-generator","scaffold","template-generator"],"created_at":"2026-01-14T04:46:26.739Z","updated_at":"2026-01-14T04:46:27.390Z","avatar_url":"https://github.com/personball.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vz-generator\n\nCommand Line Tool (CLI) for generate files.  \n\n[![NuGet version](https://badge.fury.io/nu/vz-generator.svg)](https://badge.fury.io/nu/vz-generator)\n\nThis command is built following [dotnet core global tools](https://docs.microsoft.com/zh-cn/dotnet/core/tools/global-tools).  \n\n[中文版readme](README_zh.md)\n\n## Install\n\n```bash\ndotnet tool install -g vz-generator\n```\n\n## Usage\n\n### init to load settings and sample templates\n\n```bash\nvz init \n```\n\nsample names:\n\n```bash\nvz init --list-samples\n```\n\nonly load specific sample:\n\n```bash\nvz init --with-sample abp --with-sample vue.pinia\n```\n\nAfter init, please see options in `.vz/generate.settings.json`\n\n### Template Syntax\n\nThe basic liquid syntax and builtin functions follow [Scriban](https://github.com/scriban/scriban/blob/master/doc/builtins.md#string-functions).\n\n\u003e **Notice**  \n\u003e\n\u003e As name of paths or files not allowed the char '|', so by convention, we use '___' instead of '|'.\n\n#### Extended naming functions\n\n```liquid\n{{'nameIt'|pascal_case}} =\u003e  NameIt \n{{'NameIt'|camel_case}}  =\u003e  nameIt \n{{'NameIt'|kebab_case}}  =\u003e  name-it \n{{'NameIt'|snake_case}}  =\u003e  name_it \n{{'person'|pluralize}}   =\u003e  people \n{{'people'|singularize}} =\u003e  person \n```\n\n### Generate any files with subpaths as you want\n\n```bash\nvz g\n```\n\nBy default, g(generate) subcommand will ask what option you want to run.\n\nYou also can use `-p \u003cyour option in .vz/generate.settings.json\u003e` to provide answer\n\n```bash\nvz g -p 'Create Abp'\n```\n\nIt will continue to ask you for some other setting which not store in `.vz/generate.settings.json`, such as the value of the variables. Also, can be provided as below:\n\n```bash\nvz g -p 'Create Abp' --var project=MyCompany.MyProject --var entity=User\n```\n\n### vscode setup\n\n`vz init` will create `.vscode/settings.json` to associate `.vz/generate.settings.schema.json` with `.vz/generate.settings.json`. if `.vscode/settings.json` is already exists, it will not override it, and you should update the file yourself with the content it will show you.\n\n### Just do what you want\n\nBe FREE to modify the file `.vz/generate.settings.json`, `vz g` will search the templates as you specified, load variables as you declared, and output the generated files to where you specified.\n\nEven `vz g -c \u003cfile path to your own settings.json\u003e` can override the default path to `generate.settings.json`, but the content of it should match the schema as `.vz/generate.settings.schema.json` stored.\n\nFollow the Usage `vz g -h`.\n\n## Contribute\n\nBe FREE to submit (PRs) your own templates as default samples (for any languages any scenarios) which may helpful to others.\n\n### Setup Git Hook to format commit msg\n\nAuto tag and generate changelog.md by `commit-and-tag-version`\n[conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary)\n\n```bash\n ./set-git-hook.sh\nnpm i -g commit-and-tag-version # https://github.com/absolute-version/commit-and-tag-version#bumpfiles-packagefiles-and-updaters\ncommit-and-tag-version # --frist-release\n```\n\n### Develop on MacOS\n\nIDE: VS Code\n\nDEBUG mode will use `.vzx` instead of `.vz`\n\n- For DEBUG SubCommand `init`:\n  - should check `\"args\"` in `.vscode/launch.json`\n  - should check `dependsOn` of `build` task in `.vscode/tasks.json`, before build should run `clean .vzx` and `zip samples`\n- For DEBUG SubCommand `g`:\n  - should check `\"args\"` in `.vscode/launch.json`, and strings in it will treated as tokens (whitespace will not parsed).\n  - should commented out the line `dependsOn` of `build` task in `.vscode/tasks.json`\n\nAll things work well.\n\n### Develop on windows\n\nIDE: VS Code\n\nDEBUG mode will use `.vzx` instead of `.vz`\n\n- For DEBUG SubCommand `init`:\n  - should check `\"args\"` in `.vscode/launch.json`\n  - should check `dependsOn` of `build` task in `.vscode/tasks.json`, before build should run `clean .vzx` and `zip samples`\n  - the commands in task `clean .vzx` should be change to powershell `Remove-Item` or sth works in the specific shell.\n  - the commands in task `zip samples` should be change to powershell `Compress-Archive` or sth works in the specific shell.\n- For DEBUG SubCommand `g`:\n  - should check `\"args\"` in `.vscode/launch.json`, and strings in it will treated as tokens (whitespace will not parsed).\n  - should commented out the line `dependsOn` of `build` task in `.vscode/tasks.json`\n\n`resgen` maybe problem on windows when develop with pure dotnet core with vs code, but visual studio should work (not confirm).\n\n### Template Development\n\nthe `-w` option of subommand `g`, will watch the folder which template files belong to, and regenerate the output in time. It facilitates the development of templates.\n\n```bash\nvz g -w \n```\n\nIt will not watch the setting file, or ask you for any options or inputs again (only watch templates).  \nIn `watch` mode, output always override exists files.\n\n## Renamer\n\n`vz rn` subcommand can replace key/value in file content or file name or directory name.  \n\n``` bash\n vz rn ProjectName/ -r ProjectName=Demo -r CompanyName=Company # more options try: vz rn -h\n```\n\n## MIT\n\n## References\n\n- UseCases like [codeBelt/generate-template-files](https://github.com/codeBelt/generate-template-files), but here we got Liquid syntax for template files and paths.\n\n- Liquid [scriban](https://github.com/scriban/scriban)\n\n- [shibayan/Sharprompt](https://github.com/shibayan/Sharprompt)\n\n- [rvegajr/Pluralize.NET.Core](https://github.com/rvegajr/Pluralize.NET.Core)\n\n- Naming [jquense/StringUtils](https://github.com/jquense/StringUtils)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersonball%2Fvz-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpersonball%2Fvz-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpersonball%2Fvz-generator/lists"}