Natural Language to Command Line Interface - Hybrid ML + Rule Engine with Git Support
Project description
NL2CMD - Natural Language to Command Line Interface
Transform natural language into command-line instructions instantly
NL2CMD is an intelligent command-line interface that converts natural language queries into actual shell commands using a hybrid ML + Rule-based approach and works on multiple platform windows and linux
Installation
pip install nl2cmd-ai
Usage
# Single command mode
n2c "list all files"
n2c "create file config.json"
n2c "check git status"
n2c "kill process chrome"
# Interactive mode
n2c -i
n2c> show system info
n2c> create folder project and create file readme.txt
n2c> good # Mark command as correct
n2c> exit
# Training
n2c --train # Train ML model
n2c --retrain # Retrain with feedback
Examples
Basic Commands
n2c "list all files" → dir / ls
n2c "show system information" → systeminfo / uname -a
n2c "check disk health" → wmic diskdrive get status
n2c "find large files" → forfiles /S /M * /C "cmd /c if @fsize GEQ 104857600 echo @path"
Parameterized Commands
n2c "create file config.json" → echo. > config.json
n2c "create folder Documents" → mkdir Documents
n2c "kill process firefox" → taskkill /IM firefox.exe /F
n2c "copy file src.txt to dst.txt" → copy src.txt dst.txt
Git Commands
n2c "check git status" → git status
n2c "push to github" → git push
n2c "create new branch feature" → git branch feature
n2c "commit changes with message" → git commit -m "Update"
Multi-Command Chaining
n2c "create folder project and create file readme.txt"
→ mkdir project && echo. > readme.txt
n2c "list files then show system info"
→ dir && systeminfo
Local Setup
git clone https://github.com/Cosy-y/NL2CMD.git
cd NL2CMD
pip install -r requirements.txt
python train_model.py
n2c "test command"
Building Package
pip install build twine
python -m build
twine upload dist/*
Sem 5 project
📄 License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nl2cmd_ai-3.0.3.tar.gz.
File metadata
- Download URL: nl2cmd_ai-3.0.3.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2c2ebca06c5fe9c61394fc30e8fcd7b6b21c14d1f1c65dcf8627cb1cb1f2546
|
|
| MD5 |
f15c89441dd489d1af7ba2e114a460dc
|
|
| BLAKE2b-256 |
d818d510e6f668fa2aae547302b3eed9aaa88088936c7d5bf20b82598072a88b
|
File details
Details for the file nl2cmd_ai-3.0.3-py3-none-any.whl.
File metadata
- Download URL: nl2cmd_ai-3.0.3-py3-none-any.whl
- Upload date:
- Size: 34.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53d6746a9b7d8f91310ddf3938b0118dadb342db3aaec5fbfe4bf5a6337063b7
|
|
| MD5 |
410554546bf03a1a40c6f5844c149ede
|
|
| BLAKE2b-256 |
fed961113a165fd9002987badc09e3a488a1a0fadcc11ac0e4d2ce27ea45dccc
|