Skip to main content

Git and AI Data Aggregator for Journaling — aggregate git history and AI coding-agent sessions into a time-windowed work log.

Project description

gadaj

Git and AI Data Aggregator for Journaling

gadaj aggregates git commit history and AI coding-agent session data into a time-windowed work log. Give it a window — gadaj -w 4h, gadaj -s yesterday — and it tells you what changed in the repo, which AI models were used, by whom, for how long, and at what cost. The output is ready to paste into a journal entry or hand to an AI for narrative drafting.

Built for small human+AI teams where Claude Code, Aider, or similar agents work alongside humans on the same codebase. gadaj is the missing link between raw session transcripts and a coherent record of the day's work.

══ GIT  2026-04-28 10:00 – 13:25 EEST ════════════════════════════════

  Commits   8 · 51d38b6 – e60d59b
  Authors   Samuel (8)
  Files     7 changed · +672 / -7

══ CLAUDE CODE  2026-04-28 10:00 – 13:25 EEST ════════════════════════

  Sessions  2 in window

  Session 1  10:02 – 11:47  ~1.7h
  Session 2  12:10 – 13:24  ~1.2h   ← most recent

  Model                      In    Out   Cache↑   Cache↓      Cost
  claude-sonnet-4-6         180k  174k    293k     9.6M    ~$6.59
  ──────────────────────────────────────────────────────────────────
  2 sessions total                                          ~$6.59

══ SUMMARY ═══════════════════════════════════════════════════════════

  Window    ~3.4h  (2026-04-28 10:00 – 13:25 EEST)
  Git       8 commits · Samuel
  CC        2 sessions · claude-sonnet-4-6 · ~$6.59
  Total                                                     ~$6.59

Why gadaj?

A new category of small human+AI teams has emerged — 2–5 people working alongside Claude Code, Aider, or other coding agents on the same codebase simultaneously or in sequence. These teams quickly notice a gap: the agent produces work, but there is no easy way to see what happened across a session, who contributed what, or what it cost — especially when a human and one or more agents are working in parallel or in sequence on the same repo.

Existing tools cover only half the picture:

CC session analytics tools (ccusage, claude-monitor, ccstats, claude-token-analyzer) are purely consumption-focused — tokens in, dollars out, plan limits. They have no awareness of git history and no concept of a "work period" that spans multiple sessions or contributors.

Git analytics tools (git-quick-stats, gitinspector, git-dev-time, git-journal) know commits intimately but have zero awareness of AI agents, session costs, or model usage.

AI commit/report tools (commitloom, ai-git-cli, wsr) generate text from git history but don't aggregate multi-source activity data.

The closest adjacent project is git-ai (git-ai-project), which tracks AI attribution at the line level — but it solves code provenance and review, not work logging.

The gap: no tool combines git history + AI session data + multi-contributor time-windowed aggregation into a work log oriented toward human-readable output. gadaj fills this gap. It is not a task tracker, narrative generator, or project manager. It collects evidence and presents it clearly. You decide what story to tell.

Tool Question answered
ccusage, claude-monitor Am I about to hit my token limit?
git-quick-stats, gitinspector How active is this repo over time?
gadaj What did our team (human + AI) actually do in this window?

On the name: like grep or awk, gadaj is a proper noun that earns independence from its expansion. The acronym is a mnemonic, not a contract — as the tool grows to cover more sources, the name stays. Zero collisions on PyPI and GitHub at time of writing.


Install

pip install gadaj

Requires Python 3.8+. Depends only on tomli (automatically installed for Python < 3.11; stdlib tomllib is used on Python 3.11+).


Quickstart

# Summarise the last 4 hours (default)
gadaj

# Everything since yesterday morning, with full commit table
gadaj -s yesterday -c

# JSON output for an AI agent to draft a journal entry from
gadaj -w 8h --json

Usage

gadaj [options]

Time window

All sources are queried against a single time window. These flags control it.

Flag Short Default Description
--window DURATION -w 4h Look back from now: 2h, 1.5d, 90m
--since DATETIME -s Window start. ISO date/datetime, "yesterday", "today", "N hours ago", weekday name
--until DATETIME -u now Window end

--window and --since are mutually exclusive.

Git options

Flag Short Description
--git-range A..B -g Explicit hash range, overrides time window for git
--git-last N Last N commits, ignoring time window
--git-author NAME -a Filter commits to this author (substring match)
--git-filter PATTERN -f Filter by commit message (case-insensitive)
--no-git Exclude git section

Claude Code options

Flag Short Description
--cc-file PATH Use a specific .jsonl instead of scanning by time
--no-cc Exclude Claude Code section

Output options

Flag Short Description
--commits -c Full commits table (default: summary row only)
--json -j Machine-readable JSON
--out FILE -o Write to file instead of stdout
--raw -R Raw token counts (debug)
--tz HOURS -z UTC offset override, e.g. 3, +2, -5, or auto

Examples

# Only git, last 12 commits
gadaj --git-last 12 --no-cc -c

# Only CC sessions from the last 2 days
gadaj -s "2 days ago" --no-git

# Filter to commits touching a specific area
gadaj -w 1d -f "software-factory" -c

# One author's commits this week
gadaj -s monday -a Samuel --no-cc -c

# Pipe JSON to another tool
gadaj -w 8h --json | jq '.summary'

Configuration

gadaj reads config from ~/.config/gadaj/config.toml, created with defaults on first run. To override for a specific repo, add .gadaj.toml at the repo root.

[authors]
"Your Full Name"  = "YourNick"
"Collaborator"    = "Nick"

[pricing]
# (input, output, cache_write, cache_read) — $/MTok
"claude-sonnet-4-6"         = [3.00, 15.00, 3.75, 0.300]
"claude-opus-4-6"           = [15.00, 75.00, 18.75, 1.500]
"claude-haiku-4-5-20251001" = [0.80, 4.00, 1.00, 0.080]

[defaults]
window = "4h"
tz     = "auto"   # or e.g. "2", "3"

Update [pricing] when Anthropic changes rates. Update [authors] when your team changes. Neither requires touching the package itself.


JSON output

gadaj --json emits a stable schema suitable for downstream scripts or AI agents. The summary key is first so an agent can stop reading early if it only needs the overview.

{
  "summary": {
    "total_cost_usd": 6.59,
    "contributors": [...]
  },
  "window": {
    "since": "2026-04-28T10:00:00+00:00",
    "until": "2026-04-28T13:25:00+00:00",
    "duration_hours": 3.4
  },
  "git": { "commits": [...], "files_changed": 7, ... },
  "cc":  { "sessions": [...], "models": {...}, "total_cost_usd": 6.59 }
}

The schema is stable across patch versions. Breaking changes require a minor version bump. See design.md §6 for the full schema definition.


How gadaj finds Claude Code sessions

Claude Code writes .jsonl session files to ~/.claude/projects/<hashed-path>/. gadaj hashes the current working directory the same way CC does, scans all .jsonl files in that directory, and includes any whose timestamp range overlaps the requested window — regardless of how many sessions that covers.

Sessions with a gap of more than 30 minutes between them are flagged in output (⚠ Xm gap). Parallel sessions (overlapping timestamps, e.g. two agents running at the same time) are labelled [parallel].

If you want to analyse a session from a different project, use --cc-file PATH to point directly at a .jsonl file.


Adding a new source

gadaj uses a simple collector protocol. To add support for Aider, OpenRouter, Toggl, or any other source:

  1. Create gadaj/collectors/<name>.py
  2. Subclass Collector and implement two things:
from gadaj.collectors.base import Collector

class AiderCollector(Collector):

    @property
    def source_name(self) -> str:
        return "Aider"

    def collect(self, since, until) -> list:
        # Parse Aider's .aider.chat.history.md or similar log file
        # Filter to the given window
        # Return a list of model instances
        ...
  1. Register it in cli.py alongside GitCollector and CCCollector

No other files need to change. See design.md §4 for the full protocol including the available property for graceful degradation when a source is not present.


Development

git clone https://github.com/sjjsy/gadaj
cd gadaj
pip install -e ".[dev]"
pytest
pytest --cov=gadaj --cov-report=term-missing

gadaj has one runtime dependency (tomli) only on Python < 3.11. Dev dependencies are pytest and pytest-cov.

For architecture, data models, testing strategy, and design decisions, see design.md.


Changelog

See CHANGELOG.md.


License

MIT

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

gadaj-0.1.0.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gadaj-0.1.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file gadaj-0.1.0.tar.gz.

File metadata

  • Download URL: gadaj-0.1.0.tar.gz
  • Upload date:
  • Size: 36.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gadaj-0.1.0.tar.gz
Algorithm Hash digest
SHA256 228f23a4185b0382efe0b39696ad8943bd7bcfbfdebba506e4231388b8f7eb41
MD5 f64aa74f77318051af27c88370a64f61
BLAKE2b-256 f8fbe1fcb147e5ccf08a6843d6edac894792750d70db6e37703268b9e1ec1f61

See more details on using hashes here.

Provenance

The following attestation bundles were made for gadaj-0.1.0.tar.gz:

Publisher: python-publish.yml on sjjsy/gadaj

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gadaj-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gadaj-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gadaj-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1afdb90fc3d2753e0c5e5ca8dab6caf571ed8bd9013043122b30f8c5b81b6bea
MD5 be44da8cdb057ab49236a38cee0f6c9c
BLAKE2b-256 3e95bf5992c8134a5a5208e4cb017c7cecca69c0fae03fd8b903691a2700d6a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for gadaj-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on sjjsy/gadaj

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page