Skip to content

Commit

Permalink
Add readme with documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nesmon committed Jan 7, 2023
1 parent 078dbbd commit 91055e5
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 1 deletion.
74 changes: 74 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 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 or Yarn:
```bash
npm install kurami
```

```bash
yarn add 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
```json
{
"commandsPath": "./path/to/your/commands/folder"
}

```

## How it works ?

You can create a command file with this structur :
```js
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;

```

Then run ``./node_modules/.bin/kurami {commandName}``
You can add a npm script to run it more easily :
```json
{
"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 :D

<a href='https://ko-fi.com/O4O81EAUF' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
<a href="https://www.buymeacoffee.com/nesmon" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 36px !important;" ></a>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 91055e5

Please sign in to comment.