{"id":36540473,"url":"https://github.com/lubjs/lub","last_synced_at":"2026-01-12T05:45:31.318Z","repository":{"id":57290832,"uuid":"218218593","full_name":"lubjs/lub","owner":"lubjs","description":"Frontend engineering tool - helpful to develop command and boilerplate.","archived":false,"fork":false,"pushed_at":"2019-12-11T06:16:56.000Z","size":1090,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-08T16:02:47.729Z","etag":null,"topics":["boilerplate","cli","command","frontend-engineering"],"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/lubjs.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":"2019-10-29T06:26:56.000Z","updated_at":"2024-01-09T05:04:39.000Z","dependencies_parsed_at":"2022-09-01T15:14:21.947Z","dependency_job_id":null,"html_url":"https://github.com/lubjs/lub","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/lubjs/lub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubjs%2Flub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubjs%2Flub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubjs%2Flub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubjs%2Flub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lubjs","download_url":"https://codeload.github.com/lubjs/lub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lubjs%2Flub/sbom","scorecard":{"id":601614,"data":{"date":"2025-08-11","repo":{"name":"github.com/lubjs/lub","commit":"2f70dc93341fe280d5a9b75b4f9f103bdd108534"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 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":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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: MIT License: 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":-1,"reason":"no releases found","details":null,"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 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-21T00:35:10.622Z","repository_id":57290832,"created_at":"2025-08-21T00:35:10.622Z","updated_at":"2025-08-21T00:35:10.622Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28335226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"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":["boilerplate","cli","command","frontend-engineering"],"created_at":"2026-01-12T05:45:30.546Z","updated_at":"2026-01-12T05:45:31.313Z","avatar_url":"https://github.com/lubjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lub\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url] \n[![Test coverage][codecov-image]][codecov-url] \n[![npm download][download-image]][download-url]\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n\n[npm-image]: https://img.shields.io/npm/v/lub.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/lub\n[travis-image]: https://img.shields.io/travis/lubjs/lub.svg?style=flat-square\n[travis-url]: https://travis-ci.org/lubjs/lub\n[codecov-image]: https://codecov.io/gh/lubjs/lub/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/lubjs/lub\n[download-image]: https://img.shields.io/npm/dm/lub.svg?style=flat-square\n[download-url]: https://npmjs.org/package/lub\n\n---\n\n## Origin of the name\n\nThe name of `lubjs` comes from [Lu Ban](https://en.wikipedia.org/wiki/Lu_Ban), a Chinese structural engineer, inventor, and carpenter during the Zhou Dynasty, also revered as the Chinese god (patron) of builders and contractors.\n\n## Features\n- **simple config , out of the box** - by creating `.lubrc`, `.lubrc.json` or `.lubrc.js` in your project and declare plugins, you can use others' cli command as well as boilerplate\n- **OO Design, develop your own plugin quickly** - Define your command class by appointment and export it, you just make it.\n- **abundant async/async function utils** - `lubjs` provides you with many [useful utils](https://github.com/lubjs/lub/tree/master/packages/lub-api) which you can use when developing your plugins.\n- **integratable and extendable** - by declare multiple plugins you just integrate these commands if these plugins alse requires other plugins in config file, the project also own them.\n- **support promise (async/await) and generator**\n\n## Install\n\n```bash\nnpm install lub --save\n\n# use:\nnpx lub \u003csubcommand\u003e\n```\n\nor\n\n```bash\nnpm install lub -g\n\n# use: \nlub \u003csubcommand\u003e\n```\n\n## Usage\n\n### Config\n\nThe order `lubjs` read from your project is: `.lubrc.js` \u003e `.lubrc.json` \u003e `.lubrc`\n\nA typical `lubrc` config looks like this:\n\n```javascript\n// .lubrc or .lubrc.json\n{\n  \"plugins\": [\n    \"lub-plugin-publish\" // plugin - npm package name\n  ],\n  \"lub-plugin-publish\":{ // config will passed to plugin\n    \"foo\": \"bar\"\n  },\n  // it will change lub-plugin-publish plugin's subcommand `dev` to `bar-dev`\n  // in case of two plugins have the same subcommand name\n  // after set alias just use `lub bar-dev`\n  \"alias\": {\n    \"lub-plugin-bar\": {\n      \"dev\": \"bar-dev\"\n    }\n  },\n  // if you want do some tasks before or after some subcommand, you can define your tasks\n  \"task\": {\n    // `publish` subcommand from `lub-plugin-publish` plugin,\n    \"publish\": [\n      {\n        \"command\": \"sh ./scripts/deploy.sh\", // the command to exec\n        \"order\": \"after\", // exec the command after `lub publish`\n        \"async\": true  // exec the command asyncly\n      }\n    ]\n  }\n}\n```\n\nYou can also export your config in `.lubrc.js`.\n\n```javascript\n// .lubrc.js\nmodule.exports = {\n  \"plugins\": [\n    \"lub-plugin-publish\" // plugin - npm package name\n  ],\n  \"lub-plugin-publish\":{ // config will passed to plugin\n    \"foo\": \"bar\"\n  },\n  // it will change lub-plugin-publish plugin's subcommand `dev` to `bar-dev`\n  // in case of two plugins have the same subcommand name\n  // after set alias just use `lub bar-dev`\n  \"alias\": {\n    \"lub-plugin-bar\": {\n      \"dev\": \"bar-dev\"\n    }\n  },\n  // if you want do some tasks before or after some subcommand, you can define your tasks\n  \"task\": {\n    // `publish` subcommand from `lub-plugin-publish` plugin,\n    \"publish\": [\n      {\n        \"command\": \"sh ./scripts/deploy.sh\", // the command to exec\n        \"order\": \"after\", // exec the command after `lub publish`\n        \"async\": true  // exec the command asyncly\n      }\n    ]\n  }\n}\n```\n\n### `lub init \u003cpluginName\u003e`\n\nWhen in a empty project, it's quit useful to exec `lub init \u003cpluginName\u003e`.\nIt will:\n1. run `npm install \u003cpluginName\u003e --save-dev` install the plugin\n2. exec the init command of that plugin\n\n**Also supports extra optional argvs**\n- --client, -c: replace npm client with yours like: tnpm, yarn, cnpm\n  - default: 'npm'\n- --registry, -r: replace the npm registry\n  - default: 'https://registry.npmjs.org'\n\n### --version / --help\n\nWant to know the version of `lubjs`? `lub -v`\n\n```bash\n0.1.3\n```\n\nWant to know plugin subcommand's version like `publish`? `lub publish -v`\n\n\u003e Notice: If subcommand doesn't set its version ,  lub will use `lub-core` version.\n\nWant to know current project supports what subcomands？ just use `lub -h` `lub --help`.\n\n```bash\nUsage: lub \u003csubCommand\u003e\n\nCommands:\n  lub publish  Generate changelog, publish to npm and push to git\n\nGlobal Options:\n  -h, --help     Show help                                            [boolean]\n  -v, --version  Show version number                                  [boolean]\n```\n\nWant to know the usage of `lub publish`? try `lub publish -h`.\n```bash\nUsage: lub publish [major | minor | patch | version]\n\nGlobal Options:\n  -h, --help     Show help                                                                                     [boolean]\n  -v, --version  Show version number                                                                           [boolean]\n\nOptions:\n  --registry, -r  set npm's registry                       [string] [default: \"https://registry.npmjs.org\"]\n  --filename, -f  changelog file name                      [string] [default: \"CHANGELOG\"]\n  --client, -c    npm client                               [string] [default: \"npm\"]\n  --npm, -n       whether to publish to npm                [boolean] [default: true]\n```\n\n### Exec subcommand\n\nAfter list subcommands by `lub -h`, use `lub \u003csubCommand\u003e` to exec subcommands\n\n\u003e Notice: If tasks are defined in config file, they will also be executed.\n\n## How to develop my own plugin? \n\nBenefit from `lub-command` package's [OO Design Pattern](https://en.wikipedia.org/wiki/Object-oriented_design), it's quite simple and quick to develop your own plugin and subcommands, see [here](https://github.com/lubjs/lub/tree/master/packages/lub-command).\n\nAnd a real world example: [lub-plugin-publish](https://github.com/lubjs/lub-plugin-publish)\n\n## PR Welcome\n\nIf your have some wondeful plugins and utils, pull requests are welcomed in this [github group](https://github.com/lubjs).\n\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flubjs%2Flub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flubjs%2Flub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flubjs%2Flub/lists"}