NLP Command Executor is a graphical user interface (GUI) based tool designed to execute terminal commands using natural language prompts. This tool aims to simplify the process of running commands by allowing users to input plain English descriptions, which are then mapped to corresponding terminal commands. The application also includes features for command history management, command suggestions, and basic validation to prevent potentially dangerous actions.
* Natural Language Prompts: Users can input natural language descriptions, which are translated into specific terminal commands.
* Command Suggestions: The tool suggests commands based on the user's input, making it easier to find the right command.
* Command History: Users can view and manage a history of executed commands. Security: The tool includes basic validation to prevent the execution of potentially dangerous commands.
* Sudo Command Handling: Securely handle sudo commands with password input. User-Friendly Interface: A simple and intuitive GUI for entering commands and viewing outputs.
1. Python: Ensure you have Python installed on your system. The script is compatible with Python 3.x. You can download Python from the official Python website.
2. Tkinter: Tkinter is the standard GUI library for Python. It comes pre-installed with Python on most systems. If it's not installed, you can install it using your package manager. For example, on Debian-based systems, you can use: A guide on how to install the tools needed for running the project.
-
Download Python:
- Visit the official Python website and download the latest version of Python for your operating system.
-
Install Python:
- Follow the installation instructions for your operating system.
- Ensure that you check the option to add Python to your system PATH during installation.
-
Verify Installation:
- Open a terminal or command prompt and run:
python --version
- You should see the installed Python version.
- Open a terminal or command prompt and run:
Pip is the package installer for Python and comes pre-installed with Python. To ensure pip is installed, follow these steps:
-
Verify Pip Installation:
- Open a terminal or command prompt and run:
pip --version
- You should see the installed pip version.
- Open a terminal or command prompt and run:
-
Install Pip (if not installed):
- If pip is not installed, you can install it using the following command:
python -m ensurepip --upgrade
- If pip is not installed, you can install it using the following command:
Tkinter is the standard GUI library for Python and comes pre-installed with Python on most systems. To ensure Tkinter is installed, follow these steps:
-
Verify Tkinter Installation:
- Open a terminal or command prompt and run:
python -m tkinter
- A small window should appear, indicating that Tkinter is installed correctly.
- Open a terminal or command prompt and run:
-
Install Tkinter (if not installed):
- If Tkinter is not installed, you can install it using your package manager. For example, on Debian-based systems, you can use:
sudo apt-get install python3-tk
- If Tkinter is not installed, you can install it using your package manager. For example, on Debian-based systems, you can use:
- Clone the Repository:
git clone https://github.com/tarunerror/nlp-terminal.git
cd nlp-terminal
-
Create a Virtual Environment:
python -m venv venv
-
Activate the Virtual Environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
-
Run the Script:
python terminal_runner.py
-
Enter Commands: Use the GUI to enter natural language prompts and see the corresponding terminal commands executed.
Technologies used in the project.
Mozilla Public license 2.0