{"id":13487658,"url":"https://github.com/eggjs/egg-init","last_synced_at":"2025-10-28T15:58:31.041Z","repository":{"id":10741848,"uuid":"63147665","full_name":"eggjs/egg-init","owner":"eggjs","description":"Init egg app helper tools","archived":false,"fork":false,"pushed_at":"2024-05-22T17:17:36.000Z","size":145,"stargazers_count":153,"open_issues_count":2,"forks_count":41,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-10-29T21:05:53.473Z","etag":null,"topics":["boilerplate","egg","egg-boilerplate"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/eggjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-07-12T10:04:56.000Z","updated_at":"2024-07-12T07:45:29.000Z","dependencies_parsed_at":"2023-02-10T10:45:52.121Z","dependency_job_id":"a726a85f-2b84-4f23-b81d-164b7bf8dc2f","html_url":"https://github.com/eggjs/egg-init","commit_stats":{"total_commits":92,"total_committers":24,"mean_commits":"3.8333333333333335","dds":"0.48913043478260865","last_synced_commit":"67480f492cdfd733200c242639fb7229b1f690e8"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Fegg-init","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Fegg-init/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Fegg-init/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Fegg-init/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eggjs","download_url":"https://codeload.github.com/eggjs/egg-init/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245294718,"owners_count":20591909,"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":["boilerplate","egg","egg-boilerplate"],"created_at":"2024-07-31T18:01:01.750Z","updated_at":"2025-10-28T15:58:25.996Z","avatar_url":"https://github.com/eggjs.png","language":"JavaScript","funding_links":[],"categories":["boilerplate","仓库"],"sub_categories":["插件"],"readme":"# egg-init\n\n[![NPM version][npm-image]][npm-url]\n[![Node.js CI](https://github.com/eggjs/egg-init/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/egg-init/actions/workflows/nodejs.yml)\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/egg-init.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/egg-init\n[codecov-image]: https://codecov.io/gh/eggjs/egg-init/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/eggjs/egg-init\n[download-image]: https://img.shields.io/npm/dm/egg-init.svg?style=flat-square\n[download-url]: https://npmjs.org/package/egg-init\n\nInit egg app helper tools.\n\n## Install\n\n```bash\nnpm i egg-init -g\negg-init -h\n```\n\n## Create a `simple` type application\n\n```bash\negg-init --type simple [dest]\n```\n\n## Or select a boilerplate by yourself\n\n```bash\n$ egg-init dest\n? Please select a boilerplate type (Use arrow keys)\n❯ simple - Simple egg app\n  plugin - egg plugin\n```\n\n## Command\n\n```bash\nUsage: egg-init [dir] --type=simple\n\nOptions:\n  --type          boilerplate type                                                [string]\n  --dir           target directory                                                [string]\n  --force, -f     force to override directory                                     [boolean]\n  --template      local path to boilerplate                                       [string]\n  --package       boilerplate package name                                        [string]\n  --registry, -r  npm registry, support china/npm/custom, default to auto detect  [string]\n  --silent        don't ask, just use default value                               [boolean]\n  --version       Show version number                                             [boolean]\n  -h, --help      Show help                                                       [boolean]\n```\n\n## Custom a boilerplate\n\nWe use npm package to manager boilerplate, you can follow this steps:\n\n- Create a new repo like [egg-boilerplate-plugin](https://github.com/eggjs/egg-boilerplate-plugin)\n- Put all files under `boilerplate` dir\n- Use `egg-init --template=PATH` to check\n- `index.js` can define variables which can be useed on template, like `{{name}}`, but `\\{{name}}` will ignore.\n\n```js\nmodule.exports = {\n  name: {\n    desc: 'package-name',\n  },\n  pluginName: {\n    desc: 'plugin-name',\n    default(vars) {\n      return vars.name;\n    },\n    filter(v) {\n      return 'egg-' + v;\n    },\n  },\n  description: {\n    desc: 'my best plugin',\n  },\n  author: {\n    desc: 'author',\n    default: 'eggjs team'\n  },\n};\n```\n\n- Write unit test, see `npm scripts` at [egg-boilerplate-simple](https://github.com/eggjs/egg-boilerplate-simple/blob/master/package.json#L5)\n- Add your package name to [egg-init-config](https://github.com/eggjs/egg-init-config)'s package.json `config.boilerplate` property\n- Publish your package to npm\n\n## License\n\n[MIT](LICENSE)\n\n\u003c!-- GITCONTRIBUTOR_START --\u003e\n\n## Contributors\n\n|[\u003cimg src=\"https://avatars.githubusercontent.com/u/227713?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003eatian25\u003c/b\u003e\u003c/sub\u003e](https://github.com/atian25)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/156269?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003efengmk2\u003c/b\u003e\u003c/sub\u003e](https://github.com/fengmk2)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/958063?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003ethonatos\u003c/b\u003e\u003c/sub\u003e](https://github.com/thonatos)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/985607?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003edead-horse\u003c/b\u003e\u003c/sub\u003e](https://github.com/dead-horse)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/360661?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003epopomore\u003c/b\u003e\u003c/sub\u003e](https://github.com/popomore)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/6897780?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003ekillagu\u003c/b\u003e\u003c/sub\u003e](https://github.com/killagu)\u003cbr/\u003e|\n| :---: | :---: | :---: | :---: | :---: | :---: |\n|[\u003cimg src=\"https://avatars.githubusercontent.com/u/5856440?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003ewhxaxes\u003c/b\u003e\u003c/sub\u003e](https://github.com/whxaxes)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/893152?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003ejtyjty99999\u003c/b\u003e\u003c/sub\u003e](https://github.com/jtyjty99999)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/238841?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003eedokeh\u003c/b\u003e\u003c/sub\u003e](https://github.com/edokeh)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/8369212?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003eDanielWLam\u003c/b\u003e\u003c/sub\u003e](https://github.com/DanielWLam)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/36876080?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003eJanlaywss\u003c/b\u003e\u003c/sub\u003e](https://github.com/Janlaywss)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/1078011?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003eRunrioter\u003c/b\u003e\u003c/sub\u003e](https://github.com/Runrioter)\u003cbr/\u003e|\n[\u003cimg src=\"https://avatars.githubusercontent.com/u/19733683?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003esnyk-bot\u003c/b\u003e\u003c/sub\u003e](https://github.com/snyk-bot)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/13726797?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003eWinjayYu\u003c/b\u003e\u003c/sub\u003e](https://github.com/WinjayYu)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/17093811?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003eShirasawaSama\u003c/b\u003e\u003c/sub\u003e](https://github.com/ShirasawaSama)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/26317926?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003esupperchong\u003c/b\u003e\u003c/sub\u003e](https://github.com/supperchong)\u003cbr/\u003e|[\u003cimg src=\"https://avatars.githubusercontent.com/u/19908330?v=4\" width=\"100px;\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003ehyj1991\u003c/b\u003e\u003c/sub\u003e](https://github.com/hyj1991)\u003cbr/\u003e\n\nThis project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat Nov 25 2023 23:06:04 GMT+0800`.\n\n\u003c!-- GITCONTRIBUTOR_END --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feggjs%2Fegg-init","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feggjs%2Fegg-init","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feggjs%2Fegg-init/lists"}