Skip to content

saivikasreddy717/-NL2BASH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NL2BASH

NL2BASH

NL2BASH is a web-based tool that converts natural language instructions into corresponding Bash commands. The application leverages a machine learning model (using T5ForConditionalGeneration and RobertaTokenizer) from Transformers to generate and execute Bash commands dynamically.

Features

  • Natural Language Processing: Convert user instructions into Bash commands.
  • Dynamic Working Directory: Select the desired working directory for command execution.
  • Command Execution History: View a log of previously executed commands and outputs.
  • Integrated Interface: Built with Flask, jQuery, and Bootstrap for a responsive experience.

Project Structure

  • app.py: Main Flask application that handles routing, model inference, and command execution.
  • templates/index.html: HTML template for the web interface.
  • static/style.css: Custom CSS styling for the application.
  • LICENSE: Apache License 2.0.

Installation

  1. Clone the Repository

    git clone <repository-url>
  2. Navigate to the Project Directory

    cd NL2BASH-main
  3. Set Up the Environment

    • Ensure you have Python 3.8 or later installed.
    • (Optional) Set up a virtual environment:
      python -m venv venv
      source venv/bin/activate # On Windows use: venv\Scripts\activate
  4. Install Dependencies

    pip install -r requirements.txt

Usage

  1. Run the Application

    python app.py
  2. Access the Web Interface

  3. Generate and Execute Commands

    • Enter your natural language instruction.
    • Select the desired directory from the dropdown.
    • Click Generate Command to view the Bash command.
    • Click Execute Command to run the command and view the output.
    • The command and output will be added to the execution history.

Contribution

Contributions are welcome! Please submit issues or pull requests for improvements and bug fixes.

License

This project is licensed under the terms of the Apache License 2.0.

Acknowledgments

Authors:


Jayesh Thakur

Sai Vikas

Aryan Sharma

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published