🧠 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.
Metadata
Release files for ask-git 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ask_git-0.1.4.tar.gz | 9.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ask_git-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.4 kB
Release files / ask_git-0.1.4.tar.gz
| Download URL | ask_git-0.1.4.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01a0517fd754c003627b6fd28cb8305e9c83447eb2cbf2082c702542c7c30872
|
|
BLAKE2b-256 checksum How to use checksums |
8e62262120ec61d563a3b0470597147c43a605d007efb90100986222321077e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.0
|
Release files / ask_git-0.1.4-py3-none-any.whl
| Download URL | ask_git-0.1.4-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff7115762034634ce9d19e6d003e3c55c5b3d57d0a72fb491846a897e6968b8c
|
|
BLAKE2b-256 checksum How to use checksums |
ef23a0cc289d67f10630f19c7dd4e5b7f7e90ca03db41877b2900a68e269602e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.0
|