# SlothLog: Why I Built an Offline, AI-Powered Timesheet Generator for Lazy Developers

> Source: <https://dev.to/alessio_bianchini/slothlog-why-i-built-an-offline-ai-powered-timesheet-generator-for-lazy-developers-2mak>
> Published: 2026-10-21 13:06:14+00:00

*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady](https://dev.to/challenges/hacktoberfest-week3-2026-10-19)*

Every Friday afternoon at 4:30 PM, an invisible cloud of collective dread descends upon software engineering teams: **logging our hours into Jira, Azure DevOps, or corporate time trackers.**

You open your tracking tool, stare at a blank grid of empty days, and begin the painful archaeological dig through your week:

The result? Developers either spend 45 minutes of precious Friday time reconstructing history, or they guess haphazardly, slapping `8.0h - General Development` across every day of the week.

I wanted to be **completely, unapologetically lazy**. 

So I built **SlothLog** (🦥): an offline, privacy-first developer utility that inspects your local git commits across multiple repositories, clusters activity by ticket identifier, estimates work session duration, and synthesizes executive-ready timesheet summaries using **Google Gemma 2 2B** running locally via **Ollama**.

With SlothLog:

`python cli.py scan`.` AB#4920`, `PROJ-104`, `#12`) and session bursts.`"fix bug"`, `"wip typo"`, `"more changes"`) into clean, professional work notes (`"Refactored invoice calculation engine and added VAT reverse charge support"`).
Here is SlothLog in action running locally with its utilitarian dark dashboard:

The web dashboard features an interactive date selector, hour stepper (`+` / `-` 0.25h), tracked repository manager, and single-click copy buttons with instant toast confirmations:

```
+---------------------------------------------------------------------------------------+
| 🦥 SlothLog    Offline AI Timesheets for Lazy Developers    [Gemma 2 2B] [Sentry Active]|
+---------------------------------------------------------------------------------------+
| [ Total Logged: 7.00 h ]    [ Clustered Tickets: 3 ]    [ Effort Saved: ~45 mins ]    |
+---------------------------------------------------------------------------------------+
| [AB#4920] billing-service                                             [-] 3.25h [+]  |
| "Refactored invoice calculation engine, added VAT reverse charge support for European |
|  B2B invoices, and implemented idempotency tests."                                    |
| [ 3 underlying commits ]                                                              |
| [📋 Copy for Jira / DevOps]   [📄 Copy Summary]                                       |
+---------------------------------------------------------------------------------------+
| [PROJ-104] portal-frontend                                            [-] 2.50h [+]  |
| "Implemented OAuth2 PKCE login flow callback and added refresh token rotation."       |
| [📋 Copy for Jira / DevOps]   [📄 Copy Summary]                                       |
+---------------------------------------------------------------------------------------+
```

If you prefer staying in the terminal:

``` bash
$ python cli.py scan --date 2026-10-20

Scanning 2 repositories for date: 2026-10-20...

Generated Timesheet:
Date       | Repo            | Ticket              | Hours | Summary
-----------+-----------------+---------------------+-------+------------------------------------------------------------
2026-10-20 | billing-service | AB#4920             | 3.25h | Refactored invoice calculation engine, added VAT reverse...
2026-10-20 | portal-frontend | PROJ-104            | 2.50h | Implemented OAuth2 PKCE login flow callback...
2026-10-20 | billing-service | General Maintenance | 1.25h | Upgraded dependencies, cleaned up unused imports...

Total Hours: 7.00h
```

You can also export to standard CSV with `python cli.py export -o timesheet.csv` for HR and payroll imports.

Turn your git commits into honest, sensible timesheets — without leaking company code to the cloud.

Every Friday at 4:30 PM, the same ritual happens across engineering teams:

`git log`, scroll frantically through branch names, and end up roughly guessing numbers to hit 8 hours a day.
Most of us waste 30 to 45 minutes every week doing this archaeological reconstruction. And while modern AI tools can summarize text, **pasting internal commit messages and proprietary code into third-party cloud APIs is a fast track to an unpleasant chat with Infosec**.

**SlothLog** fixes this by staying completely local:

The full open-source codebase is hosted on GitHub:

👉 [https://github.com/alessiobianchini/slothlog](https://github.com/alessiobianchini/slothlog)

SlothLog was designed with a strict **anti-overengineering** philosophy: no heavy orchestrators (no LangChain, no LlamaIndex), no external cloud dependencies, and zero telemetry bloat.

The core engine inspects local git histories using native `git log --format=%H|%aI|%an|%ae|%s --date-order`. Commits are grouped by ticket identifier:

`AB#\d+` or `#\d+`
`[A-Z]+-\d+`
`gh-\d+`
`General Maintenance`
To estimate time accurately without snooping or spyware, SlothLog uses a **session clustering algorithm**:

Enterprise developers cannot send proprietary commit messages, internal function names, or company ticket contents to third-party closed AI APIs. Privacy is paramount.

SlothLog queries **Google Gemma 2 2B** via Ollama on `localhost:11434`. Gemma 2 2B is the ideal model for this task: ultra-lightweight, extremely fast on standard laptops, and remarkably proficient at concise extractive summarization without conversational filler.

Here is the exact prompt that produces crisp results:

```
prompt = f"""You are a concise engineering assistant. Summarize these git commit messages into a single professional timesheet accomplishment bullet (1-2 sentences max).
Do not mention commit hashes, dates, or conversational filler. Focus on what was delivered or solved.

Ticket: {ticket_id}
Commits:
{formatted_commits}

Executive Summary:"""
```

If Ollama is not running or offline, SlothLog activates a **graceful deterministic fallback**, generating clean formatted summaries from the raw commits so you are never blocked.

To monitor the local AI execution and observe system health, I instrumented SlothLog with **Sentry SDK's Agent & GenAI Tracing**:

```
with sentry_sdk.start_span(op="gen_ai.chat", description=f"Ollama synthesis: {ticket_id}") as span:
    span.set_data("ai.model_id", "gemma2:2b")
    span.set_data("ai.model_provider", "ollama")
    span.set_data("ai.prompt_tokens", res.get("prompt_eval_count", 0))
    span.set_data("ai.completion_tokens", res.get("eval_count", 0))
    span.set_data("ai.total_tokens", total_tokens)
    span.set_data("ai.cost", 0.0) # Local open-source inference is free!
```

Every synthesis run tracks token throughput, inference latency, and error states. Even better: Sentry confirms that our AI cost is **\$0.00**.

Open innovation is the entire reason SlothLog can exist.

In a corporate environment, developer codebases are strictly confidential. Proprietary APIs from closed vendors pose serious privacy, compliance, and IP risks:

With open-weight models like **Google Gemma 2**, the paradigm shifts:

Open-weight AI gives power back to individual builders.

This entire project — from architecture design and specification to TDD implementation, Sentry tracing, and frontend build — was developed using **Antigravity** pair-programming.

You can inspect the complete design spec and step-by-step TDD verification transcript in the project repository:

`docs/superpowers/specs/2026-10-20-slothlog-design.md`` docs/superpowers/plans/2026-10-20-slothlog.md`
Let's calculate the sloth economics:

**Manual Timesheet Archaeologist**:

That's **98.8% time saved**, 39 extra hours per year spent building actual software (or taking a well-deserved nap). Sloths everywhere rejoice.

I am officially entering SlothLog into the following categories for **Hacktoberfest Open-Source AI Challenge Week 3**:

`gemma2:2b` via Ollama for privacy-preserving, offline commit summarization without API fees.`render.yaml`) with auto-detected environment variables and demo data seeding for instant one-click deployment.`gen_ai.chat` spans measuring prompt/completion token metrics, latency, and \$0.00 cost telemetry.
