AI-powered git history narrator — turns your git log into readable stories
Project description
chronicle-ai
AI-powered git history narrator. Turn your
git loginto engaging stories.
```bash $ chronicle file src/auth.py
╭──────────────────────────────────────────────────────────────╮
│ The Story of src/auth.py │
│ 47 commits · 3 contributors · via claude (haiku) │
╰──────────────────────────────────────────────────────────────╯
The Authentication Module's Journey
This file began as a simple password-checking function in January 2023, just three lines that returned a boolean. Within weeks, it became the most-changed file in the repository... ```
`git log` shows you what changed. `chronicle` tells you why.
Why chronicle?
Every codebase has stories hidden in its git history:
- Why was this module rewritten three times?
- What crisis triggered that 200-line commit at 2 AM?
- Which contributor shaped this file the most?
`chronicle` uses AI to read those signals and turn them into narratives that help you understand your codebase — and onboard new engineers — in minutes instead of hours.
Installation
```bash pip install chronicle-ai
With Anthropic Claude (recommended)
pip install 'chronicle-ai[anthropic]'
With OpenAI
pip install 'chronicle-ai[openai]' ```
No API key? Use Ollama for free local inference: ```bash ollama pull llama3.2 chronicle repo --provider ollama ```
Usage
Tell the story of a file
```bash
Narrative style (default)
chronicle file src/auth.py
Chronological timeline
chronicle file src/auth.py --style timeline
Detective mode: WHY did this change so much?
chronicle file src/auth.py --style detective
Focus on recent changes only
chronicle file src/auth.py --since "6 months ago" ```
Tell the story of your entire repo
```bash chronicle repo
Between two versions
chronicle repo --since "2024-01-01" --until "v2.0"
Plain text (pipe-friendly)
chronicle repo --plain > STORY.md ```
Tell the story of a contributor
```bash chronicle author "Alice" chronicle author "alice@company.com" --style timeline ```
Tell the story between two versions
```bash chronicle range v1.0..v2.0 chronicle range main..HEAD --style detective ```
Options
| Option | Description |
|---|---|
| `--style` | `narrative` (default), `timeline`, or `detective` |
| `--since` | Limit to commits after this date (`"6 months ago"`, `"2024-01-01"`) |
| `--until` | Limit to commits up to this ref (tag, branch, SHA) |
| `--provider` | LLM provider: `claude` (default), `openai`, `ollama` |
| `--model` | Override the default model |
| `--max-commits` | Max commits to analyze (default: 100) |
| `--plain` | Plain text output, no Rich formatting |
| `--repo` | Path to the git repo (default: current directory) |
Story Styles
| Style | Best for |
|---|---|
| `narrative` | Understanding the arc of a file or project |
| `timeline` | Structured chronological view of changes |
| `detective` | Investigating WHY something is the way it is |
LLM Providers
| Provider | Setup | Cost |
|---|---|---|
| `claude` | `export ANTHROPIC_API_KEY=...` | ~$0.001 per story |
| `openai` | `export OPENAI_API_KEY=...` | ~$0.001 per story |
| `ollama` | `ollama serve` + `ollama pull llama3.2` | Free (local) |
Full Developer Workflow
```bash
Morning: understand what changed
standup-ai ~/work/myapp --yesterday
Before committing: review your own code
critiq --diff origin/main
Generate commit message + PR description
gpr --commit-run && gpr --pr
Understanding a complex file before a PR review
chronicle file src/payments.py --style detective gitbrief --changed-only --base main | pbcopy
After releasing: generate changelog
changelog-ai v1.0..v2.0 ```
Ecosystem: standup-ai · critiq · gpr · gitbrief · changelog-ai · chronicle-ai
How It Works
- Analyzes git history: Uses `gitpython` to extract commit messages, authors, file changes, and timestamps
- Builds context: Computes statistics (churn, contributors, hotspot files)
- Prompts the LLM: Sends a structured prompt with the right narrative framing
- Returns a story: Formatted in Markdown, rendered with Rich
No code is sent to the LLM — only commit metadata.
License
MIT — see LICENSE
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 git_chronicle-0.1.0.tar.gz.
File metadata
- Download URL: git_chronicle-0.1.0.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c0415bcb1ac84bf9e74a8a69ccb04491f78ca032b1d474d4f0bc0a1d30a1b0c
|
|
| MD5 |
c6d7d3a80a1904ec86531bf2ffbcf2d2
|
|
| BLAKE2b-256 |
9debd104977af9cdf86846d7df970f5fd95ccb42a5164e40b32627fd3019e8be
|
File details
Details for the file git_chronicle-0.1.0-py3-none-any.whl.
File metadata
- Download URL: git_chronicle-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
085eb8df04026292f0a7f477626fcf89c9c9fded470fa186299e53eb44a02501
|
|
| MD5 |
ab8c40d10dd1db21a601112573930948
|
|
| BLAKE2b-256 |
01e1f4329f6ef3ae3469d9a3b5bbf457d3106b3afd1003d0eb29e7c4bfccf1d3
|