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.
- 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
- Python 3.8 or higher
- Ollama installed and running locally
- MongoDB (optional, for data persistence)
- Download and install Ollama from ollama.ai
- Pull the required model:
ollama pull qwen3.5:latest
- Start Ollama server (usually runs on localhost:11434)
-
Clone the repository:
git clone https://github.com/Rakesh-Paul01/localcoder.git cd localcoder -
Install Python dependencies:
pip install -r requirements.txt
-
(Optional) Set up MongoDB connection by creating a
.envfile:MONGODB_URI=your_mongodb_connection_string
Run the desktop GUI application:
python src/tkinter/app.pyOr use the standalone version:
python ollama_response.pyRun the web interface:
streamlit run src/streamlit/app.pyBoth interfaces provide:
- Chat interface with the local LLM
- File attachment for code analysis
- Context-aware responses based on attached files
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
- Model: Change the model in
src/ollama/ollama_response.pyby modifying themodelparameter inask_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
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
See LICENSE file for details.