{"id":13902995,"url":"https://github.com/ProfessorManhattan/template-npm-cli","last_synced_at":"2025-07-18T00:32:53.131Z","repository":{"id":44337875,"uuid":"484677895","full_name":"ProfessorManhattan/template-npm-cli","owner":"ProfessorManhattan","description":"A boilerplate / starting template for NPM CLI packages (using Nest Commander)","archived":false,"fork":false,"pushed_at":"2023-03-23T13:04:02.000Z","size":2708,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-07T22:35:31.185Z","etag":null,"topics":["bin","cli","commander","cosmicconfig","inquirer","library","manpage","mblabs","megabytelabs","nestjs","professormanhattan","washingtondc"],"latest_commit_sha":null,"homepage":"https://megabyte.space","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProfessorManhattan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"docs/CODEOWNERS","security":null,"support":null},"funding":{"github":"ProfessorManhattan","open_collective":"megabytelabs","patreon":"ProfessorManhattan","custom":["donate.givedirectly.org"]}},"created_at":"2022-04-23T07:27:08.000Z","updated_at":"2024-03-29T19:45:37.000Z","dependencies_parsed_at":"2023-02-09T10:01:49.437Z","dependency_job_id":null,"html_url":"https://github.com/ProfessorManhattan/template-npm-cli","commit_stats":null,"previous_names":["professormanhattan/template-npm-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessorManhattan%2Ftemplate-npm-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessorManhattan%2Ftemplate-npm-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessorManhattan%2Ftemplate-npm-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProfessorManhattan%2Ftemplate-npm-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProfessorManhattan","download_url":"https://codeload.github.com/ProfessorManhattan/template-npm-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226320835,"owners_count":17606365,"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":["bin","cli","commander","cosmicconfig","inquirer","library","manpage","mblabs","megabytelabs","nestjs","professormanhattan","washingtondc"],"created_at":"2024-08-06T22:01:32.808Z","updated_at":"2024-11-25T11:31:06.720Z","avatar_url":"https://github.com/ProfessorManhattan.png","language":"Shell","readme":"\u003c!-- ⚠️ This README has been generated from the file(s) \".config/docs/blueprint-readme-cli.md\" ⚠️--\u003e\u003cdiv align=\"center\"\u003e\n  \u003ccenter\u003e\n    \u003ca href=\"https://github.com/megabyte-labs/template-npm-cli\"\u003e\n      \u003cimg width=\"148\" height=\"148\" alt=\"NPM CLI logo\" src=\"https://gitlab.com/megabyte-labs/templates/npm-cli/-/raw/master/logo.png\" /\u003e\n    \u003c/a\u003e\n  \u003c/center\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ccenter\u003e\u003ch1 align=\"center\"\u003e\u003ci\u003e\u003c/i\u003eNPM CLI Boilerplate\u003ci\u003e\u003c/i\u003e\u003c/h1\u003e\u003c/center\u003e\n  \u003ccenter\u003e\u003ch4 style=\"color: #18c3d1;\"\u003eAn NPM CLI maintained by \u003ca href=\"https://megabyte.space\" target=\"_blank\"\u003eMegabyte Labs\u003c/a\u003e\u003c/h4\u003e\u003ci\u003e\u003c/i\u003e\u003c/center\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://megabyte.space\" title=\"Megabyte Labs homepage\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Homepage\" src=\"https://img.shields.io/website?down_color=%23FF4136\u0026down_message=Down\u0026label=Homepage\u0026logo=home-assistant\u0026logoColor=white\u0026up_color=%232ECC40\u0026up_message=Up\u0026url=https%3A%2F%2Fmegabyte.space\u0026style=for-the-badge\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/megabyte-labs/template-npm-cli/blob/master/docs/CONTRIBUTING.md\" title=\"Learn about contributing\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Contributing\" src=\"https://img.shields.io/badge/Contributing-Guide-0074D9?logo=github-sponsors\u0026logoColor=white\u0026style=for-the-badge\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://app.slack.com/client/T01ABCG4NK1/C01NN74H0LW/details/\" title=\"Chat with us on Slack\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Slack\" src=\"https://img.shields.io/badge/Slack-Chat-e01e5a?logo=slack\u0026logoColor=white\u0026style=for-the-badge\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://gitter.im/megabyte-labs/community\" title=\"Chat with the community on Gitter\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Gitter\" src=\"https://img.shields.io/gitter/room/megabyte-labs/community?logo=gitter\u0026logoColor=white\u0026style=for-the-badge\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/megabyte-labs/template-npm-cli\" title=\"GitHub mirror\" target=\"_blank\"\u003e\n    \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/badge/Mirror-GitHub-333333?logo=github\u0026style=for-the-badge\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://gitlab.com/megabyte-labs/templates/npm-cli\" title=\"GitLab repository\" target=\"_blank\"\u003e\n    \u003cimg alt=\"GitLab\" src=\"https://img.shields.io/badge/Repo-GitLab-fc6d26?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAAHJJREFUCNdNxKENwzAQQNEfWU1ZPUF1cxR5lYxQqQMkLEsUdIxCM7PMkMgLGB6wopxkYvAeI0xdHkqXgCLL0Beiqy2CmUIdeYs+WioqVF9C6/RlZvblRNZD8etRuKe843KKkBPw2azX13r+rdvPctEaFi4NVzAN2FhJMQAAAABJRU5ErkJggg==\u0026style=for-the-badge\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@mblabs/npm-npm-cli\" title=\"Version 0.0.1\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Version: 0.0.1\" src=\"https://img.shields.io/badge/version-0.0.1-blue.svg?cacheSeconds=2592000\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAACNJREFUCNdjIACY//+BEp9hhM3hAzYQwoBIAqEDYQrCZLwAAGlFKxU1nF9cAAAAAElFTkSuQmCC\u0026style=flat-square\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://gitlab.com/megabyte-labs/templates/npm-cli/-/commits/master\" title=\"GitLab CI build status\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Build status\" src=\"https://img.shields.io/gitlab/pipeline-status/megabyte-labs/npm/cli/npm-cli?branch=master\u0026label=build\u0026logo=gitlab\u0026logoColor=white\u0026style=flat-square\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@mblabs/npm-npm-cli\" title=\"Dependency status reported by Depfu\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Dependency status reported by Depfu\" src=\"https://img.shields.io/depfu/megabyte-labs/customPackageName?logo=codeforces\u0026logoColor=white\u0026style=flat-square\u0026logo=npm\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@mblabs/npm-npm-cli\" title=\"Zip file size\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Zip file size\" src=\"https://img.shields.io/bundlephobia/minzip/@mblabs/npm-npm-cli?style=flat-square\u0026logo=npm\u0026logoColor=white\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@mblabs/npm-npm-cli\" title=\"Total downloads of @mblabs/npm-npm-cli on npmjs.org\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Total downloads of @mblabs/npm-npm-cli on npmjs.org\" src=\"https://img.shields.io/npm/dt/@mblabs/npm-npm-cli?style=flat-square\u0026logo=npm\u0026logoColor=white\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://snyk.io/advisor/npm-package/@mblabs/npm-npm-cli\" title=\"Number of vulnerabilities from Snyk scan on @mblabs/npm-npm-cli\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Number of vulnerabilities from Snyk scan on @mblabs/npm-npm-cli\" src=\"https://img.shields.io/snyk/vulnerabilities/npm/@mblabs/npm-npm-cli?style=flat-square\u0026logo=snyk\u0026logoColor=white\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"website.documentation/npm\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg?logo=readthedocs\u0026logoColor=white\u0026style=flat-square\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/megabyte-labs/template-npm-cli/blob/master/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/license-MIT-yellow.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAAHpJREFUCNdjYOD/wMDAUP+PgYHxhzwDA/MB5gMM7AwMDxj4GBgKGGQYGCyAEEgbMDDwAAWAwmk8958xpIOI5zKH2RmOyhxmZjguAiKmgIgtQOIYmFgCIp4AlaQ9OczGkJYCJEAGgI0CGwo2HmwR2Eqw5SBnNIAdBHYaAJb6KLM15W/CAAAAAElFTkSuQmCC\u0026style=flat-square\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003e \u003cbr/\u003e\u003ch4 align=\"center\"\u003e**A boilerplate / starting template for NPM CLI packages (using Nest Commander)**\u003c/h4\u003e\u003cbr/\u003e\n\n\u003ca href=\"#table-of-contents\" style=\"width:100%\"\u003e\u003cimg style=\"width:100%\" src=\"https://gitlab.com/megabyte-labs/assets/-/raw/master/png/aqua-divider.png\" /\u003e\u003c/a\u003e\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Requirements](#requirements)\n  - [Developer Requirements](#developer-requirements)\n- [NPM CLI Requirements](#npm-cli-requirements)\n  - [Test-Driven Development](#test-driven-development)\n  - [Development Tools](#development-tools)\n  - [Documentation](#documentation)\n- [Contributing](#contributing)\n  - [Affiliates](#affiliates)\n- [License](#license)\n\n\u003ca href=\"#overview\" style=\"width:100%\"\u003e\u003cimg style=\"width:100%\" src=\"https://gitlab.com/megabyte-labs/assets/-/raw/master/png/aqua-divider.png\" /\u003e\u003c/a\u003e\n\n## Overview\n\nThis repository houses the starting template / boilerplate with the format that all [Megabyte Labs](https://megabyte.space) NPM CLIs should use. It bundles together NestJS, Nest Commander, and a few other recommended dependencies. It also includes Jest for Test-Driven Development (TDD).\n\n\u003ca href=\"#requirements\" style=\"width:100%\"\u003e\u003cimg style=\"width:100%\" src=\"https://gitlab.com/megabyte-labs/assets/-/raw/master/png/aqua-divider.png\" /\u003e\u003c/a\u003e\n\n## Requirements\n\nIf you are simply including this library in your project, all you need is a recent version of Node.js. **[Node.js \u003e14.18.0](repository.project.node)** is sometimes required and is the only version range we actively support. Albeit, it is highly probable that lower versions will work as well depending on the requirements that this project imports.\n\n### Developer Requirements\n\nThe following versions of Node.js and Python are required for development:\n\n- **[Node.js \u003e14.18.0](repository.project.node)**\n- **[Python \u003e3.10.0](repository.project.python)**\n\nOther versions may work, but only the above versions are supported. Most development dependencies are installed automatically by our `Taskfile.yml` set-up (even Node.js and Python). Run `bash start.sh` to install **[Bodega](https://github.com/ProfessorManhattan/Bodega)** (an improved fork of [go-task](https://github.com/go-task/task)) and run the initialization sequence. The taskfiles will automatically install dependencies as they are needed, based on what development tasks you are running. For more information, check out the [CONTRIBUTING.md](https://github.com/megabyte-labs/template-npm-cli/blob/main/docs/CONTRIBUTING.md) or simply run:\n\n```shell\nnpm run help\n```\n\n`npm run help` will ensure Bodega is installed and then open an interactive dialog where you can explore and learn about various developer commands.\n\n\u003ca href=\"#npm-cli-requirements\" style=\"width:100%\"\u003e\u003cimg style=\"width:100%\" src=\"https://gitlab.com/megabyte-labs/assets/-/raw/master/png/aqua-divider.png\" /\u003e\u003c/a\u003e\n\n## NPM CLI Requirements\n\nAll of the NPM CLIs in the [Megabyte Labs](https://megabyte.space) eco-system should use the same format and core dependencies. They should all be written in TypeScript. Because we use [Angular](https://angular.io/) as a first-class choice, [NestJS](https://nestjs.com/) was an easy choice for us to adopt because of the similarities. The fact that NestJS is wildly popular on GitHub does not hurt as well. And because we use NestJS, we decided to use [Nest Commander](https://nest-commander.jaymcdoniel.dev/) for our NPM CLIs.\n\n### Test-Driven Development\n\nTesting CLIs can be cumbersome without the right tools. We have found that the best way of testing a Nest Commander CLI app is to utilize Test-Driven Development principles. Instead of manually compiling the app each time you make a change to test the CLI, we can create [Jest](https://jestjs.io/) tests while we are developing the CLI and then use [Nodemon](https://nodemon.io/) to automatically run the tests everytime we make a change to any file.\n\nWe encourage you to adopt these principles and develop your tests while you code.\n\n### Development Tools\n\nYou are probably already familiar with `npm run test` and `npm run build`. We take things a step further and provide a plethora of build tools that are housed in our `Taskfile.yml` and the accompanying files it includes. We encourage you to attempt to make use of `task npm:test:inspect` which will watch the files as you code, run the Jest tests whenever a change is made, and open a Chrome DevTools instance for advanced debugging via [ndb](https://github.com/GoogleChromeLabs/ndb).\n\nTo make sense of all the build tools we include in all of our projects, you can run `bash start.sh` (to make sure our task runner called [Bodega](https://github.com/megabyte-labs/Bodega) is installed) and then `task --menu` to show a sweet TUI that will help you navigate through the available commands. It integrates documentation right into the menu too!\n\n### Documentation\n\nA link to the [Nest Commander documentation can be found here](https://nest-commander.jaymcdoniel.dev/docs/).\n\n\u003ca href=\"#contributing\" style=\"width:100%\"\u003e\u003cimg style=\"width:100%\" src=\"https://gitlab.com/megabyte-labs/assets/-/raw/master/png/aqua-divider.png\" /\u003e\u003c/a\u003e\n\n## Contributing\n\nContributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/megabyte-labs/template-npm-cli/issues). If you would like to contribute, please take a look at the [contributing guide](https://github.com/megabyte-labs/template-npm-cli/blob/master/docs/CONTRIBUTING.md).\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eSponsorship\u003c/b\u003e\u003c/summary\u003e\n\u003cbr/\u003e\n\u003cblockquote\u003e\n\u003cbr/\u003e\nDear Awesome Person,\u003cbr/\u003e\u003cbr/\u003e\nI create open source projects out of love. Although I have a job, shelter, and as much fast food as I can handle, it would still be pretty cool to be appreciated by the community for something I have spent a lot of time and money on. Please consider sponsoring me! Who knows? Maybe I will be able to quit my job and publish open source full time.\n\u003cbr/\u003e\u003cbr/\u003eSincerely,\u003cbr/\u003e\u003cbr/\u003e\n\n**_Brian Zalewski_**\u003cbr/\u003e\u003cbr/\u003e\n\n\u003c/blockquote\u003e\n\n\u003ca title=\"Support us on Open Collective\" href=\"https://opencollective.com/megabytelabs\" target=\"_blank\"\u003e\n  \u003cimg alt=\"Open Collective sponsors\" src=\"https://img.shields.io/opencollective/sponsors/megabytelabs?logo=opencollective\u0026label=OpenCollective\u0026logoColor=white\u0026style=for-the-badge\" /\u003e\n\u003c/a\u003e\n\u003ca title=\"Support us on GitHub\" href=\"https://github.com/ProfessorManhattan\" target=\"_blank\"\u003e\n  \u003cimg alt=\"GitHub sponsors\" src=\"https://img.shields.io/github/sponsors/ProfessorManhattan?label=GitHub%20sponsors\u0026logo=github\u0026style=for-the-badge\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://www.patreon.com/ProfessorManhattan\" title=\"Support us on Patreon\" target=\"_blank\"\u003e\n  \u003cimg alt=\"Patreon\" src=\"https://img.shields.io/badge/Patreon-Support-052d49?logo=patreon\u0026logoColor=white\u0026style=for-the-badge\" /\u003e\n\u003c/a\u003e\n\n### Affiliates\n\nBelow you will find a list of services we leverage that offer special incentives for signing up for their services through our special links:\n\n\u003ca href=\"http://eepurl.com/h3aEdX\" title=\"Sign up for $30 in MailChimp credits\" target=\"_blank\"\u003e\n  \u003cimg alt=\"MailChimp\" src=\"https://cdn-images.mailchimp.com/monkey_rewards/grow-business-banner-2.png\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://www.digitalocean.com/?refcode=751743d45e36\u0026utm_campaign=Referral_Invite\u0026utm_medium=Referral_Program\u0026utm_source=badge\"\u003e\n  \u003cimg src=\"https://web-platforms.sfo2.digitaloceanspaces.com/WWW/Badge%203.svg\" alt=\"DigitalOcean Referral Badge\" /\u003e\n\u003c/a\u003e\n\n\u003c/details\u003e\n\n\u003ca href=\"#license\" style=\"width:100%\"\u003e\u003cimg style=\"width:100%\" src=\"https://gitlab.com/megabyte-labs/assets/-/raw/master/png/aqua-divider.png\" /\u003e\u003c/a\u003e\n\n## License\n\nCopyright © 2020-2021 [Megabyte LLC](https://megabyte.space). This project is [MIT](https://gitlab.com/megabyte-labs/templates/npm-cli/-/blob/master/LICENSE) licensed.\n","funding_links":["https://github.com/sponsors/ProfessorManhattan","https://opencollective.com/megabytelabs","https://patreon.com/ProfessorManhattan","donate.givedirectly.org","https://www.patreon.com/ProfessorManhattan"],"categories":["cli"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FProfessorManhattan%2Ftemplate-npm-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FProfessorManhattan%2Ftemplate-npm-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FProfessorManhattan%2Ftemplate-npm-cli/lists"}