@iresh_mkp/mkp-backend-cli
v1.0.0
Published
A simple CLI application built with TypeScript
Readme
My CLI Application
This project is a command-line interface (CLI) application developed using TypeScript. It provides a simple example of how to create and structure a CLI application.
Project Structure
my-cli-app
├── src
│ ├── index.ts # Entry point of the CLI application
│ └── commands
│ └── hello.ts # Command that outputs a greeting message
├── package.json # npm configuration file
├── tsconfig.json # TypeScript configuration file
└── README.md # Documentation for the projectInstallation
To set up the project, follow these steps:
Create the project directory:
mkdir my-cli-app cd my-cli-appInitialize a new npm project:
npm init -yInstall TypeScript and any other necessary dependencies:
npm install typescript @types/node --save-devCreate the TypeScript configuration file:
npx tsc --initSet up the project structure:
mkdir src mkdir src/commands touch src/index.ts touch src/commands/hello.ts touch README.mdUpdate
tsconfig.jsonwith appropriate settings:{ "compilerOptions": { "outDir": "./dist", "rootDir": "./src" } }Update
package.jsonto include build and run scripts:{ "scripts": { "build": "tsc", "start": "node dist/index.js" } }
Usage
Implement the CLI logic in
src/index.tsandsrc/commands/hello.ts.Build the project:
npm run buildRun the CLI application:
npm start
Contributing
Feel free to submit issues or pull requests for improvements or additional features.
