{"id":23778437,"url":"https://github.com/eggjs/scripts","last_synced_at":"2026-01-15T22:21:07.195Z","repository":{"id":17926270,"uuid":"81523858","full_name":"eggjs/scripts","owner":"eggjs","description":"deploy tool for egg projects","archived":false,"fork":false,"pushed_at":"2024-12-31T13:33:02.000Z","size":171,"stargazers_count":121,"open_issues_count":5,"forks_count":37,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-12-24T05:04:20.450Z","etag":null,"topics":["deployment","egg"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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":"2017-02-10T03:49:19.000Z","updated_at":"2025-10-06T07:43:13.000Z","dependencies_parsed_at":"2023-01-13T19:34:37.806Z","dependency_job_id":"b52c1e5e-1d76-415d-aab4-04ed91a30755","html_url":"https://github.com/eggjs/scripts","commit_stats":{"total_commits":85,"total_committers":18,"mean_commits":4.722222222222222,"dds":0.6352941176470588,"last_synced_commit":"74605f7e21525c94deded87a7f949801530bdf05"},"previous_names":["eggjs/scripts"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/eggjs/scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Fscripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Fscripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Fscripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Fscripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eggjs","download_url":"https://codeload.github.com/eggjs/scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggjs%2Fscripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28472626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T22:13:38.078Z","status":"ssl_error","status_checked_at":"2026-01-15T22:12:11.737Z","response_time":62,"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":["deployment","egg"],"created_at":"2025-01-01T09:01:23.904Z","updated_at":"2026-01-15T22:21:07.179Z","avatar_url":"https://github.com/eggjs.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# @eggjs/scripts\n\n[![NPM version][npm-image]][npm-url]\n[![Node.js CI](https://github.com/eggjs/scripts/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/scripts/actions/workflows/nodejs.yml)\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n[![Node.js Version](https://img.shields.io/node/v/@eggjs/scripts.svg?style=flat)](https://nodejs.org/en/download/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)\n\n[npm-image]: https://img.shields.io/npm/v/@eggjs/scripts.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@eggjs/scripts\n[codecov-image]: https://codecov.io/github/eggjs/scripts/coverage.svg?branch=master\n[codecov-url]: https://codecov.io/github/eggjs/scripts?branch=master\n[download-image]: https://img.shields.io/npm/dm/@eggjs/scripts.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@eggjs/scripts\n\ndeploy tool for egg project.\n\n**Note: Windows is partially supported, see [#22](https://github.com/eggjs/egg-scripts/pull/22)**\n\n## Install\n\n```bash\nnpm i @eggjs/scripts --save\n```\n\n## Usage\n\nAdd `eggctl` to `package.json` scripts:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"eggctl start --daemon\",\n    \"stop\": \"eggctl stop\"\n  }\n}\n```\n\nThen run as:\n\n- `npm start`\n- `npm stop`\n\n**Note:** `egg-scripts` is not recommended to install global, you should install and use it as npm scripts.\n\n## Command\n\n### start\n\nStart egg at prod mode.\n\n```bash\n$ eggctl start [options] [baseDir]\n\n# Usage\n# eggctl start --port=7001\n# eggctl start ./server\n```\n\n- **Arguments**\n  - `baseDir` - directory of application, default to `process.cwd()`.\n- **Options**\n  - `port` - listening port, default to `process.env.PORT`, if unset, egg will use `7001` as default.\n  - `title` - process title description, use for kill grep, default to `egg-server-${APP_NAME}`.\n  - `workers` - numbers of app workers, default to `process.env.EGG_WORKERS`, if unset, egg will use `os.cpus().length`  as default.\n  - `daemon` - whether run at background daemon mode, don't use it if in docker mode.\n  - `framework` - specify framework that can be absolute path or npm package, default to auto detect.\n  - `env` - server env, default to `process.env.EGG_SERVER_ENV`, recommended to keep empty then use framwork default env.\n  - `stdout` - customize stdout file, default to `$HOME/logs/master-stdout.log`.\n  - `stderr` - customize stderr file, default to `$HOME/logs/master-stderr.log`.\n  - `timeout` - the maximum timeout when app starts, default to 300s.\n  - `ignore-stderr` - whether ignore stderr when app starts.\n  - `sourcemap` / `typescript` / `ts` - provides source map support for stack traces.\n  - `node` - customize node command path, default will find node from $PATH\n\n### stop\n\nStop egg gracefull.\n\n**Note:** if exec without `--title`, it will kill all egg process.\n\n```bash\n$ eggctl stop [options]\n\n# Usage\n# eggctl stop --title=example\n```\n\n- **Options**\n  - `title` - process title description, use for kill grep.\n  - `timeout` - the maximum timeout when app stop, default to 5s.\n\n## Options in `package.json`\n\nIn addition to the command line specification, options can also be specified in `package.json`. However, the command line designation takes precedence.\n\n```js\n{\n  \"eggScriptsConfig\": {\n    \"port\": 1234,\n    \"ignore-stderr\": true,\n    // will pass as `node --max-http-header-size=20000`\n    \"node-options--max-http-header-size\": \"20000\",\n    // will pass as `node --allow-wasi`\n    \"node-options--allow-wasi\": true\n  }\n}\n```\n\n## Questions \u0026 Suggestions\n\nPlease open an issue [here](https://github.com/eggjs/egg/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc).\n\n## License\n\n[MIT](LICENSE)\n\n## Contributors\n\n[![Contributors](https://contrib.rocks/image?repo=eggjs/scripts)](https://github.com/eggjs/scripts/graphs/contributors)\n\nMade with [contributors-img](https://contrib.rocks).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feggjs%2Fscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feggjs%2Fscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feggjs%2Fscripts/lists"}