{"id":13707078,"url":"https://github.com/tomakado/projector","last_synced_at":"2026-01-14T19:10:21.085Z","repository":{"id":43702709,"uuid":"458926390","full_name":"tomakado/projector","owner":"tomakado","description":"A flexible, language and framework agnostic tool that allows you to generate projects from templates.","archived":true,"fork":false,"pushed_at":"2022-07-19T09:01:18.000Z","size":108,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T23:37:43.977Z","etag":null,"topics":["cli","cli-app","golang-application","golang-cli","golang-tools","project-generator","project-template"],"latest_commit_sha":null,"homepage":"","language":"Go","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/tomakado.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":"2022-02-13T20:42:30.000Z","updated_at":"2024-03-06T12:38:55.000Z","dependencies_parsed_at":"2022-08-22T04:00:33.336Z","dependency_job_id":null,"html_url":"https://github.com/tomakado/projector","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tomakado/projector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomakado%2Fprojector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomakado%2Fprojector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomakado%2Fprojector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomakado%2Fprojector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomakado","download_url":"https://codeload.github.com/tomakado/projector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomakado%2Fprojector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28431591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["cli","cli-app","golang-application","golang-cli","golang-tools","project-generator","project-template"],"created_at":"2024-08-02T22:01:18.004Z","updated_at":"2026-01-14T19:10:21.062Z","avatar_url":"https://github.com/tomakado.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\n\n\u003cimg src=\"doc/logo.png\" align=\"right\" /\u003e \n\nA flexible, language and framework agnostic tool that allows you to generate projects from templates. \nProjector has some builtin templates, but you also can use your custom templates.\n\nCurrently Projector is in active development stage, therefore breaking changes may occur.\n\n* Single binary, no extra dependencies\n* Builtin templates that allow you to start quickly\n* Simple template manifest format\n* Custom templates\n* Optional steps for flexibility\n---\n\u003cdiv align=\"center\"\u003e\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/tomakado/projector.svg)](https://pkg.go.dev/github.com/tomakado/projector)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tomakado/projector)](https://goreportcard.com/report/github.com/tomakado/projector)\n[![Coverage Status](https://coveralls.io/repos/github/tomakado/projector/badge.svg?branch=master)](https://coveralls.io/github/tomakado/projector?branch=master)\n![License](https://img.shields.io/badge/license-MIT-green)\n\n\u003c/div\u003e\n\n# Installation\n\nThere are two ways to get Projector right now:\n\n1. Get binary for your platform on [Releases page](https://github.com/tomakado/projector/releases)\n2. Build Projector from source:\n`go install github.com/tomakado/projector`\n\n# Usage\n\nGet general usage help with `-h` or `--help` flags:\n```\n❯ projector -h\nA flexible, language and framework agnostic tool that allows you to generate projects from templates.\nProjector has some builtin templates, but you can use your custom templates or import third-party templates\nfrom GitHub.\n\nUsage:\n  projector [command]\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  create      Create project using specified template\n  help        Help about any command\n  info        Show meta information about template\n  init        Create template manifest in current directory (like `create projector` command)\n  list        List builtin and cached templates\n  validate    Validate manifest without performing actions (dry run)\n  version     Display projector version\n\nFlags:\n  -h, --help      help for projector\n  -v, --verbose   turn verbose mode on\n\nUse \"projector [command] --help\" for more information about a command.\n```\n\n## Create project\nCreate project with `create` command:\n```\nprojector create go/hello-world --author \"tomakado \u003chi@ildarkarymov.ru\u003e\" \u0026\u0026 \\\n\t\t\t\t\t\t\t\t--name \"my-awesome-app\" \u0026\u0026 \\\n\t\t\t\t\t\t\t\t--package \"github.com/tomakado/go-helloworld\" \u0026\u0026 \\\n\t\t\t\t\t\t\t    ./hello-world/\n```\nwhere `go/hello-world` is template you want to use. You also can use custom manifest file by passing it with `--manifest` or `-m` flags.\n\n## Optional steps\nTemplate may have optional steps omitted by default. Use `-i` or `--i` flags to include them:\n```\nprojector create go/hello-world --author \"tomakado \u003chi@ildarkarymov.ru\u003e\" \u0026\u0026 \\\n\t\t\t\t\t\t\t\t--name \"my-awesome-app\" \u0026\u0026 \\\n\t\t\t\t\t\t\t\t--package \"github.com/tomakado/go-helloworld\" \u0026\u0026 \\\n\t\t\t\t\t\t\t\t--include=makefile,dockerfile\n\t\t\t\t\t\t\t    ./hello-world/\n```\n\nUse `--all` flag to include all optional steps:\n```\nprojector create go/hello-world --author \"tomakado \u003chi@ildarkarymov.ru\u003e\" \u0026\u0026 \\\n\t\t\t\t\t\t\t\t--name \"my-awesome-app\" \u0026\u0026 \\\n\t\t\t\t\t\t\t\t--package \"github.com/tomakado/go-helloworld\" \u0026\u0026 \\\n\t\t\t\t\t\t\t\t--all\n\t\t\t\t\t\t\t    ./hello-world/\n```\n\n## Listing available templates\nList all available locally templates with `projector list`:\n```\n❯ projector list\ngo/hello-world\ngo/http\n```\n\n## Getting info about template\nGet a bit more info about concrete template with `projector info [template]`:\n```\n❯ projector info go/hello-world\ngo/hello-world@1.0.0 by tomakado\nURL: https://github.com/tomakado/projector\nDescription: Basic program to get started with Go\n```\n\n## Template validation\nValidate custom manifest file with `projector validate --manifest=[path-to-custom-manifest-file]`:\n```\n❯ projector validate -m projector.toml\nManifest is valid ✅\n```\n\n## Template debugging\nDebug your template with `--verbose` flag:\n```\n❯ projector create go/hello-world -a \"tomakado \u003chi@ildarkarymov.ru\u003e\" -n \"my-awesome-app\" -p \"github.com/tomakado/go-helloworld\" ./hello-world --verbose\n2022/02/19 18:22:32 verbose mode is turned on\n2022/02/19 18:22:32 using manifest name \"go/hello-world\" in embed fs\n2022/02/19 18:22:32 initialized embedded fs provider\n2022/02/19 18:22:32 working directory = \"./hello-world\"\n2022/02/19 18:22:32 loading manifest \"go/hello-world/projector.toml\"\n2022/02/19 18:22:32 [EmbedFSProvider] reading \"go/hello-world/projector.toml\" in \"resources/templates/\"\n2022/02/19 18:22:32 parsing manifest\n2022/02/19 18:22:32 validating manifest\n2022/02/19 18:22:32 passing config and provider to new instance of *projector.Generator\n2022/02/19 18:22:32 provider = *manifest.EmbedFSProvider, config = {WorkingDirectory:./hello-world ProjectAuthor:tomakado \u003chi@ildarkarymov.ru\u003e ProjectName:my-awesome-app ProjectPackage:github.com/tomakado/go-helloworld Manifest:0xc0002a5960 ManifestPath:go/hello-world}\n2022/02/19 18:22:32 initializing working directory \"./hello-world\"\n2022/02/19 18:22:32 cd ./hello-world\n2022/02/19 18:22:32 traversing manifest steps\n2022/02/19 18:22:32 step \"init go module and git repository\", 1 of 2\n2022/02/19 18:22:32 processing files\n2022/02/19 18:22:32 extracting file template from \"gitignore\"\n2022/02/19 18:22:32 [EmbedFSProvider] reading \"go/hello-world/gitignore\" in \"resources/templates/\"\n2022/02/19 18:22:32 parsing file template\n2022/02/19 18:22:32 rendering file\n2022/02/19 18:22:32 saving rendered file to \".gitignore\"\n2022/02/19 18:22:32 parsing output path template \".gitignore\"\n2022/02/19 18:22:32 rendering output path template \".gitignore\"\n2022/02/19 18:22:32 mkdir .\n2022/02/19 18:22:32 writing rendered file to \".gitignore\"\n2022/02/19 18:22:32 parsing shell script template \"go mod init {{ .ProjectPackage }} \u0026\u0026 git init\"\n2022/02/19 18:22:32 rendering shell script\n2022/02/19 18:22:32 executing shell script \"go mod init github.com/tomakado/go-helloworld \u0026\u0026 git init\"\n2022/02/19 18:22:32 step \"create project bootstrap\", 2 of 2\n2022/02/19 18:22:32 processing files\n2022/02/19 18:22:32 extracting file template from \"main.go.tpl\"\n2022/02/19 18:22:32 [EmbedFSProvider] reading \"go/hello-world/main.go.tpl\" in \"resources/templates/\"\n2022/02/19 18:22:32 parsing file template\n2022/02/19 18:22:32 rendering file\n2022/02/19 18:22:32 saving rendered file to \"main.go\"\n2022/02/19 18:22:32 parsing output path template \"main.go\"\n2022/02/19 18:22:32 rendering output path template \"main.go\"\n2022/02/19 18:22:32 mkdir .\n2022/02/19 18:22:32 writing rendered file to \"main.go\"\n```\n\n## Сustom template\n\nYou can just create file with name `projector.toml` and start filling, but Projector has template for... templates:\n```\nprojector create projector --name=\"projector-demo\" ./projector-demo\n```\n\nthat generates file with following content:\n```toml\nname=\"projector-demo\"\nauthor=\"tomakado\"\nversion=\"snapshot\"\nurl=\"https://github.com/tomakado/projector-demo\"\ndescription=\"Enter your template description here\"\n\n[[steps]]\nname=\"hello world\"\nshell=\"echo \\\"hello, world!\\\"\"\n```\n\nAlso there is shortcut for it (you have to be inside target directory):\n```\nprojector init\n```\n\n## Manifest\n\nManifest is a file that describes how Projector should act to generate project. Projector uses [TOML](https://toml.io) format to store manifest on disk.\n\nExample:\n```toml\nname=\"go/hello-world\"\nauthor=\"tomakado\"\nversion=\"1.0.0\"\nurl=\"https://github.com/tomakado/projector\"\ndescription=\"Basic program to get started with Go\"\n\n[[steps]]\nname=\"init go module and git repository\"\nshell=\"go mod init {{ .ProjectPackage }} \u0026\u0026 git init\"\n\t[[steps.files]]\n\tpath=\"gitignore\"\n\toutput=\".gitignore\"\n\t\n[[steps]]\nname=\"create project bootstrap\"\n\t[[steps.files]]\n\tpath=\"main.go.tpl\"\n\toutput=\"main.go\"\n```\n\nThe first, top-level section containing fields `name`, `author`, `version`, `url`, `description` is about meta information. Then manifest must contain at least one _step._ Step must have name and either list of files to generate or shell script to execute.\n\n### Reference\n\n#### Manifest\n| Field     | Description                                                                        |\n| --------- | ---------------------------------------------------------------------------------- |\n| `name`    | Name of template. Required.                                                        |\n| `author`  | Author of template. Required.                                                      |\n| `version` | Version of template. Required.                                                     |\n| `url`     | URL of repository or website of template. Optional.                                |\n| `steps`   | Array of steps. See [`step`](#step) for more info. Required at least one step. |\n\n#### `step`\n_Step_ is self-sufficient action performed by Projector to generate project. Projector “executes” steps sequentially, one by one. Inside `shell` field `text/template` syntax is supported, so you can use values exposed to [Template Context](#template-context) inside shell script.\n\n| Field      | Description                                                                                                                                   |\n| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| `name`     | Name of step. Required.                                                                                                                       |\n| `optional` | Defines if step is optional. If `true` step will be omitted if not included via `-i` flag. Optional. Default: `false`.                        |\n| `files`    | Array of files to generate. See [`file`](#file) for more info. Required if `shell` is not set.                                                |\n| `shell`    | Shell script to execute. `text/template` supported (see [Template Context](#template-context) for more info). Required if `files` is not set. |\n\n#### `file`\n_File_ in terms of Projector manifest is something like task of following kind:\n\n1. Take file located at `path`;\n2. Render file content as template with [Template Context](#template-context);\n3. Render output path using `output` value;\n4. Put rendered file to rendered `output` path.  \n\n| Field    | Description                                                                                                                    |\n| -------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| `path`   | Path to source file. `text/template` supported in content (see [Template Context](#template-context) for more info). Required. |\n| `output` | Template of output path for rendered file. See [Template Context](#template-context) for more info. Required.                  |\n\n#### Template Context\n| Field              | Description                                                                             |\n| ------------------ | --------------------------------------------------------------------------------------- |\n| `WorkingDirectory` | Current working directory. Usually folder where project is being generated.             |\n| `ProjectAuthor`    | Author of project.                                                                      |\n| `ProjectName`      | Name of project.                                                                        |\n| `ProjectPackage`   | Package name for project. E.g. in Go it would something like `github.com/owner/module`. |\n| `Manifest`         | Reference to manifest. See [Manifest](#manifest) for info.                              |\n| `OptionalSteps`    | Slice of optional step names.                                                           |\n\n# Backlog\n\nThere are some features I'd like to implement in Projector:\n\n- [ ] Use multiple templates to generate single project (e.g., for having separate templates for Dockerfile, frontend, “service” level, etc.)\n- [ ] Nice animated output of current step\n- [ ] User-friendly error messages\n- [ ] Import third-party templates from GitHub\n- [ ] Custom options in template context\n- [ ] Import third-party templates from any public or private git repository\n- [ ] Template caching\n- [ ] List local third-party cached templates\n- [ ] Support for file masks on input files declaration\n\n# Contribution\n\nIf you want to help to develop Projector, the're several options:\n\n* [Create issue](https://github.com/tomakado/projector/issues/new/choose) with problem you've met or any other kind\n* Submit PRs with bug fixes or new features, especially from backlog :wink:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomakado%2Fprojector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomakado%2Fprojector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomakado%2Fprojector/lists"}