Shift-left carbon analysis for Terraform โ suggests lower-carbon cloud regions in pull requests.
Project description
๐ฑ CarbonGate
Shift-left carbon analysis for Terraform. Suggests lower-carbon cloud regions right in your Pull Requests.
CarbonGate is a deterministic, zero-token, zero-latency CLI tool that analyzes Terraform infrastructure diffs and recommends AWS regions with lower carbon intensity โ before you merge.
The Sweet Spot
You give away the software (free, open-source, runs on their own CI runner). You sell the data (fresh Parquet feed with real-time carbon intensity from emissions.dev). No dashboards. No LLM hallucinations. Just a YAML file, a ruthless parser, a DuckDB engine faster than electricity, and a gate (the data) that you control.
For buyers & sales calls
One-page pitch (FR), demo script, pricing summary, objections: docs/SALES_ONE_PAGER.md ยท product sheet: docs/FICHE_PRODUIT.md.
For executives (FR)
IMPACTยฉ methodology โ audit framework, ROI ranges, CSRD scope, 3ร fee-back guarantee.
IMPACT Pre-Scan โ qualification 1 repo + call 30 min โ livrable 1 page (gratuit sous conditions).
Case study #0 โ public terraform-aws-vpc demo (~86 % modeled carbon savings eu-west-1 โ eu-north-1; not a paying client).
Trigger events playbook โ CSRD / FinOps signals, CFO outreach, CHASE prioritization.
Executive audit template: gtm/templates/audit_report_exec.md ยท KPI Shield: CFO / CTO.
How It Works
Developer pushes Terraform on GitHub
โ
โผ
GitHub Action triggers (ubuntu-latest)
โ
โโโ 1. Parse diff โ extract AWS regions (regex, <0.1s)
โโโ 2. Query DuckDB over Parquet โ find lowest-carbon alternative in same zone (0.01s)
โโโ 3. If savings โฅ 30%, format Markdown PR comment
โโโ 4. Post comment via GitHub API
No API call per PR run. The intelligence is baked into the Parquet file. Your compute cost: $0.00.
Quick Start
pip install carbongate
carbongate --diff-file path/to/pr.diff
carbongate --hcl-file main.tf --tfvars-file terraform.tfvars # optional
carbongate --plan-json plan.json # terraform plan -json
carbongate --plan-json plan.json --json # machine-readable output
# New in v0.6.0
carbongate --region eu-west-1 # analyze a single region directly
carbongate --list-regions # show all 28 supported regions
carbongate --region eu-west-1 --output-format csv # CSV export for spreadsheets
# New in v0.7.0 โ Graph Algorithms, TimeSeries, Predict & Dashboard
carbongate graph --algorithm pagerank # identify backbone regions
carbongate graph --algorithm migration-priority # composite migration ranking
carbongate graph --algorithm shortest-path --region eu-west-1 --target eu-west-3
# Predict cost savings from migrating to a lower-carbon region
carbongate predict --from eu-west-1 --to eu-north-1 --monthly-cost 2000 --months 12
carbongate predict --diff-file pr.diff --monthly-cost 2000 # batch-analyze all regions in diff
carbongate predict --report --monthly-cost 2000 --json # CFO report across all 28 regions
# Generate an interactive HTML dashboard
carbongate dashboard --serve --port 8080
# New in v0.7.1 โ Cache metrics & Prometheus
carbongate predict --report --json | python -c "from carbongate.query_engine import get_cache_metrics, get_prometheus_metrics; print(get_cache_metrics())"
Install with MCP support: pip install carbongate[mcp]
Agent-native usage (MCP)
CarbonGate exposes an MCP server for AI agents (Claude, Cursor, etc.):
carbongate serve
Configure your MCP client:
{
"mcpServers": {
"carbongate": {
"command": "carbongate",
"args": ["serve"]
}
}
}
Tools exposed:
| Tool | Input | Description |
|---|---|---|
| analyze_plan | plan_json_path |
Analyze a terraform plan -json file for carbon savings |
| analyze_diff | diff_path + tfvars_path? + threshold_pct? |
Analyze a git diff file for carbon savings |
| suggest_region | region |
Get the best lower-carbon alternative for an AWS region |
JSON output is versioned (schema_version: 1) for agent workflow stability.
JSON Schema available for automated validation.
MCP example: analyze a diff
# Agent calls via MCP โ no shell required
analyze_diff(
diff_path="/path/to/terraform.diff",
tfvars_path="/path/to/terraform.tfvars", # optional: resolves var.region
threshold_pct=20.0 # optional: lower threshold
)
# โ {"schema_version": 1, "suggestions": [{"current_region": "us-east-1", ...}]}
From source (dev):
git clone https://github.com/carbongate/carbongate.git && cd carbongate
pip install -e ".[dev]"
carbongate --diff-file tests/fixtures/sample.diff
Regenerate carbon data (optional): EMISSIONS_DEV_API_KEY=em_live_xxxx python data_packer.py
Output Example
## ๐ฑ CarbonGate Shift-Left Analysis
โ ๏ธ **Optimization detected** for your infrastructure deployment:
- **Current Region:** `us-east-1` (Carbon: 322.0 gCOโeq/kWh)
- **Suggested Region:** `us-west-2` (Carbon: 122.5 gCOโeq/kWh)
๐ฐ **Estimated Carbon Savings:** `62.0%`
๐ **Spot Price Multiplier:** `0.8x` (Lower is cheaper)
> ๐ก **Action:** Consider updating your Terraform config to use the suggested
> region(s) and reduce both carbon footprint and cloud costs.
Architecture
carbongate/
โโโ data_packer.py # Polars โ Fetches real CI from emissions.dev, writes Parquet
โโโ query_engine.py # DuckDB in-process: get_best_alternative(region) โ dict
โ # + batch_get_best_alternatives() (batch API, ~200 ยตs for 28 regions)
โ # + _TimedLRUCache (TTL 300 s, maxsize 64) + Prometheus metrics
โโโ tf_parser.py # Deterministic regex + plan JSON: extract AWS regions
โโโ judge.py # Decision engine: โฅ30% savings threshold, Markdown + JSON
โโโ carbongate_cli.py # Typer CLI entry point (carbongate analyze / serve / graph / predict / dashboard)
โโโ mcp_server.py # MCP server for AI agent integration (3 tools + 7 graph algorithms)
โโโ graph_algorithms.py # PageRank, betweenness, Louvain, shortest path, migration priority
โโโ timeseries.py # Historical CI tracking, cost prediction, compound effect
โโโ dashboard_generator.py # Interactive HTML dashboard with visualizations
โโโ dream_cycle.py # Nightly cron automation: batch migration analysis + briefing generation
โโโ entrypoint.sh # GitHub Action entrypoint (fetches diff via API)
โโโ Dockerfile # python:3.12-slim, ready for GitHub Actions
โโโ action.yml # GitHub Action definition
โโโ pyproject.toml # Package metadata (pip install .)
โโโ data/
โโโ eu/eu_carbon.parquet # EU region carbon data
โโโ us/us_carbon.parquet # US region carbon data
Module Dependency Graph
โโโโโโโโโโโโโโโ
โ carbongate_cli โ Typer CLI (analyze / serve / graph / predict / dashboard)
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโ
diff.txt โโโบโ judge.py โ Decision engine (โฅ30% threshold)
plan.json โโบโ (analyze_diff / โ Markdown + JSON formatter
โ analyze_plan) โ
โโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโ
โ โ
โโโโโโโโโโผโโโ โโโโโโผโโโโโโโโโโโ
โ tf_parser โ โ query_engine โ DuckDB over Parquet
โโโโโโโโโโโโโ โ + _TimedLRUCache + batch API
โโโโโโฌโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโผโโโโโโโโโโโ
โ data_packer.py โ Polars โ Parquet
โ emissions.dev โ Real CI data
โโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Ancillary modules (not in core pipeline) โ
โ โโโ graph_algorithms.py โ PageRank, betweenness, ... โ
โ โโโ timeseries.py โ predict_cost_savings() โ
โ โโโ dashboard_generator.py โ HTML dashboard โ
โ โโโ dream_cycle.py โ nightly cron + briefing โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Data Flow
emissions.dev API (real CI data)
โ
โผ
data_packer.py โโโ Polars DataFrame โโโโบ data/{eu,us}/*.parquet
โ
โผ
query_engine.py โโโ DuckDB read_parquet() โโโโบ get_best_alternative()
โ
โผ
tf_parser.py โโโ extract regions from diff โโโบ judge.py โโโบ Markdown PR comment
Region coverage
| Detected in PR diff | Notes |
|---|---|
Literal region = "eu-west-1" |
provider, resources, locals |
availability_zone |
Mapped to region when possible |
region = var.region |
Resolved if terraform.tfvars / --tfvars-file sets region or aws_region |
| Auto tfvars | terraform.tfvars, *.auto.tfvars, *.tfvars next to input file |
Not covered (yet): unresolved var.region without tfvars, hourly carbon scheduling.
See Infracost integration, PyPI publish checklist, and sales one-pager (demo commands, pricing, objections).
Supported Regions
| Region | Provider | Country | Data Source | Best EU/US pair (feed) | Typical savings |
|---|---|---|---|---|---|
eu-west-1 |
AWS | Ireland | emissions.dev (IE) | โ eu-north-1 |
~86% |
eu-west-2 |
AWS | United Kingdom | emissions.dev (GB) | โ eu-north-1 |
~84% |
eu-west-3 |
AWS | France | emissions.dev (FR) | โ eu-north-1 |
~17% (below threshold) |
eu-central-1 |
AWS | Germany | emissions.dev (DE) | โ eu-north-1 |
~90% |
eu-north-1 |
AWS | Sweden | emissions.dev (SE) | already optimal | โ |
us-east-1 |
AWS | Virginia | eGRID 2023 (ร0.92) | โ us-west-2 |
~62% |
us-east-2 |
AWS | Ohio | eGRID 2023 (ร1.25) | โ us-west-2 |
~72% |
us-west-1 |
AWS | California | eGRID 2023 (ร0.55) | โ us-west-2 |
~36% |
us-west-2 |
AWS | Oregon | eGRID 2023 (ร0.35) | already optimal | โ |
us-central1 |
GCP | Iowa | eGRID 2023 (ร0.90) | โ us-west-2 (AWS) |
~72% |
us-east1 |
GCP | South Carolina | eGRID 2023 (ร0.88) | โ us-west-2 (AWS) |
~73% |
europe-west1 |
GCP | Belgium | emissions.dev (BE) | โ eu-north-1 (AWS) |
~85% |
europe-north1 |
GCP | Finland | emissions.dev (FI) | already optimal | โ |
eastus |
Azure | Virginia | eGRID 2023 (ร0.92) | โ us-west-2 (AWS) |
~62% |
westus2 |
Azure | Washington | eGRID 2023 (ร0.30) | already optimal | โ |
northeurope |
Azure | Ireland | emissions.dev (IE) | โ eu-north-1 (AWS) |
~86% |
swedencentral |
Azure | Sweden | emissions.dev (SE) | already optimal | โ |
Savings are vs the lowest-carbon region in the same zone (EU or US), using the bundled Parquet feed. See query_engine.get_best_alternative().
30% savings threshold
CarbonGate only posts a PR comment when estimated carbon savings are โฅ 30% (SAVINGS_THRESHOLD_PCT in judge.py, overridable with --threshold). This avoids noisy suggestions for marginal gains.
Silent output is expected, not a bug, when:
- The region is already near-optimal in its zone (e.g.
eu-west-3at ~42 gCOโeq/kWh vseu-north-1at ~35 โ ~17% savings, below threshold). - No resolvable region in the diff (e.g.
var.regionwithout tfvars, or only removed lines).
Example โ eu-west-3 (no suggestion):
carbongate --diff-file tests/fixtures/eu-west-3-only.diff
๐ Analyzing diff for carbon optimization opportunities...
โ
No carbon optimization detected (all regions within 30% of optimal).
Example โ eu-west-1 (suggestion emitted):
carbongate --diff-file gtm/audits/terraform-aws-vpc/audit_input.diff
## ๐ฑ CarbonGate Shift-Left Analysis
...
๐ฐ **Estimated Carbon Savings:** `86.4%`
CLI options
| Command / Flag | Description |
|---|---|
analyze --diff-file |
Git diff from PR |
analyze --hcl-file |
Static .tf scan (synthetic diff) |
analyze --plan-json |
terraform plan -json / terraform show -json output |
analyze --tfvars-file |
Explicit tfvars (repeatable); also auto-discovered |
analyze --threshold |
Min savings % to comment (default 30) |
analyze --api-key |
Fresh Parquet from emissions.dev |
analyze --json |
Machine-readable JSON output (all input modes) |
analyze --output-format csv |
CSV export for spreadsheets |
analyze --region |
Analyze a single cloud region directly |
analyze --list-regions |
List all 28 supported regions |
serve |
Start MCP server for AI agent integration |
graph --algorithm |
Run graph algorithms (pagerank, betweenness, louvain, shortest-path, migration-priority) |
predict --from --to |
Predict cost & carbon savings from migrating |
predict --diff-file |
Batch-analyze all regions in a diff |
predict --report |
CFO report across all 28 regions |
dashboard --serve |
Generate interactive HTML dashboard |
Configuration
| Variable | Required | Description |
|---|---|---|
EMISSIONS_DEV_API_KEY |
No | emissions.dev API key (free: 500 req/month). Without it, uses realistic mock data. |
Using the Action (published vs local)
Published (after release on GitHub):
- uses: carbongate/carbongate@v0.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
api-key: ${{ secrets.CARBONGATE_API_KEY }}
Same repository (development):
- uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
See GitHub Marketplace checklist.
GitHub Action Setup
Add to .github/workflows/carbongate.yml (or use cost + carbon with Infracost):
name: CarbonGate Analysis
on:
pull_request:
paths:
- '**/*.tf'
- '**/*.tfvars'
jobs:
carbongate:
runs-on: ubuntu-latest
steps:
- uses: carbongate/carbongate@v0.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
api-key: ${{ secrets.CARBONGATE_API_KEY }}
Tech Stack
| Component | Technology | Why |
|---|---|---|
| Data processing | Polars | Zero-copy, columnar, faster than Pandas |
| Query engine | DuckDB | In-process OLAP, reads Parquet in <1ms |
| CLI | Typer | Type-safe Click wrapper |
| Data format | Apache Parquet | Compressed columnar, 2MB per zone |
| Data source | emissions.dev | Free tier, annual CI per country + cloud region |
| Packaging | Docker / pip | GitHub Action + PyPI ready (85 pytest) |
Performance
- Parse diff: <0.1s (regex)
- Query DuckDB: <0.01s (in-memory Parquet)
- Batch query (28 regions): ~200 ยตs (cached)
- End-to-end: <0.2s
- API calls per PR run: 0 (data pre-baked in Parquet)
- Compute cost per PR: $0.00
Cache Performance
The DuckDB query engine uses a _TimedLRUCache (maxsize=64, TTL=300 s) to avoid redundant Parquet reads:
from carbongate.query_engine import get_cache_metrics
print(get_cache_metrics())
# {'hits': 42, 'misses': 2, 'entries': 2, 'hit_rate': 95.45,
# 'avg_lookup_us': 0.234, 'evictions': 0}
Prometheus exposition format (get_prometheus_metrics()) can be exposed on a /metrics endpoint for scraping.
License
MIT
CarbonGate โ Analyse Carbone Shift-Left pour Terraform
๐ซ๐ท Franรงais
CarbonGate est un outil CLI dรฉterministe, zรฉro-token, zรฉro-latence qui analyse les diffs d'infrastructure Terraform et recommande des rรฉgions AWS avec une intensitรฉ carbone plus faible โ avant le merge.
Le Sweet Spot
Tu donnes le logiciel (gratuit, open-source, tourne sur leur propre runner CI). Tu vends la donnรฉe (feed Parquet frais avec l'intensitรฉ carbone temps rรฉel d'emissions.dev). Pas de dashboards. Pas d'hallucinations LLM. Juste un fichier YAML, un parser impitoyable, un moteur DuckDB plus rapide que l'รฉlectricitรฉ, et une porte d'entrรฉe (la donnรฉe) que tu contrรดles.
Comment รงa marche
Le dรฉveloppeur pousse du Terraform sur GitHub
โ
โผ
GitHub Action se dรฉclenche (ubuntu-latest)
โ
โโโ 1. Parse le diff โ extrait les rรฉgions AWS (regex, <0.1s)
โโโ 2. Interroge DuckDB sur le Parquet โ trouve l'alternative la moins carbonรฉe dans la mรชme zone (0.01s)
โโโ 3. Si รฉconomies โฅ 30%, formate un commentaire Markdown PR
โโโ 4. Poste le commentaire via l'API GitHub
Aucun appel API par exรฉcution de PR. L'intelligence est prรฉ-cuite dans le fichier Parquet. Ton coรปt compute : 0,00 โฌ.
Dรฉmarrage Rapide
git clone https://github.com/carbongate/carbongate.git
cd carbongate
pip install -e ".[dev]"
export EMISSIONS_DEV_API_KEY=em_live_xxxx # Gratuit sur https://emissions.dev
python data_packer.py
carbongate --diff-file chemin/vers/terraform.diff
# Analyse batch de toutes les rรฉgions (~200 ยตs)
carbongate predict --report --monthly-cost 2000 --json
# Graph algorithms
carbongate graph --algorithm pagerank
# Dashboard interactif
carbongate dashboard --serve
Architecture
carbongate/
โโโ data_packer.py # Polars โ Rรฉcupรจre CI rรฉelle d'emissions.dev, รฉcrit Parquet
โโโ query_engine.py # DuckDB in-process : get_best_alternative(region) โ dict
โ # + batch_get_best_alternatives() (batch API, ~200 ยตs pour 28 rรฉgions)
โ # + _TimedLRUCache (TTL 300 s, maxsize 64) + mรฉtriques Prometheus
โโโ tf_parser.py # Regex dรฉterministe : extrait les rรฉgions du diff git
โโโ judge.py # Moteur de dรฉcision : seuil โฅ30%, formatage Markdown + JSON
โโโ carbongate_cli.py # Point d'entrรฉe CLI Typer (analyze / serve / graph / predict / dashboard)
โโโ mcp_server.py # Serveur MCP pour intรฉgration agent IA (3 tools + 7 graph algorithms)
โโโ graph_algorithms.py # PageRank, betweenness, Louvain, shortest path, migration priority
โโโ timeseries.py # Historique CI, prรฉdiction de coรปts, compound effect
โโโ dashboard_generator.py # Dashboard HTML interactif avec visualisations
โโโ dream_cycle.py # Automation nocturne : analyse batch + gรฉnรฉration de briefing
โโโ entrypoint.sh # Entrypoint GitHub Action
โโโ Dockerfile # python:3.12-slim, prรชt pour GitHub Actions
โโโ action.yml # Dรฉfinition GitHub Action
โโโ pyproject.toml # Mรฉtadonnรฉes package (pip install .)
โโโ data/
โโโ eu/eu_carbon.parquet
โโโ us/us_carbon.parquet
Rรฉgions supportรฉes
| Rรฉgion AWS | Pays | Source donnรฉes | Meilleur pair (feed) | รconomie typique |
|---|---|---|---|---|
eu-west-1 |
Irlande | emissions.dev (IE) | โ eu-north-1 |
~86 % |
eu-west-2 |
Royaume-Uni | emissions.dev (GB) | โ eu-north-1 |
~84 % |
eu-west-3 |
France | emissions.dev (FR) | โ eu-north-1 |
~17 % (sous seuil) |
eu-central-1 |
Allemagne | emissions.dev (DE) | โ eu-north-1 |
~90 % |
eu-north-1 |
Suรจde | emissions.dev (SE) | dรฉjร optimal | โ |
us-east-1 |
Virginie | eGRID 2023 (ร0.92) | โ us-west-2 |
~62 % |
us-east-2 |
Ohio | eGRID 2023 (ร1.25) | โ us-west-2 |
~72 % |
us-west-1 |
Californie | eGRID 2023 (ร0.55) | โ us-west-2 |
~36 % |
us-west-2 |
Oregon | eGRID 2023 (ร0.35) | dรฉjร optimal | โ |
Seuil 30 %
CarbonGate ne commente une PR que si l'รฉconomie carbone estimรฉe est โฅ 30 % (SAVINGS_THRESHOLD_PCT dans judge.py). Exemple : eu-west-3 (~42 gCOโeq/kWh) vs eu-north-1 (~35) โ ~17 % โ sortie silencieuse (ยซ No carbon optimization detected ยป), pas un bug.
AI / LLM / Agent Usage
For AI Agents (Claude Code, Cursor, Copilot, etc.)
CarbonGate is designed to be operated by AI agents as well as humans. The codebase follows these agent-friendly conventions:
- Single-file modules: each
.pyfile is a self-contained module with a clear single responsibility - Type-safe: all public functions use
TypedDictor explicit return types - Deterministic: zero LLM calls in the pipeline; everything is regex + SQL
- Silent on success: functions return
Nonewhen there's nothing to report; no spam - Idempotent:
data_packer.pycan be re-run safely;query_engine.pyreads latest data - Mock fallback: works without API keys for dev/testing
For LLM Context Windows
When an AI agent reads this project, the optimal files to load are:
| Priority | File | Purpose |
|---|---|---|
| 1 | README.md |
This file โ architecture overview |
| 2 | pyproject.toml |
Dependencies and entry points |
| 3 | cli.py |
Understand the CLI surface |
| 4 | judge.py |
Decision logic + Markdown format |
| 5 | query_engine.py |
DuckDB query patterns |
| 6 | tf_parser.py |
Region extraction regex |
| 7 | data_packer.py |
Data pipeline (only if modifying data sources) |
llms.txt
# CarbonGate โ Shift-left carbon analysis for Terraform
# Architecture (12 files, ~1800 lines)
## Core Pipeline
carbongate_cli.py: Typer CLI (analyze, serve, graph, predict, dashboard)
judge.py: Decision engine (โฅ30% savings threshold), Markdown + JSON formatter
tf_parser.py: hcl2 + regex + plan JSON recursive; tfvars; var.region resolution
query_engine.py: DuckDB in-process query engine over Parquet carbon data
+ _TimedLRUCache (TTL 300s, maxsize 64) with Prometheus metrics
+ batch_get_best_alternatives() โ 2 queries for all 28 regions
+ get_cache_metrics() / get_prometheus_metrics()
## Graph & TimeSeries
graph_algorithms.py: PageRank, betweenness, Louvain, shortest path, migration priority
timeseries.py: predict_cost_savings(), compare_regions_history(), get_compound_value()
dashboard_generator.py: Interactive HTML dashboard with carbon visualizations
## Agent Integration
mcp_server.py: FastMCP server โ 3 core tools + 7 graph algorithms
Entry point: carbongate serve or carbongate-serve
JSON output: schema_version: 1 envelope
## Data Pipeline
data_packer.py: Polars-based ETL. Fetches real CI from emissions.dev API, falls back to mock data.
Reads EMISSIONS_DEV_API_KEY from env. Writes data/{eu,us}/*.parquet.
## Nightly Automation
dream_cycle.py: run_batch_migration_analysis() โ top 10 + per-provider best
generate_briefing() โ Markdown morning briefing
Cron-ready: sys.path guarded, PYTHONPATH in subprocess
## Deployment
action.yml: GitHub Action definition (docker-based)
entrypoint.sh: Extracts PR diff via GitHub API, runs carbongate (supports INPUT_PLAN_JSON_FILE)
Dockerfile: python:3.12-slim with curl, jq, duckdb, polars
pyproject.toml: Package metadata, dependencies, entry points (carbongate, carbongate-serve)
## Data
data/eu/eu_carbon.parquet: EU region carbon intensity (5 AWS + 5 GCP + 9 Azure regions)
data/us/us_carbon.parquet: US region carbon intensity (4 AWS + 4 GCP + 3 Azure regions)
## External APIs
emissions.dev /v1/electricity/grid: country-level grid carbon intensity (free tier: 500 req/month)
GitHub REST API: POST /repos/{owner}/{repo}/issues/{pr_number}/comments
## Key Design Decisions
- Annual average CI (not real-time): structural advantage matters more than hourly fluctuations for infra decisions
- No LLM calls in pipeline: purely deterministic (regex + SQL)
- Data pre-baked as Parquet: zero API calls per PR run, $0 compute cost for user
- Multi-cloud region โ country mapping: static table, no runtime lookups
- 30% savings threshold: avoids noisy suggestions for marginal improvements
- Provider isolation: GCP users never see AWS alternatives (and vice versa)
- Cache invalidation on set_data_dir(): prevents stale data after API refresh
Competitor Landscape (2026)
| Tool | Position | CarbonGate Advantage |
|---|---|---|
| Infracost + InfraCarbon | PR comments, closed backend | Open-source CLI, Parquet data feed, no dashboard lock-in |
| CarbonAware | Scheduling, K8s/Airflow | Pre-merge analysis, not post-deploy |
| Cloud Carbon Footprint | Post-deploy reporting dashboard | Shift-left: catch it before merge |
| Climatiq | General carbon API | Deprecated cloud endpoint (Sep 2026) |
Built with โค๏ธ and DuckDB.
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 carbongate-0.7.1.tar.gz.
File metadata
- Download URL: carbongate-0.7.1.tar.gz
- Upload date:
- Size: 100.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e794a8593d5281147b95987be5c9027282fdecf4f57193d507efa89a2d52e58f
|
|
| MD5 |
f584517300f6c6e0c0fa2b8b6eeb2ab6
|
|
| BLAKE2b-256 |
f569951110b2ed98ef1ca1a7587ab49a177e1757ecfad216fabdca0b4285d44a
|
File details
Details for the file carbongate-0.7.1-py3-none-any.whl.
File metadata
- Download URL: carbongate-0.7.1-py3-none-any.whl
- Upload date:
- Size: 115.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1574efa0e3f90f6ae9817fd44ec71c3b067c757bec56aad1c7838c505e41158
|
|
| MD5 |
822fd69297022a8a9cc03ffec7cd5e26
|
|
| BLAKE2b-256 |
b96c83c7cb04ba0cc9af097d25c20eab68b0149193e05dffecc88d8ce96cb850
|