Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mizok/cli-template
Create CLI project quickly!
https://github.com/mizok/cli-template
Last synced: 6 days ago
JSON representation
Create CLI project quickly!
- Host: GitHub
- URL: https://github.com/mizok/cli-template
- Owner: mizok
- Created: 2023-12-01T04:11:16.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-11T05:50:14.000Z (about 1 year ago)
- Last Synced: 2024-11-02T00:42:02.262Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CLI Template
This is a template repository for building Node.js based CLI using [TypeScript](https://www.typescriptlang.org/) and [esbuild](https://esbuild.github.io/).
## Features
- **TypeScript:** Write your server-side code using TypeScript for better developer experience and static typing.
- **esbuild:** A fast JavaScript bundler that allows for efficient bundling and building of your TypeScript code.
- **Husky & Commitlint:** Enforce commit message conventions with Husky and Commitlint to maintain a clean and standardized Git history.
- **chalk.js:** For better and colorful console message/error.
- **@inquirer:** For better CLI user experience.## Getting Started
### Prerequisites
Before you begin, ensure you have the following installed on your machine:
- [Node.js](https://nodejs.org/)(16.17.0+)
### Installation
1. Clone the repository:
```bash
git clone https://github.com/mizok/cli-template.git
```2. Install dependencies:
```bash
npm install
```3. Automatic Setup
The `postinstall.ts` script automates the setup process by performing the following tasks:
1. Executes `npx husky install` to set up Husky.
2. Deletes the `postinstall` script from package.json.
3. Deletes the `postinstall.ts` script itself.
4. To execute this setup, it is automatically triggered during the installation process.### build and pack
- To build CLI, use:
```bash
npm run build
```- To pack, run:
```bash
npm run pack
```## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Issues
If you encounter any issues or have questions, feel free to open an issue on the GitHub Issues page.