Skip to content

tichita7/neoshell-ai-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeoShell AI Backend

FastAPI backend powering NeoShell AI with Groq LLM integration for intelligent command generation.

This backend handles:

  • AI prompt processing
  • command generation
  • API routing
  • frontend communication
  • Groq API integration

Features

  • AI-powered shell command generation
  • FastAPI REST API
  • Groq LLM integration
  • Prompt engineering for safe command generation
  • CORS-enabled frontend communication
  • Lightweight and fast backend architecture

Tech Stack

Backend

  • Python
  • FastAPI
  • Groq API
  • Uvicorn

AI Integration

  • Groq API
  • Meta Llama 3.1 8B Instant

Project Structure

neoShell_backend/
│
├── .env
├── .gitignore
├── LICENSE
├── README.md
├── requirements.txt
│
├── GenAI.py
├── server.py
└── utils.py

API Endpoint

Generate Command

POST /generate

Request Body

{
  "input": "Show current logged in user"
}

Example Response

{
  "message": "success",
  "data": "whoami"
}

Installation

Clone the repository:

git clone https://github.com/tichita7/neoshell-ai-backend.git

Move into the project directory:

cd neoshell-ai-backend

Create virtual environment:

python -m venv .venv

Activate virtual environment:

Windows

.venv\\Scripts\\activate

Install dependencies:

pip install -r requirements.txt

Environment Variables

Create .env file inside backend root:

GROQ_API_KEY=your_api_key

Run Server

uvicorn server:app --port 8001

Backend runs on:

http://127.0.0.1:8001

Frontend Integration

Connected with NeoShell AI frontend built using:

  • React
  • Tailwind CSS
  • Vite

Frontend communicates using REST API requests.


Example Prompt

Input

Show network configuration

Generated Output

ipconfig

Safety Features

  • Non-destructive command prompting
  • Restricted AI behavior using prompt engineering
  • Invalid request handling
  • Controlled output generation

Author

Tichita Dhiman


License

This project is licensed under the MIT License.

About

FastAPI backend for NeoShell AI powered by Groq and Meta Llama 3.1 for intelligent command generation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages