A 100% local, Ollama-powered coding agent that indexes your projects, answers questions about your codebase with RAG, and can autonomously run Git commands and other tools — no cloud, no API keys, no data ever leaves your machine.
Project description
jps-forge
A 100% local, Ollama-powered coding agent that indexes your projects, answers questions about your codebase with RAG, and can autonomously run Git commands and other tools — no cloud, no API keys, no data ever leaves your machine.
🚀 Overview
jps-forge is a privacy-focused AI coding assistant that runs entirely on your local machine using Ollama. It combines retrieval-augmented generation (RAG) with autonomous tool execution to help you understand and work with your codebase without sending any data to external services.
Key Features
- 🔒 100% Local & Private: All processing happens on your machine using Ollama - no cloud APIs, no data leakage
- 📚 Intelligent Code Search: Uses FAISS vector store with sentence transformers for semantic code search
- 🤖 Autonomous Agent: Powered by LangGraph's ReAct agent that can use tools to answer questions
- 🔧 Git Integration: Built-in tools to check repository status and find uncommitted changes
- 💬 Interactive Chat: Rich terminal interface for conversational code exploration
- 🎯 Context-Aware: Retrieves relevant code snippets to provide accurate, contextual answers
How It Works
- Index: Scan your codebase and create vector embeddings of your code
- Query: Ask questions in natural language about your code
- Retrieve: Automatically fetch relevant code context using semantic search
- Act: Agent uses tools (git status, etc.) when needed to gather information
- Answer: Get AI-powered responses grounded in your actual codebase
📦 Installation
Prerequisites
- Python 3.10 or higher
- Ollama installed and running
- An Ollama model pulled (e.g.,
ollama pull llama3.1:8b)
Install from PyPI
pip install jps-forge
Install from Source
git clone https://github.com/jai-python3/jps-forge.git
cd jps-forge
pip install -e .
🎯 Quick Start
1. Configure Your Workspace
Edit the configuration file at ~/.config/jps-forge/config.yaml (or src/jps_forge/conf/config.yaml if running from source):
workspace_roots:
- /path/to/your/project
ollama_model: llama3.1:8b
embedding_model: sentence-transformers/all-MiniLM-L6-v2
2. Index Your Codebase
jps-forge-index
This will:
- Scan your specified workspace directories
- Create vector embeddings of your code
- Store the index in
~/.config/jps-forge/storage
3. Start the Interactive Chat
jps-forge-forge
4. Ask Questions!
you: what is the purpose of this project?
forge: This project is jps-forge, a local AI coding assistant...
you: show me the git status of the current repo
🔧 Using tool: current_repo_status
forge: The repository is on branch main with uncommitted changes...
you: what files have been modified?
forge: Based on the git status, the following files have been modified:
- src/jps_forge/forge.py
- README.md
🛠️ Configuration
Configuration File Location
- Default:
~/.config/jps-forge/config.yaml - Source install:
src/jps_forge/conf/config.yaml
Configuration Options
# Directories to index
workspace_roots:
- /path/to/project1
- /path/to/project2
# Patterns to ignore during indexing
ignore_dirs:
- node_modules
- __pycache__
- .git
- venv
- .venv
- dist
- build
# File types to index
glob_patterns:
- "**/*.py"
- "**/*.md"
- "**/*.js"
- "**/*.ts"
# ... add more patterns as needed
# Ollama model to use for chat
ollama_model: llama3.1:8b
# HuggingFace model for embeddings
embedding_model: sentence-transformers/all-MiniLM-L6-v2
🧰 Available Tools
The agent has access to the following tools:
list_dirty_repos(): Find all git repositories with uncommitted changescurrent_repo_status(): Get git status of the current working directorygit_status(repo_path): Get git status of a specific repository
🧪 Development
Setup Development Environment
# Clone and install with dev dependencies
git clone https://github.com/jai-python3/jps-forge.git
cd jps-forge
pip install -e '.[dev]'
Run Tests
make test
Code Quality
# Auto-fix imports and formatting
make fix
# Format code with black
make format
# Run linting
make lint
Pre-commit Hooks
# Install pre-commit hooks
pre-commit install
# Run manually on all files
make precommit
📋 Requirements
- Python 3.10+
- Ollama (running locally)
- Git
- Required Python packages (installed automatically):
- langchain
- langchain-community
- langchain-huggingface
- langchain-ollama
- langgraph
- faiss-cpu
- sentence-transformers
- gitpython
- rich
- PyYAML
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📜 License
MIT License © Jaideep Sundaram
🙏 Acknowledgments
- Ollama for local LLM inference
- LangChain for the agent framework
- LangGraph for the ReAct agent implementation
- FAISS for vector similarity search
- Sentence Transformers for text embeddings
🔮 Roadmap
- Add more development tools (run tests, search code, refactor, etc.)
- Support for multiple programming languages
- Code modification and file creation capabilities
- Integration with more version control systems
- Custom tool plugins
- Web UI option
- Multi-repo workspace management
Note: This tool requires Ollama to be running. Make sure you have Ollama installed and at least one model pulled before using jps-forge.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jps_forge-0.2.0.tar.gz.
File metadata
- Download URL: jps_forge-0.2.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6d2f01f2d96dbcd3946ab1600da2ad4148d37847de7ae382f7845083c659ad4
|
|
| MD5 |
e6759d86d8e28c64c2d475e33827fe0b
|
|
| BLAKE2b-256 |
382e2dd89bc46a68c5e82cf7d1998ba7ae65f0633f63c607c0748c7f25574ec7
|
File details
Details for the file jps_forge-0.2.0-py3-none-any.whl.
File metadata
- Download URL: jps_forge-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dbe9ddacabf08791db4eaf894c836ee14676082ea3dd752b0c9ebe96446aeb5
|
|
| MD5 |
7c68d370c42c3ce711d5b70fcc52092e
|
|
| BLAKE2b-256 |
282d6793de235f75a27d598f22d0fb6200341f6ac7905d195b2e6394e75f6b2c
|