codestrain

Your AI coding recovery score, from the terminal. Parses Claude Code JSONL sessions β†’ cost, tokens, DRS estimate, per-project breakdown. Zero deps, Python 3.9+.

13
0
89% credibility
Found May 21, 2026 at 13 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

CodeStrain is a privacy-focused tool that reads your Claude Code session logs stored on your computer and transforms them into meaningful insights about your AI-assisted coding habits. It calculates a 'Developer Recovery Score' that estimates how well you're recovering from coding strain based on factors like hours coded, error patterns, time of day, and time since your last session. The tool shows you statistics like total sessions, duration, tokens used, and cost, broken down by project. Everything happens locally on your machineβ€”your data never leaves your computer. It's designed for developers who want to understand their AI coding patterns and make healthier decisions about their work habits.

How It Works

1
πŸ’¬ A friend mentions CodeStrain

Someone tells you about a tool that shows your AI coding habits and tells you if you're burning out.

2
⬇️ You install it in one command

You run a simple install command and it appears on your computer, ready to use.

3
πŸš€ You run it and see your stats

You type a simple command and it instantly reads your coding sessions, showing you how much you've used AI assistance.

4
πŸ“Š Your recovery score appears

A colorful display shows your strain level, recovery percentage, and whether you're ready for more work or need a break.

5
You explore your data
πŸ“…
View all-time stats

See everything you've ever done with AI coding, including total cost and time spent.

🎯
Filter by project

Focus on just one project to see how much work went into it.

πŸ”’
Anonymize results

Hide real project names so you can safely share or screenshot your stats.

6
🌐 Share with a single link

With one click, you can create a shareable link that shows your anonymized report to anyone.

βœ… You understand your coding patterns

You now know your AI coding habits, how much you're straining yourself, and whether you need to take it easy.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 13 to 13 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is codestrain-cli?

CodeStrain is a Python CLI that reads your local Claude Code session logs and prints a summary of your AI-assisted coding activity: total spend, token usage, and a "Developer Recovery Score" (DRS) that estimates how burned out you might be. The tool parses the JSONL files Claude Code already writes to disk, calculates costs from token counts using current model pricing, and breaks down stats per project. It runs entirely offline with zero external dependencies β€” just standard library Python.

Why is it gaining traction?

The hook is the DRS metric: a single number that tells you whether you should take a break today, based on your coding hours, error rate, late-night sessions, and time since your last session. Developers using Claude Code heavily care about tracking their spend and usage, and CodeStrain surfaces that without requiring any API keys or data leaving the machine. The `--share` flag that encodes the entire report into a URL for easy sharing is a clever privacy trick. It also respects `NO_COLOR` and detects your terminal width to scale the ASCII logo.

Who should use this?

Developers who use Claude Code as their primary coding assistant and want visibility into their usage patterns and costs. Teams exploring AI coding assistants want per-project breakdowns before committing. Solo developers curious about their work patterns might find the DRS useful, though it's explicitly a heuristic estimate β€” not medical advice.

Verdict

A genuinely useful utility for a specific niche. The zero-dependency constraint is impressive, the privacy-first design is refreshing, and the share URL feature is clever. However, at 13 stars and v0.1.8, the project is early-stage with limited community validation. The DRS formula is a rough heuristic that may shift as the team iterates. Try it if you use Claude Code heavily; don't bet critical workflows on it yet.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.