deathlog reads your recent git commit history, asks you 3 quick questions about an incident, and uses Claude 3.5 Sonnet to automatically generate a detailed Markdown post-mortem document.
Stop wasting time writing post-mortems manually when you can automate 90% of the work.
pip install deathlogYou'll need an Anthropic API key to use the tool.
export ANTHROPIC_API_KEY="your-key-here"Navigate to any git project folder where an incident occurred and run:
deathlogIt will ask you three questions:
- What broke?
- Who was affected?
- Is it fixed?
And then generate a postmortem-YYYY-MM-DD.md file in the current directory!
If you just want to test the CLI flow without an API key, use the --mock flag:
deathlog --mock# Post-Mortem: Payment service timed out
## Summary
The payment service timed out affecting approximately 200 users for 45 minutes. The issue has been identified and resolved.
## Timeline
- **T-0**: Incident began
- **T+15**: Alerts fired
- **T+30**: Root cause identified
- **T+45**: Fix deployed and service restored
## Root Cause
Connection pool exhaustion to the primary database replica under unexpected load spikes.
## Impact
- **What broke**: Payment service timed out
- **Who was affected**: Approx 200 users, 45 mins
- **Is it fixed**: yes
## Action Items
1. Increase connection pool size limits
2. Implement better circuit breakers for the payment service
3. Add specific alerting for connection pool exhaustion