Static analysis tool that detects expensive cloud code patterns and estimates cost impact before deployment
Project description
deburger
Catch expensive cloud code before it ships. Static analysis tool that scans your codebase, detects costly patterns, and estimates your monthly cloud bill impact.
The Problem
Developers write code. Cloud bills arrive. Nobody connects the dots until it's too late. A single for loop with an S3 call inside costs $120/month. Multiply that across a team and you're burning thousands.
The Solution
deburger analyzes your code during development and tells you exactly which lines will cost money in production. No cloud credentials needed. No runtime overhead. Just static analysis that catches expensive patterns before they deploy.
Install
pip install deburger
Quick Start
cd your-project/
deburger init --provider aws
deburger check .
You'll see:
issues found
┏━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ file ┃ line ┃ type ┃ severity ┃ monthly cost ┃ savings ┃
┡━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━┩
│ app.py │ 42 │ s3 in loop │ high │ $120.00 │ $108.00 │
│ api.py │ 15 │ unbounded query │ critical │ $25.00 │ $22.50 │
└────────┴──────┴─────────────────┴──────────┴──────────────┴─────────┘
total monthly waste: $15,301
after optimization: $37
savings: 99.8%
What It Detects
S3/Storage in Loops - Individual API calls instead of batch operations
Missing Connection Pools - New database connections per request
Unbounded Queries - SELECT * without LIMIT causes timeouts and cost
Cold Start Issues - Heavy imports in Lambda functions add latency
Sequential Async - Awaiting in sequence instead of parallel execution
Expensive Logging - High-volume logs in hot paths
Languages Supported
- Python (AST-based analysis)
- JavaScript/TypeScript (pattern detection)
Cloud Providers
- AWS
- Google Cloud Platform
- Microsoft Azure
Commands
deburger init # Create config file
deburger check # Scan code for issues
deburger diff # Compare cost between branches
deburger blame # Show cost by developer
deburger hook # Install pre-commit hook
deburger optimize # Get fix suggestions
Git Hook Integration
Automatically check commits:
deburger hook --install
Now expensive code gets caught before it's committed:
git commit -m "Add feature"
# Hook runs automatically
# Commit blocked if expensive patterns found
CI/CD Integration
Add to GitHub Actions:
- name: Cost Analysis
run: |
pip install deburger
deburger check . --json > cost-report.json
deburger check . || exit 1
Configuration
Customize .deburger.yml for your traffic patterns:
provider: aws
region: us-east-1
traffic:
requests_per_day: 100000
avg_duration_ms: 500
avg_memory_mb: 512
hooks:
fail_on_critical: true
max_monthly_cost: 200
More accurate traffic estimates = more accurate cost predictions.
Real-World Impact
- Startup (5 devs): Found $2,400/month waste, fixed in 2 days
- Mid-size (50 devs): Prevented 23 expensive patterns from reaching production in month 1
- Enterprise (200+ devs): Saved $18,000/year by catching issues in PR reviews
Why deburger?
Static Analysis - No runtime overhead, no performance impact
No Credentials Required - Analyzes code locally, never touches your cloud
Developer-First - Integrates into existing workflows (git, CI/CD, IDE)
Language Agnostic - Works with Python and JavaScript, more coming
Provider Agnostic - Supports AWS, GCP, Azure with same patterns
How It Works
- Parses your code into an AST (Abstract Syntax Tree)
- Detects expensive patterns using static analysis rules
- Calculates cost based on your traffic configuration
- Suggests optimizations with estimated savings
No magic. No AI guessing. Just pattern matching against known expensive antipatterns.
License
MIT
Links
Repository: github.com/sahilnyk/deburger
Issues: github.com/sahilnyk/deburger/issues
PyPI: pypi.org/project/deburger
Built by @sahilnyk
Stop deploying expensive code. 🍔
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 deburger-1.0.0.tar.gz.
File metadata
- Download URL: deburger-1.0.0.tar.gz
- Upload date:
- Size: 45.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54383dae600467f32a7d20897f83feb033ea0da02c40b7171edef21a7f918029
|
|
| MD5 |
f810072e5fd2e3fdc629aae6566af120
|
|
| BLAKE2b-256 |
a22ec96767f978371f91ec7e03eed22a293d26169bb322b05c6841b334f24cc2
|
File details
Details for the file deburger-1.0.0-py3-none-any.whl.
File metadata
- Download URL: deburger-1.0.0-py3-none-any.whl
- Upload date:
- Size: 51.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9f47c468ad1ff991c01c0b2d744a6f2256b8649fa778857be766f00966da4bb
|
|
| MD5 |
40be0e169e13303fb77762ca5c2cca98
|
|
| BLAKE2b-256 |
8af22b46f9317fa470c5fbd93362a55604fea87c5b92fe6281b4fa5991384a4e
|