Skip to content

hari7261/CodeMaster-LLM

Repository files navigation

πŸš€ CodeMaster-LLM

An intelligent code helper application built with Streamlit that combines a live code editor, terminal execution, and AI-powered assistance for multiple programming languages.

✨ Features

  • πŸ“ Interactive Code Editor - Syntax highlighting for Python, JavaScript, Java, C++, and Go
  • ⚑ Live Code Execution - Run Python code instantly with real-time output
  • πŸ€– AI Assistant - Get intelligent help with coding questions and debugging
  • πŸ’¬ Chat Interface - Persistent conversation history with context awareness
  • πŸ”§ Terminal Integration - Execute code with proper error handling and timeout protection
  • πŸŽ›οΈ Customizable Settings - Toggle between explanation modes and clear chat history

πŸ–ΌοΈ Screenshots

Main Interface

CodeMaster-LLM Interface Clean and intuitive interface with code editor, terminal, and chat

AI Assistant in Action

AI Assistant Structured responses with analysis, code fixes, and explanations

πŸ› οΈ Installation

  1. Clone the repository
git clone https://github.com/hari7261/CodeMaster-LLM.git
cd CodeMaster-LLM
  1. Install dependencies
pip install -r requirements.txt
  1. Install Ollama (for AI functionality)
    • Download from ollama.ai
    • Install the required model:
ollama pull gemma3
  1. Run the application
streamlit run app.py

πŸ“‹ Requirements

Create a requirements.txt file with:

streamlit>=1.46.0
ollama>=0.5.0
streamlit-code-editor>=0.1.22

πŸš€ Usage

  1. Code Editor: Write your code in the left panel with syntax highlighting
  2. Run Code: Click "Run Code" to execute Python scripts in the terminal
  3. AI Chat: Ask questions about programming, get code fixes, and explanations
  4. Settings: Toggle explanation modes and manage chat history

🎯 AI Response Structure

The AI provides structured responses:

Explain Mode ON:

  • Analysis: Problem identification
  • Explanation: What's wrong and why
  • Code: Clean solution with minimal comments
  • Implementation: How the fix works
  • Summary: Key takeaways

Explain Mode OFF:

  • Problem: Quick issue identification
  • Code: Direct solution
  • Summary: Brief explanation

πŸ”§ Configuration

  • Python Path: Automatically detects your Python installation
  • Timeout: 10-second execution limit for safety
  • Languages: Support for Python execution (others for syntax highlighting)
  • AI Model: Uses Gemma3 via Ollama

πŸ“‚ Project Structure

CodeMaster-LLM/
β”œβ”€β”€ app.py              # Main Streamlit application
β”œβ”€β”€ requirements.txt    # Python dependencies
β”œβ”€β”€ README.md          # Project documentation
β”œβ”€β”€ screenshot1.png    # Interface screenshot
└── screenshot2.png    # AI assistant screenshot

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Streamlit - For the amazing web framework
  • Ollama - For local AI model execution
  • streamlit-code-editor - For the code editor component

πŸ“§ Contact

Hariom Kumar - @hari7261

Project Link: https://github.com/hari7261/CodeMaster-LLM


⭐ If you found this project helpful, please give it a star!

About

Code helper application built with Streamlit that combines a live code editor, terminal execution, and AI-powered assistance for multiple programming languages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages