Track debugging time spent on AI-generated code
Project description
bugclock
Track exactly how much time your team spends debugging AI-generated code.
Whether you're a solo developer or a 500-person engineering org, bugclock gives you honest data on the real cost of AI-generated code — so you can make smarter decisions about when and how to use it.
Why this exists
Claude writes code fast. But debugging that code takes time — time that's invisible in sprint planning, productivity metrics, and AI ROI discussions.
This tool makes that time visible.
Total debug time (last 30 days): 143.5 min
Average per session: 11.9 min
Most debugged file: src/auth/login.py (4 sessions, 61.5 min)
Install
# Python
pip install bugclock
# JavaScript / Node.js
npm install -g bugclock
Requires Python 3.8+ or Node.js 16+. Works on macOS, Linux, and Windows.
Quickstart (30 seconds)
# 1. Initialize in your project repo
cd your-project/
bugclock init
# 2. Mark Claude-generated files
bugclock mark src/auth/login.py
# — or add a comment anywhere in the file —
# @claude-generated
# 3. Start a debug session
bugclock start -f src/auth/login.py -n "JWT tokens not expiring"
# 4. Fix it, then stop
bugclock stop --resolved
# 5. See your analytics
bugclock report
How it works
Three ways to detect Claude-generated code
| Method | Example |
|---|---|
| Comment marker | Add # @claude-generated to any file (any language) |
| Git commit message | Commits containing [claude] or generated by claude |
| Manual mark | bugclock mark <file> — saved to a team-committable registry |
Auto-inference — zero friction tracking
After bugclock init, a silent post-commit hook runs on every commit:
- Checks if modified files are Claude-generated
- Looks for fix-related keywords in the commit message (
fix,bug,patch,resolve…) - Estimates session duration from file modification timestamps
- Auto-records the debug session — no
start/stopneeded
Your team gets data even when they forget to run any commands.
Commands
bugclock init Set up DB + git hooks in the current repo
bugclock start Begin a debug session
-f / --file <path> File(s) being debugged (repeatable)
-n / --note <text> Note about the bug
bugclock stop End the active session
--resolved / --abandoned Outcome (default: resolved)
bugclock status Show the active session + elapsed time
bugclock report Full analytics dashboard
--days <N> Time window in days (default: 30)
bugclock sessions List recent sessions
--limit <N>
--status resolved|abandoned|active
bugclock scan Find all Claude-generated files in the repo
bugclock mark <file> Manually tag a file as Claude-generated
bugclock export Export data as JSON or CSV
--format json|csv
--days <N>
-o / --output <path>
bugclock uninstall Remove git hooks
Report output
╭─ Claude Debug Tracker last 30 days ─────────────────────────╮
┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐
│ 12 │ │ 10 │ │ 2 │ │ 143.5 min │
│ Total │ │ Resolved │ │ Abandoned │ │ Total Time │
└────────────┘ └────────────┘ └────────────┘ └────────────┘
Daily Debug Time (minutes)
2026-04-12 12.3 ████████░░░░░░░░░░░░
2026-04-13 0.0 ░░░░░░░░░░░░░░░░░░░░
2026-04-14 48.2 ████████████████████
2026-04-15 8.5 █████░░░░░░░░░░░░░░░
Most-Debugged Files
src/auth/login.py 4 sessions 61.5 min
src/api/payments.py 3 sessions 38.0 min
src/utils/parser.py 2 sessions 22.0 min
Team & company usage
Share the file registry with your team
The file registry is just JSON — commit it so every teammate's tracker stays in sync:
git add .claude-tracker/marked_files.json
git commit -m "chore: mark Claude-generated files for debug tracking"
Export for dashboards
# CSV → Excel / Google Sheets / Tableau
bugclock export --format csv --days 90 -o debug_data.csv
# JSON → Grafana / internal dashboards
bugclock export --format json --days 90 -o debug_data.json
GitHub Actions — weekly team report
# .github/workflows/debug-report.yml
name: Weekly Debug Report
on:
schedule:
- cron: "0 9 * * MON" # every Monday at 9am
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install bugclock
- run: bugclock report --days 7
Adding the marker to your files
Any of these work — pick what fits your language:
# @claude-generated ← Python
// @claude-generated ← JavaScript / TypeScript
// generated by claude ← Go
// @claude-generated ← Rust
// @claude-generated ← Java
-- generated by claude ← SQL
Or use your commit message — no file changes required:
git commit -m "[claude] add user authentication flow"
Privacy
| Data | Where it lives | Committed? |
|---|---|---|
| Session timings | .claude-tracker/sessions.db (SQLite) |
No — gitignored |
| Marked file registry | .claude-tracker/marked_files.json |
Optional — your choice |
Nothing is ever sent to any server. The tracker is entirely local.
Contributing
Pull requests are welcome. To get started:
git clone https://github.com/adhithyakiran/bugclock
cd bugclock
pip install -e ".[dev]"
Please open an issue first for large changes.
License
MIT — Adhithya Kiran
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 bugclock-0.1.0.tar.gz.
File metadata
- Download URL: bugclock-0.1.0.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee8e52a6571d93d65d3ccd1c8c40494fd4e912a79b84c5fb9f5e34ae23ca12dd
|
|
| MD5 |
11df64b0b959fa6371a51e3daad31b32
|
|
| BLAKE2b-256 |
422041c434279b3977f37df2275c4a27fca57f88b08b2062b75039800d43b504
|
File details
Details for the file bugclock-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bugclock-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a528f3d0f67686bc4720c34deed983d5c12ad075cfe718772f2f799e14fe8606
|
|
| MD5 |
200f5bbe14c87eaf803df0f386f2b9c0
|
|
| BLAKE2b-256 |
eb48011b263b70afbd95d3a6e9fb39bd7e873323b33620190f7016301e00cd40
|