@ptkdev/node-cli-boilerplate
Version:
Create node cli with this user friendly boilerplate. Use this respository as template for your new npm command line interface project
155 lines (98 loc) • 15.6 kB
Markdown
# 🪓 node-cli-boilerplate
<!-- all-shields/header-badges:START -->
[](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/blob/main/CHANGELOG.md) [](https://www.npmjs.com/package/@ptkdev/node-cli-boilerplate) [](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/blob/main/LICENSE.md) [](https://www.typescriptlang.org/) [](https://github.com/tc39/ecma262) [](https://discord.ptkdev.io)
<!-- all-shields/header-badges:END -->
Create node cli with this user friendly boilerplate. Use this respository as template for your new npm command line interface project
This is a [github template](https://github.blog/2019-06-06-generate-new-repositories-with-repository-templates/), you can fork it or [use as template](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/generate) for start new project with this repository as hello-world. I hate start new project with empty template, often i missing correct configuration, readme instruction or i need of samples of code. Use this repository as template solve this problem.
## 🎁 Support: Donate
> This project is **free**, **open source** and I try to provide excellent **free support**. Why donate? I work on this project several hours in my spare time and try to keep it up to date and working. **THANK YOU!**
<!-- all-shields/sponsors-badges:START -->
[](https://www.paypal.me/ptkdev) [](https://ko-fi.com/ptkdev) [](https://github.com/sponsors/ptkdev) [](https://www.patreon.com/join/ptkdev) [](https://ptk.dev/img/icons/menu/bitcoin_wallet.png) [](https://ptk.dev/img/icons/menu/ethereum_wallet.png)
<!-- all-shields/sponsors-badges:END -->
## 📎 Menu
- 💡 [Features](#-features)
- 🚀 [How to use](#-usage)
- 📚 [Documentation](#-documentation)
- 🔨 [Developer Mode](#-developer-mode)
- - 🏁 [Run Project](#-run-project)
- - 💾 [Setup Project](#-setup-project)
- - 🚀 [Deploy](#-deploy)
- 👨💻 [Contributing](#-contributing)
- 🐛 [Known Bugs](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/issues?q=is%3Aopen+is%3Aissue+label%3Abug)
- 🍻 Community:
- <img src="https://raw.githubusercontent.com/ptkdev/dotfiles/main/assets/social_telegram.png" height="18px"> Telegram ([🇬🇧 English](http://t.me/ptkdev_support) | [🇮🇹 Italian](http://t.me/ptkdev_support_italian))
- <img src="https://raw.githubusercontent.com/ptkdev/dotfiles/main/assets/social_discord.png" height="18px"> [Discord](http://discord.ptkdev.io) ([🇬🇧 English](https://discord.gg/jqUSGPKdmA) | [🇮🇹 Italian](https://discord.gg/SJFcbvG6RU) | [🇵🇱 Polish](https://discord.gg/25vg4VFhb7))
- <img src="https://raw.githubusercontent.com/ptkdev/dotfiles/main/assets/social_twitter.png" height="18px"> [Twitter](http://twitter.com/ptkdevio)
## 💡 Features
- [✔️] Easy to use
- [✔️] MIT License
- [✔️] Make CLI Package for npm
- [✔️] Friendly boilerplate + Github templates
- [✔️] Typescript + TSPaths preconfigured
- [✔️] Userfriendly folders tree
- [✔️] Prettiers and ESLint preconfigured
- [✔️] all-contributors-cli and all-shields-cli preconfigured
- [✔️] JEST Test preconfigured
- [✔️] Full async code
- [✔️] Github and Vscode dotfiles preconfigured
- [✔️] Translations: 🇬🇧 🇮🇹 🇵🇱 (Help me ❤️)
## 🚀 Usage
1. Install cli package globally: `npm install @ptkdev/node-cli-boilerplate -g`
2. Run anywhere: `node-cli-boilerplate`
You can use npx, example: `npx @ptkdev/node-cli-boilerplate`
## 🔨 Developer Mode
#### 🏁 Run Project
1. Clone this repository or download [nightly](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/archive/nightly.zip), [beta](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/archive/beta.zip) or [stable](https://github.com/ptkdev-boilerplate/node-cli-boilerplate/archive/main.zip).
2. Run `npm install`
3. Run `npm run dev` for watch mode
If you want to try cli locally:
4. Run `npm run release`
5. Run `npm link` (on unix/mac use `sudo npm link`)
6. Run `node-cli-boilerplate` anywhere for execute command line tool
For uninstall it run `npm unlink` (on unix/mac use `sudo npm unlink`)
#### 💾 Setup Project
If you want replace all strings (example: package name, author, urls, etc...) in markdown file, source files and others files of this project you need edit `setup.json` with correct values and run `npm run setup`.
#### 🚀 Deploy
For create npm package:
- Run `npm run release`
- Run `npm publish`
## 📚 Documentation
Run `npm run docs`
## 👑 Backers and Sponsors
Thanks to all our backers! 🙏 Donate 3$ or more on [paypal](https://www.paypal.me/ptkdev), [ko-fi](https://ko-fi.com/ptkdev) or [github](https://github.com/sponsors/ptkdev) and send me [email](mailto:support@ptkdev.io) with your avatar and url.
[](https://api.ptkdev.io/backers/sponsor1.html) [](https://api.ptkdev.io/backers/sponsor2.html) [](https://api.ptkdev.io/backers/sponsor-kofi1.html) [](https://api.ptkdev.io/backers/sponsor-kofi2.html) [](https://api.ptkdev.io/backers/sponsor-kofi3.html) [](https://api.ptkdev.io/backers/sponsor3.html) [](https://api.ptkdev.io/backers/sponsor4.html) [](https://api.ptkdev.io/backers/sponsor5.html) [](https://api.ptkdev.io/backers/sponsor6.html) [](https://api.ptkdev.io/backers/sponsor7.html) [](https://api.ptkdev.io/backers/sponsor8.html) [](https://api.ptkdev.io/backers/sponsor9.html) [](https://api.ptkdev.io/backers/sponsor10.html) [](https://api.ptkdev.io/backers/sponsor11.html) [](https://api.ptkdev.io/backers/sponsor12.html) [](https://api.ptkdev.io/backers/sponsor13.html) [](https://api.ptkdev.io/backers/sponsor14.html) [](https://api.ptkdev.io/backers/sponsor15.html) [](https://api.ptkdev.io/backers/backer1.html) [](https://api.ptkdev.io/backers/backer2.html) [](https://api.ptkdev.io/backers/backer3.html) [](https://api.ptkdev.io/backers/backer4.html) [](https://api.ptkdev.io/backers/backer5.html) [](https://api.ptkdev.io/backers/backer6.html) [](https://api.ptkdev.io/backers/backer7.html) [](https://api.ptkdev.io/backers/backer8.html) [](https://api.ptkdev.io/backers/backer9.html) [](https://api.ptkdev.io/backers/backer10.html) [](https://api.ptkdev.io/backers/backer11.html) [](https://api.ptkdev.io/backers/backer12.html) [](https://api.ptkdev.io/backers/backer13.html) [](https://api.ptkdev.io/backers/backer14.html) [](https://api.ptkdev.io/backers/backer15.html) [](https://api.ptkdev.io/backers/backer16.html) [](https://api.ptkdev.io/backers/backer17.html) [](https://api.ptkdev.io/backers/backer18.html) [](https://api.ptkdev.io/backers/backer19.html) [](https://api.ptkdev.io/backers/backer20.html) [](https://api.ptkdev.io/backers/backer21.html) [](https://api.ptkdev.io/backers/backer22.html) [](https://api.ptkdev.io/backers/backer23.html) [](https://api.ptkdev.io/backers/backer24.html) [](https://api.ptkdev.io/backers/backer25.html) [](https://api.ptkdev.io/backers/backer26.html) [](https://api.ptkdev.io/backers/backer27.html) [](https://api.ptkdev.io/backers/backer28.html) [](https://api.ptkdev.io/backers/backer29.html)
## 👨💻 Contributing
I ❤️ contributions! I will happily accept your pull request! (**IMPORTANT**: Only to nightly branch!) Translations, grammatical corrections (GrammarNazi you are welcome! Yes my English is bad, sorry), etc... Do not be afraid, if the code is not perfect we will work together 👯 and remember to insert your name in `.all-contributorsrc` and `package.json` file.
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="16.66%"><a href="https://ptk.dev"><img src="https://avatars1.githubusercontent.com/u/442844?v=4?s=100" width="100px;" alt="Patryk Rzucidło"/><br /><sub><b>Patryk Rzucidło</b></sub></a><br /><a href="https://github.com/ptkdev/ptkdev-boilerplate/node-cli-boilerplate/commits?author=ptkdev" title="Code">💻</a> <a href="#translation-ptkdev" title="Translation">🌍</a> <a href="https://github.com/ptkdev/ptkdev-boilerplate/node-cli-boilerplate/commits?author=ptkdev" title="Documentation">📖</a> <a href="https://github.com/ptkdev/ptkdev-boilerplate/node-cli-boilerplate/issues?q=author%3Aptkdev" title="Bug reports">🐛</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
> 💰 In the future, if the donations allow it, I would like to share some of the success with those who helped me the most. For me open source is share of code, share development knowledges and share donations!
## 🦄 Other Projects
<!-- all-shields/projects-badges1:START -->
[](https://ptk.dev/)
<!-- all-shields/projects-badges1:END -->
<!-- all-shields/projects-badges2:START -->
[](https://github.com/ptkdev/ptkdev-logger) [](https://github.com/ptkdev/all-shields-cli) [](https://github.com/ptkdev/chrome-extension-aspectratio219) [](https://availableon.badge.ptkdev.io/) [](https://github.com/ptkdev/json-token-replace) [](https://github.com/ptkdev/eslint-plugin-snakecasejs)
<!-- all-shields/projects-badges2:END -->
<!-- all-shields/projects-badges3:START -->
[](https://github.com/ptkdev-components) [](https://github.com/ptkdev/aboutmeinfo-telegram-bot) [](https://github.com/ptkdev/quizquickanswer-telegram-game-bot) [](https://t.me/gamebookchatbot) [](https://github.com/ptkdev/vscode-theme-dark-blood)
<!-- all-shields/projects-badges3:END -->
<!-- all-shields/projects-badges4:START -->
[](https://github.com/ptkdev-boilerplate?q=svelte) [](https://github.com/ptkdev-boilerplate?q=webcomponent) [](https://github.com/ptkdev-boilerplate?q=bot) [](https://github.com/ptkdev-boilerplate?q=node) [](https://meingifs.pics/) [](https://github.com/ptkdev/ptkdev-stickers#-installation)
<!-- all-shields/projects-badges4:END -->
## 💫 License
- Code and Contributions have **MIT License**
- Images and logos have **CC BY-NC 4.0 License**
- Documentations and Translations have **CC BY 4.0 License**
###### Copyleft (c) 2024 [Patryk Rzucidło](https://ptk.dev) ([@PTKDev](https://twitter.com/ptkdev)) <[support@ptkdev.io](mailto:support@ptkdev.io)>