{"id":26859615,"url":"https://github.com/charlesxsh/nestjs-eclih","last_synced_at":"2026-04-29T18:32:43.075Z","repository":{"id":57310122,"uuid":"341401635","full_name":"charlesxsh/nestjs-eclih","owner":"charlesxsh","description":"Commander.js with Nestjs Support","archived":false,"fork":false,"pushed_at":"2022-07-16T02:42:15.000Z","size":1835,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T04:54:19.215Z","etag":null,"topics":["commanderjs","nestjs"],"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/charlesxsh.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":"2021-02-23T02:22:33.000Z","updated_at":"2022-07-16T02:42:18.000Z","dependencies_parsed_at":"2022-09-03T12:23:00.865Z","dependency_job_id":null,"html_url":"https://github.com/charlesxsh/nestjs-eclih","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/charlesxsh/nestjs-eclih","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesxsh%2Fnestjs-eclih","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesxsh%2Fnestjs-eclih/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesxsh%2Fnestjs-eclih/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesxsh%2Fnestjs-eclih/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charlesxsh","download_url":"https://codeload.github.com/charlesxsh/nestjs-eclih/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charlesxsh%2Fnestjs-eclih/sbom","scorecard":{"id":274356,"data":{"date":"2025-08-11","repo":{"name":"github.com/charlesxsh/nestjs-eclih","commit":"4b3b361ec35b85fdb789618e5f0e7afb9098f754"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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":"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":"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":"Vulnerabilities","score":0,"reason":"21 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-cj7v-w2c7-cp7c","Warn: Project is vulnerable to: GHSA-4jpv-8r57-pv7j","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-h452-7996-h45h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T14:06:17.154Z","repository_id":57310122,"created_at":"2025-08-17T14:06:17.154Z","updated_at":"2025-08-17T14:06:17.154Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["commanderjs","nestjs"],"created_at":"2025-03-31T01:21:03.954Z","updated_at":"2026-04-29T18:32:43.045Z","avatar_url":"https://github.com/charlesxsh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"- [Nestjs Elegant Command Line Interface Hammer](#nestjs-elegant-command-line-interface-hammer)\n  - [Commander.js](#commanderjs)\n  - [Features](#features)\n    - [Full support of Commander.js](#full-support-of-commanderjs)\n    - [Partial Command Definition](#partial-command-definition)\n    - [Command of Command](#command-of-command)\n  - [Example](#example)\n  - [Tutorial](#tutorial)\n    - [@CommandProvider](#commandprovider)\n      - [Examples](#examples)\n    - [@Command](#command)\n      - [Examples](#examples-1)\n    - [CommandConfig](#commandconfig)\n    - [OptionConfig](#optionconfig)\n\n# Nestjs Elegant Command Line Interface Hammer\n[![NPM Version](http://img.shields.io/npm/v/nestjs-eclih.svg?style=flat)](https://www.npmjs.org/package/nestjs-eclih)\n[![NPM Downloads](https://img.shields.io/npm/dm/nestjs-eclih.svg?style=flat)](https://npmcharts.com/compare/nestjs-eclih?minimal=true)\n[![NPM License](https://img.shields.io/npm/l/all-contributors.svg?style=flat)](https://github.com/charlesxsh/nestjs-eclih/blob/master/LICENSE)\n\n\nnestjs-eclih aims to provide the tools to build powerful CLI with simple(only two) decorators.\nNestjs provides the powerful dependency injection system. Commander provides the flexible and concrete CLI tools. nestjs-commander combines their advantanges together!\n\n## Commander.js\nnestjs-eclih utilized [commander.js](https://github.com/tj/commander.js) as CLI driver. All grammers of command and option are excatly same.\n\n## Features\n\n### Full support of Commander.js\nSee [examples/hello.ts](./examples/hello.ts)\n\n\n### Partial Command Definition \nSee [examples/provider-of-provider](./examples/command-partial-define.ts)\n\n### Command of Command\nSee [examples/provider-of-provider](./examples/provider-of-provider.ts)\n\n## Example\n\nCreate a typescript file hello.ts with following:\n```ts\nimport { Module } from \"@nestjs/common\";\nimport { CommandProvider, Command, CommanderModule, bootstrapCli } from \"nestjs-eclih\";\n\n@CommandProvider()\nclass HelloProvider {\n\n    @Command({\n      options: [\n        { nameAndArgs: \"-n, --name \u003cname\u003e\" }\n      ]\n    })\n    hello(options){\n        console.log(\"hello\", options.name);\n    }\n}\n\n@Module({\n    imports: [\n        CommanderModule\n    ],\n    providers:[\n        HelloProvider\n    ]\n})\nexport class AppModule {}\n\n\nbootstrapCli(AppModule);\n```\n\nNow your first CLI is ready!\n\n```bash\n$ ts-node hello.ts --help\nUsage: hello [options] [command]\n\nOptions:\n  -h, --help      display help for command\n\nCommands:\n  hello [options]\n  help [command]  display help for command\n\n$ ts-node hello.ts hello -n husky\nhello husky\n```\n\nSee more examples in [examples](./examples)\n\n\n## Tutorial\n\n### @CommandProvider\n@CommandProvider is a class decorator, it accepts null, a string or a [CommandConfig](#commandconfig)\nA null/undefined (which means just `@CommandProvider()`)\nA string infers a `CommandConfig` and its `nameAndArgs` is class name.\n\n#### Examples \n\n```ts\n@CommanderProvider()\nclass SomeClass {}\n\n// So anything under this class will be the subcommand of command hello\n@CommanderProvider({\n  nameAndArgs: \"hello\",\n  description: \"hello's description\",\n  alias: \"h\"\n})\nclass SomeClass {}\n```\n\n### @Command\n@Command is a class methold decorator, it accepts either a string or a [CommandConfig](#commandconfig)\nA string infers a `CommandConfig` and its `nameAndArgs` is method name.\n\n#### Examples \n\n```ts\n@CommanderProvider()\nclass SomeClass {\n\n  @Command({\n    // Omit nameAndArgs, since by default it is the method name\n    options: [\n      { nameAndArgs: \"-n, --name \u003cname\u003e\" }\n    ]\n  })\n  hello(options){\n      console.log(\"hello\", options.name);\n  }\n}\n\n```\n### CommandConfig\n```ts\ninterface CommandConfig {\n  nameAndArgs?: string;\n  description?: string;\n  options?: OptionConfig[];\n  alias?: string;\n  aliases?: string[];\n}\n```\n\n### OptionConfig\n```ts\ninterface OptionConfig {\n  nameAndArgs: string; \n  description?: string;\n  mandatory?: boolean;\n  default?: string;\n  choices?: string[];\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesxsh%2Fnestjs-eclih","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlesxsh%2Fnestjs-eclih","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesxsh%2Fnestjs-eclih/lists"}