komutan
v1.0.4
Published
A CLI tool for creating and managing CommanderJS CLI tools inspired by cobra-cli
Readme
Komutan
A CLI tool for creating and managing CommanderJS CLI tools inspired by cobra-cli

Features
- Scaffold initial typescript app structure
- Add new command
- Test CLI locally by building and linkingæ
- Publish to npmjs
Install
From npmjs
npm i -g komutan
komutanFrom github
Clone and install dependencies:
git clone https://github.com/atasoya/komutan.git
cd komutan
npm install
npm run build
npm link
komutanUsage
Create fresh CLI app
Creates initial clean typescript CLI app structure
komutan init <name>Project Structure
./
├── src/
│ ├── index.ts # CLI entry (Commander)
│ └── program/
│ ├── metadata.ts # CLI metadata
│ ├── program.ts # Main program object
│ └── commands/ # CLI commands
│ ├── hello.ts
│ └── index.ts # Main entry
├── package.json
├── package-lock.json
├── tsconfig.json
└── .gitignoreAdd new commandæ
Adds new command by creating name.ts and adding import to the index.ts
komutan add <name>Command Template
import { program } from "../program";
program.command('#name#')
.description('Description of the command')
.action(() => {
console.log("#name#");
});
`;Test CLI localy
Combines npm run build and npm link to one command.
komutan testPublish CLI to npmjs
Version and publish to npmjs (you may need to login first: npm login )
komutan publish