Skip to main content

The Climate Intelligence Framework - Build climate-aware applications with AI-driven orchestration

Project description

GreenLang - The Climate Intelligence Framework

PyPI Version Python Support License: MIT Code style: black

Build climate-intelligent applications with the power of AI-driven orchestration. The LangChain of Climate Intelligence is here.

What is GreenLang?

GreenLang is a developer-first Climate Intelligence Framework that brings LangChain-style modularity to sustainable computing. It provides a comprehensive toolkit for building climate-aware applications across industries - from smart buildings and HVAC systems to industrial processes and renewable energy optimization.

Key Features

  • AI-Powered Climate Intelligence: Intelligent agents for automated emissions analysis and optimization recommendations
  • Modular Architecture: Composable packs and pipelines for rapid development
  • Multi-Industry Support: Buildings, HVAC, solar thermal, cement, and expanding
  • Global Coverage: Localized emission factors for 12+ major economies
  • Developer-First Design: Clean CLI, Python SDK, and YAML workflows
  • Type-Safe APIs: 100% typed public interfaces with strict validation
  • Explainable Results: Transparent calculations with full audit trails
  • Real-World Data: Integration with industry-standard datasets and benchmarks

Installation

# Basic installation
pip install greenlang-cli

# With analytics capabilities
pip install greenlang-cli[analytics]

# Full feature set
pip install greenlang-cli[full]

# Development environment
pip install greenlang-cli[dev]

Quick Start

CLI Usage

# Initialize a new GreenLang project
gl init my-climate-app

# Create a new pack for emissions calculation
gl pack new building-emissions

# Run emissions analysis
gl calc --building office_complex.json

# Analyze with recommendations
gl analyze results.json --format detailed

# Execute a pipeline
gl pipeline run decarbonization.yaml

Python SDK

from greenlang import GreenLang
from greenlang.models import Building, EmissionFactors
from greenlang.agents import BuildingAgent, HVACOptimizer

# Initialize GreenLang
gl = GreenLang()

# Create a building model
building = Building(
    name="Tech Campus A",
    area_m2=50000,
    location="San Francisco",
    building_type="office"
)

# Calculate emissions
agent = BuildingAgent()
results = agent.calculate_emissions(
    building=building,
    energy_data=energy_consumption,
    emission_factors=EmissionFactors.get_region("US-CA")
)

# Get optimization recommendations
optimizer = HVACOptimizer()
recommendations = optimizer.optimize(
    building=building,
    current_emissions=results.total_emissions,
    target_reduction=0.30  # 30% reduction target
)

print(f"Current emissions: {results.total_emissions} tCO2e/year")
print(f"Potential savings: ${recommendations.estimated_savings:,.2f}")

YAML Pipelines

# decarbonization_pipeline.yaml
version: "1.0"
name: "Building Decarbonization Analysis"

stages:
  - name: data_collection
    type: ingestion
    sources:
      - type: energy_bills
        format: csv
      - type: occupancy_sensors
        format: json

  - name: emissions_calculation
    type: calculation
    agent: BuildingAgent
    parameters:
      include_scope3: true
      use_regional_factors: true

  - name: optimization
    type: analysis
    agent: DecarbonizationAgent
    parameters:
      target_reduction: 0.40
      max_payback_years: 5

  - name: reporting
    type: output
    format: pdf
    template: executive_summary

Core Concepts

Packs

Modular, reusable components that encapsulate climate intelligence logic:

  • Calculation Packs: Emissions calculations for specific industries
  • Optimization Packs: Decarbonization strategies and recommendations
  • Integration Packs: Connect to external data sources and APIs
  • Reporting Packs: Generate customized sustainability reports

Agents

AI-powered components that provide intelligent climate analysis:

  • BuildingAgent: Comprehensive building emissions analysis
  • HVACOptimizer: HVAC system optimization recommendations
  • SolarThermalAgent: Solar thermal replacement calculations
  • PolicyAgent: Climate policy compliance checking
  • BenchmarkAgent: Industry and regional benchmarking

Pipelines

Orchestrate complex climate intelligence workflows:

  • Chain multiple agents and packs together
  • Define conditional logic and branching
  • Integrate with external systems
  • Schedule recurring analyses
  • Generate automated reports

Real-World Applications

Smart Buildings

  • Real-time emissions monitoring and alerting
  • Predictive maintenance for HVAC systems
  • Occupancy-based energy optimization
  • Automated sustainability reporting

Industrial Decarbonization

  • Process emissions calculation
  • Energy efficiency recommendations
  • Alternative fuel analysis
  • Supply chain emissions tracking

Renewable Energy Planning

  • Solar thermal viability assessment
  • Boiler replacement analysis
  • Grid carbon intensity integration
  • ROI calculations for green investments

Documentation

Community & Support

Why GreenLang?

For Developers

  • Rapid Development: Build climate apps in hours, not months
  • Best Practices Built-in: Industry standards and methodologies included
  • Extensible: Easy to add custom agents and packs
  • Well-Documented: Comprehensive docs with real examples

For Organizations

  • Reduce Emissions: Data-driven insights for real reduction
  • Save Costs: Identify efficiency opportunities and ROI
  • Ensure Compliance: Meet regulatory requirements
  • Transparent Reporting: Explainable, auditable calculations

For the Planet

  • Accelerate Net-Zero: Enable faster climate action
  • Democratize Climate Intelligence: Make tools accessible to all
  • Drive Innovation: Foster new climate solutions
  • Scale Impact: From single buildings to entire cities

Roadmap

Current Release (v0.2.x)

  • Core CLI and SDK functionality
  • Building and HVAC agents
  • Basic pipeline orchestration
  • Regional emission factors

Next Release (v0.3.0)

  • Kubernetes operator for cloud deployment
  • Real-time grid carbon integration
  • ML-powered prediction models
  • Advanced visualization dashboard

Future (v1.0.0)

  • Complete industry coverage
  • Global emission factor database
  • Blockchain-verified carbon credits
  • Enterprise governance features

Contributing

We welcome contributions from the community! See our Contributing Guide for details on:

  • Setting up development environment
  • Code style and standards
  • Testing requirements
  • Submission process

License

GreenLang is released under the MIT License. See LICENSE file for details.

Acknowledgments

GreenLang is built on the shoulders of giants:

  • Climate science community for methodologies
  • Open source community for inspiration
  • Early adopters for invaluable feedback
  • Contributors who make this possible

Join us in building the climate-intelligent future. Every line of code counts.

Code Green. Deploy Clean. Save Tomorrow.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

greenlang_cli-0.2.3.tar.gz (604.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

greenlang_cli-0.2.3-py3-none-any.whl (551.8 kB view details)

Uploaded Python 3

File details

Details for the file greenlang_cli-0.2.3.tar.gz.

File metadata

  • Download URL: greenlang_cli-0.2.3.tar.gz
  • Upload date:
  • Size: 604.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for greenlang_cli-0.2.3.tar.gz
Algorithm Hash digest
SHA256 860967e1807b188f2a8a75c06351c804ec626e6a29f0ace1174f498524cd1b0e
MD5 e6f704fd11246b1694d8b05ac6db758b
BLAKE2b-256 cebf8dabd13b3a7081ef523dcf1b052c56aad664f9c8f0a1a60dfd1e2e0ed796

See more details on using hashes here.

File details

Details for the file greenlang_cli-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: greenlang_cli-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 551.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for greenlang_cli-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d7de8fee816ed7d0e73a9e5d3000eee74d3c0b6013761be04d27dfc9706558e9
MD5 f371ef5fa0fd0c323cacd17d40a710bc
BLAKE2b-256 1cf79235420f729e1b6b9063a20f1b55c80d90eefdc3b420c494e2819a43b888

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page