Skip to content

nesmon/Kurami

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kurami - Command manager

Kurami is a console command manager similar to the command system of Symfony.

Why Kurami ?

Nice question, and I have absolutly no answer, in reality it's just birth because needed to setup fixture in a project and wanted to have something clean. But you will probably find a better utility than me ^^

Installation

You can install it by using NPM locally :

npm install kurami

or globally :

npm install -g kurami

Setup

You can setup Kurami by creating a file named kurami.json in your project root directory to define the path to your command folder

{
  "commandsPath": "./path/to/your/commands/folder"
}

How it works ?

You can create a command file with this structur :

const { BaseCommand } = require('kurami');

class TestCommand extends BaseCommand {
    constructor() {
        super({
            name: 'test:test',
            description: 'Test command'
        });
    }

    async run() {
        console.log('Test command');
    }
}

module.exports = TestCommand;

If installed globally

Then run in your project kurami {commandName} in your project folder

If installed locally

Then run ./node_modules/.bin/kurami {commandName} in your project folder or add a npm script to run it more easily :

{
  "scripts": {
    "kurami": "kurami"
  }
}

Then run npm run kurami {commandName}

And done !

Disclaimer

It's an experimental version, some problem persist like sometime the command didn't exit after is end. I'm fully open for suggestion and more ! :D

Support me

If you like my work, you can support me by buying me a coffee and/or following me on twitter :D

Buy Me a Coffee at ko-fi.com Buy Me A Coffee My Twitter profile

About

A console command system for NodeJs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published