Skip to main content

Chronicle

Local-first developer intelligence. Chronicle records how a software project changes over time, turns that history into signals, and lets you ask questions about it — all stored and analyzed on your own machine.

Chronicle fits naturally into your existing workflow. Point it at a Git project, and it:

  1. Scans your project's history into structured observations (git commits, Django migrations).
  2. Analyzes those observations into actionable findings (new files, changed schema fields …).
  3. Interprets the collected history with AI, answering questions in plain language.

How it works

git history ──► scan ──► observations ──► analyze ──► findings ──► interpret (AI) ──► answers
Django migrations ─┘                     local SQLite     ▲
                                                     keywords + related commits
  • Local-first — everything lives in a .chronicle/ folder inside your project. No accounts, no cloud sync, no telemetry. Your chronicle.db stays yours.
  • Incremental — Chronicle remembers how far it got (scan_state for scanners, analysis_state for analyzers) so repeated runs only process what's new.
  • Extensible — scanners (Scanner) and analyzers (BaseAnalyzer) are pluggable; providers are pluggable too (OpenAI / Gemini).

Requirements

  • Python 3.10+
  • A Git repository (the project root is detected by walking up to the nearest .git directory)
  • pip via the dev extra for running tests

Installation

# clone and enter the repository
git clone https://github.com/Sakshyam-Xtha/Chronicle.git
cd Chronicle

# create a virtual environment (optional but recommended)
python -m venv .venv
source .venv/bin/activate

# install in editable mode (includes the `chronicle` command)
pip install -e ".[dev]"

Verify the CLI is on your path:

chronicle version   # -> Chronicle 0.1.0

Quick start

# 1. Initialize Chronicle in a project (creates .chronicle/ + local DB)
cd /path/to/your/project
chronicle init

# 2. Scan the project history into observations
chronicle scan

# 3. Browse what was recorded
chronicle show
chronicle show --id 1

# 4. Analyze observations into findings
chronicle analyze

# 5. Ask questions about your history (requires an AI provider/key)
chronicle interpret --question "When did we add the User model?"

init, scan, and show need no configuration. Only interpret requires an AI provider.

Command reference

Command Description
chronicle init Create the .chronicle/ directory and initialize the local database
chronicle scan Scan project history into observations (git commits, Django migrations)
chronicle show List all observations; --id <n> shows one observation in detail
chronicle analyze Turn observations into findings via the installed analyzers
chronicle interpret --question "<text>" Ask an AI-backed question about the project history
chronicle config View current configuration; set provider / set model to configure AI
chronicle status Show whether the project is initialized and detected
chronicle version Print the Chronicle version

chronicle status

$ chronicle status
Project: my-project
Root: /path/to/my-project
Git: detected
Chronicle: initialized
Configuration: found

chronicle show

Without arguments it prints a compact table of all observations. With --id <n> it renders a detailed view:

Observation #1
────────────────────────────────────────────
Source:       git
Type:         commit
External ID:  9f8d3a1
Timestamp:    2026-08-21 12:00:00 UTC

Data
────────────────────────────────────────────

Migration observations additionally show App, Migration, Dependencies, and Operations (model / field per operation).

Configuring AI (for interpret)

Chronicle reads its configuration from .chronicle/config.toml:

[chronicle]
version = 1

[ai]
provider = ""
model = ""

Set the provider and model:

chronicle config set provider openai
chronicle config set model gpt-4o

Then export your API key as an environment variable:

export OPENAI_API_KEY="sk-..."     # provider: openai
export GEMINI_API_KEY="..."        # provider: gemini

Check everything is wired up:

chronicle config

What gets recorded

Git commits (scan)

Each commit becomes an observation with:

  • hash, message, author
  • parents (empty for the root commit, one or more for merges)
  • changes — per-file status (A added, M modified, D deleted) and path

Django migrations (scan)

Every migrations/*.py file (ignoring .git, .venv, venv, env, node_modules, __pycache__) is parsed with ast into an observation with:

  • app (application label), name (migration name)
  • dependencies
  • operations — e.g. AddField, RemoveField with model / field details

Findings (analyze)

Analyzers turn observations into findings:

  • GitAnalyzer — flags newly created files (A) with severity: info
  • DjangoMigrationAnalyzer — flags RemoveField (warning) and AddField (info) operations

How interpretation works

chronicle interpret does not dump everything at the model. It:

  1. Tokenizes your question and drops stop words to extract keywords.
  2. Scores every finding by how well it matches those keywords (title, message, data).
  3. Picks the top 10 findings and their related git commits (e.g. the commit that introduced a migration).
  4. Builds a prompt with only that focused context and asks the configured provider.

Project layout

src/chronicle/
├── ai/              # AI provider abstraction (OpenAI, Gemini, factory)
├── analysis/        # analyzers + engine that turn observations into findings
├── cli/             # Typer CLI commands (`scan`, `show`, `analyze`, …)
├── config/          # config.toml management + API key resolution
├── integrations/    # thin wrappers (e.g. git)
├── interpretation/  # question -> context -> prompt -> AI response
├── project/         # discovery, initialization, status
├── scanning/        # scanners + engine that collect observations
│   └── scanners/    # git, django_migrations and their models
└── storage/         # SQLite repositories + schema

Development

Run the test suite:

pip install -e ".[dev]"
pytest test/

The suite is split into:

  • test/unit/ — fast, mocked tests (parsing, storage, contexts, models)
  • test/integration/ — real-git and end-to-end CLI tests (incremental scan checkpoints, migration parsing, merge parents)

Roadmap / status

Chronicle is an early-stage local-first tool (0.1.0). Current scanners cover git and Django migrations; analyzers cover git file additions and Django schema changes; AI interpretation supports OpenAI and Gemini.

License

Not yet specified.

Metadata

Release files for chronicle-devkit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chronicle-devkit 0.1.0
File Size Uploaded Provenance Actions
chronicle_devkit-0.1.0.tar.gz 23.2 kB Without provenance Details for chronicle_devkit-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chronicle-devkit 0.1.0
File Interpreter ABI Platform Actions
chronicle_devkit-0.1.0-py3-none-any.whl Python 3 none any Details for chronicle_devkit-0.1.0-py3-none-any.whl

Total release size: 55.2 kB

Release files / chronicle_devkit-0.1.0.tar.gz

Download URL chronicle_devkit-0.1.0.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f964e4427d6ffa10eae869a4308249543949d2c9d32064c7b419173f9f1af0cd
BLAKE2b-256 checksum
How to use checksums
92082d5dea7601c33bcb922216d7570c040f0dfd7744a065a3be9e3fa8f714ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Release files / chronicle_devkit-0.1.0-py3-none-any.whl

Download URL chronicle_devkit-0.1.0-py3-none-any.whl
Size 32.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1e81b7602539d9e34b8c745ba9882bd72da9e8e3622f26452ff2fe999406cb5
BLAKE2b-256 checksum
How to use checksums
2ed76f21e3c404ca0aaec834b508b6cb9d2fd5d8e32440e2ae26929a536b6044
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Security for chronicle-devkit 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page