CloudGauge — Real-time cost intelligence directly inside your code editor.
Modern developers write code without visibility into the cloud costs it generates. Costs are only realized after deployment — often leading to unexpected bills.
This project solves that by shifting cost awareness from billing time → coding time.
We provide:
- Real-time cost estimation
- Optimization suggestions
- PR-level cost impact tracking
- Tamper-proof cost logs using Web3
- No cost visibility during development
- Billing feedback delayed by weeks
- Expensive APIs and cloud usage go unnoticed
- No accountability for cost-heavy code changes
“CloudGauge - ESLint for Cloud Costs”
A system that:
- Analyzes your code as you write
- Estimates cloud cost in real time
- Suggests optimizations
- Tracks cost changes across PRs
- Ensures integrity via cryptographic proofs
- Detects cloud/API usage from code
- Estimates monthly cost instantly
- Suggests cheaper alternatives:
- GPT-4 → GPT-3.5
- Add caching
- Batch requests
- Compares cost before vs after changes
- Prevents expensive code merges
- Generates SHA-256 hash of cost reports
- Stores hash on blockchain (Sepolia)
- Ensures reports cannot be modified
- Integrated into VS Code
- Inline feedback + suggestions
- ESLint-like workflow
VS Code Extension
↓
Backend (TypeScript)
↓
AST Analysis Engine
↓
Cost Estimation Engine
↓
Database (Prisma)
↓
Hash Generation (SHA-256)
↓
Blockchain (Sepolia)
- VS Code Extension API
- TypeScript
- Node.js
- AST Parsing (Babel / TypeScript Compiler API)
- Prisma ORM
- PostgreSQL / MongoDB
- Solidity (Smart Contract)
- Ethers.js
- Sepolia Testnet
- Parses code using AST
- Detects usage of:
- LLM APIs
- Cloud services
- External APIs
- Maps usage → pricing models
- Calculates monthly cost projection
- Identifies expensive patterns
- Suggests cost-saving alternatives
- Compares:
- Base branch cost
- New branch cost
- Outputs cost difference
- Converts report → JSON
- Generates SHA-256 hash
- Stores:
- Full report → DB
- Hash → Blockchain
We use Web3 only for verification, not computation.
Cost Report → Hash → Store on Sepolia
- Immutable records
- Verifiable cost history
- Audit-ready system
- Open code in VS Code
- Detect API usage
- Show cost estimate
- Display optimization suggestions
- Show PR cost difference
- Modify report → verification fails (tampering detected)
npm install
npm run devDATABASE_URL=...
RPC_URL=...
PRIVATE_KEY=...
CONTRACT_ADDRESS=...npm install
npm run compile
# Press F5 to run extension- Deploy contract on Sepolia
- Store contract address in
.env
// Before
use GPT-4 → $200/month
// After optimization
use GPT-3.5 → $40/month
// Add caching
→ $15/month- CI/CD integration (PR gating)
- Multi-cloud support (AWS, GCP, Azure)
- Advanced AI-based optimization
- Cost heatmaps in editor
- Enterprise dashboards
- On-chain audit dashboards
Contributions are welcome!
- Fork the repository
- Create a feature branch
- Submit a pull request
“We don’t just show developers that their code is expensive — we tell them how to make it cheaper, instantly.”
MIT License