Skip to content

Rakesh-Paul01/localcoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LocalCoder

LocalCoder is a local LLM-powered coding assistant that runs entirely on your system, providing AI assistance for coding tasks without requiring internet access. It integrates with Ollama to run large language models locally and offers multiple user interfaces for interaction.

Features

  • Local LLM Integration: Uses Ollama to run language models locally (currently configured for qwen3.5:latest)
  • Code File Analysis: Attach and analyze code files for questions and debugging
  • Multiple UI Options:
    • Desktop GUI using Tkinter
    • Web interface using Streamlit
  • LangChain Support: Built with LangChain for advanced AI workflows

Prerequisites

  • Python 3.8 or higher
  • Ollama installed and running locally
  • MongoDB (optional, for data persistence)

Installing Ollama

  1. Download and install Ollama from ollama.ai
  2. Pull the required model:
    ollama pull qwen3.5:latest
  3. Start Ollama server (usually runs on localhost:11434)

Installation

  1. Clone the repository:

    git clone https://github.com/Rakesh-Paul01/localcoder.git
    cd localcoder
  2. Install Python dependencies:

    pip install -r requirements.txt
  3. (Optional) Set up MongoDB connection by creating a .env file:

    MONGODB_URI=your_mongodb_connection_string
    

Usage

Tkinter Desktop App

Run the desktop GUI application:

python src/tkinter/app.py

Or use the standalone version:

python ollama_response.py

Streamlit Web App

Run the web interface:

streamlit run src/streamlit/app.py

Core Functionality

Both interfaces provide:

  • Chat interface with the local LLM
  • File attachment for code analysis
  • Context-aware responses based on attached files

Project Structure

localcoder/
├── src/
│   ├── agents.py          # LangChain agent configurations
│   ├── ollama/
│   │   └── ollama_response.py  # Ollama API wrapper
│   ├── streamlit/
│   │   └── app.py         # Streamlit web interface
│   └── tkinter/
│       └── app.py         # Tkinter desktop interface
├── ollama_response.py     # Standalone Tkinter app
├── requirements.txt       # Python dependencies
└── README.md

Configuration

  • Model: Change the model in src/ollama/ollama_response.py by modifying the model parameter in ask_ollama()
  • Ollama URL: Default is http://localhost:11434/api/generate. Change in the same file if needed
  • File Types: Supported file types for attachment can be modified in the UI files

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

See LICENSE file for details.

About

This is a repository to have a local LLM running on your system to assist you with coding tasks even when there is not internet access

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages