Ask Git anything — Powered by Ollama.
Project description
🧠 Ask-Git: Git History Explorer with Local LLMs
Ask-Git is a powerful CLI tool that lets developers understand Git history using natural language. It wraps around Git commands and feeds relevant context to local LLMs (via Ollama) to generate human-readable explanations and summaries — all without uploading your code or commits to the cloud.
🚀 Features
Ask-Git is currently focused on the following capabilities:
✅ Implemented
-
explain <file>
Summarize recent changes made to a specific file.
This combines recent commits, diffs, and blame information to explain how a file evolved. -
summary --since <date> --until <date> [--author <name>]
Summarize commit activity in a date range (optionally filtered by author).
Ideal for understanding what happened during a sprint or review period.
🚧 In Progress
-
why "<question>"
Ask why a feature, line, or change was made (coming soon). -
pr-summary
Generate a pull-request-style summary from recent commits (coming soon).
🛠️ Installation
Ask-Git is a Python CLI tool. Make sure you have Python 3.8+ installed.
You can install it directly from PyPI:
pip install ask-git
Or clone and install from source:
git clone https://github.com/ARJ2211/ask-git.git
cd ask-git
pip install -e .
🧠 Ollama Setup
You need Ollama running locally to use the LLM features.
Install and start Ollama:
ollama serve
Pull a supported model (e.g., CodeLlama):
ollama pull codellama
Make sure it's accessible at http://localhost:11434.
🧾 Usage
Once installed, you can run the tool via the ask-git command:
🔍 Summarize Git Activity
ask-git summary --since 2024-04-01 --until 2024-04-15
Optional filter by author:
ask-git summary --since 2024-04-01 --until 2024-04-15 --author "Alice"
📄 Explain a File's History
ask-git explain path/to/your/file.py
This will pull recent changes to the file and ask the LLM to describe what happened.
⚙️ How It Works
- Uses GitPython and subprocess to gather
git log,diff, andblamecontext. - Builds custom prompts for the LLM to explain or summarize changes.
- Talks to Ollama via HTTP API for local LLM queries (e.g., Mistral, CodeLlama).
- Outputs explanations and summaries directly to your terminal using
rich.
🧪 Development Status
This project is still evolving. Contributions are welcome!
explainandsummaryare stablewhyandpr-summaryare under active development
📩 Contact
Questions or suggestions?
Check out askaayush.com or raise an issue on GitHub.
Project details
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 ask_git-0.1.1.tar.gz.
File metadata
- Download URL: ask_git-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c1d016906d6be6e5abcaf18a612b5945083cb9d806d84369501f60e849aad90
|
|
| MD5 |
a29052f663105e55eba97301f1a80af4
|
|
| BLAKE2b-256 |
8f7abcb33388ca72957f0bbf21a0a9be91255e5b95f01dc9628e332569520818
|
File details
Details for the file ask_git-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ask_git-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a13eeafe15afee827742cf5303f37ee6cdd461a5848ea686fafeb0c633ca214
|
|
| MD5 |
bb43bd3c30582522d1dece1300e0443b
|
|
| BLAKE2b-256 |
fa78880506ddfa350e1c6218c56698ac063f699ab23333d611dd322c764bb2ef
|