This is a npx command-line tool (Node CLI) that helps me set up my NodeJS projects.
It contains differents templates for different cases (JS, TS, with or without Express).
nopse stands for node project setup
You can use npx, install the npm package or clone the repo and try it locally on your machine.
- Open your terminal
- Navigate to the folder where you want to set up your Node project
- Run the following command
npx @srx32/nopse create projectName
- Open your terminal
- Run the following command
npm install @srx32/nopse -g
It will install the package globally.
- Now, navigate to the diretory where you want to set up your Node project
- Run the following command
nopse create projectName
- Clone the repo
- Open it in your code editor
- Use the terminal of your code editor or open the system terminal and navigate to the folder of the project
- Install the required packages by running
npm install
- Then build the project (transpile the TS code to JS) with
npm run build
It will generate a dist folder which will hold the JS version of the code
- And now, run the program with
npx . create projectName
I have used some libraries to help me build this CLI effectively. These packages are :
It is a package for creating and handling CLI commands, options and more.
It is a package for logging colored messages in the terminal, with even some styling (bold, italic, etc.).
These are some tutorials and resources that helped me build this CLI :