https://github.com/kzulfazriawan/kommand
>_ This is your kommand!
https://github.com/kzulfazriawan/kommand
cli command-line-tool command-prompt python shell
Last synced: about 2 months ago
JSON representation
>_ This is your kommand!
- Host: GitHub
- URL: https://github.com/kzulfazriawan/kommand
- Owner: kzulfazriawan
- License: mit
- Created: 2020-07-16T12:44:29.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-09-05T14:36:52.000Z (almost 4 years ago)
- Last Synced: 2025-10-26T04:24:19.239Z (8 months ago)
- Topics: cli, command-line-tool, command-prompt, python, shell
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
## Kommand!


This is your kommand!, this package is used to interactively control your
function in CL.
### Get started
Requirement:
- Python >= 3.6
- colorama *(just for color in command line)*
How to install kommand:
```shell script
python setup.py install
```
How to use kommand:
```shell script
# this will build json templates for your command information.
python -m kommand build
```
after that you just have to fill your command information in your json file.
```json
{
"name": "myapp",
"version": "0.1",
"description": "kom test",
"author": "kzulfazriawan",
"email": "kzulfazriawan@gmail.com",
"your_command": {
"exec": "module_to_exec",
"help": "help information"
},
"your_command2": {
"exec": "module_to_exec2",
"help": "help information2"
}
}
```
In your script python you can add
```python
from kommand import control
if __name__ == '__main__':
control(json_file='your_file.json')
# OR you can use with dictionary arguments
control(
name='your_project_name',
version='0.1',
your_command={'exec': 'your_module_exec', 'help': 'help information'},
your_command2={'exec': 'your_module_exec2', 'help': 'help information2'},...
)
```
Then start execute your script in command line:
```shell script
python myscript.py
# to see help
python myscript.py help
# to execute
python myscript.py your_command your_command2
python myscript.py your_command2 your_command
python myscript.py your_command2
python myscript.py your_command
# if use parameter
python myscript.py your_command='p1,p2,...'
```