Skip to main content

CloudBrew: vendor-neutral cloud orchestration CLI

Project description

CloudBrew

CloudBrew is a next-generation, vendor-neutral cloud orchestration CLI. It abstracts Infrastructure-as-Code (Terraform, Pulumi) behind a unified, intelligent interface that handles routing, policy enforcement, autoscaling, and task offloading.

Stop writing boilerplate HCL or YAML for every resource. Just brew it.


Key Features

  • Intelligent Routing: Automatically decides whether to provision resources via a Hot Pool (L1), Warm Pool (L2), or perform a Cold Build (L3) based on latency and availability.
  • Dynamic Autoscaling: Built-in logic to scale resources based on custom metrics (e.g., 1:5@cpu:70) with cooldown handling.
  • Governance & Policy: Enforce constraints (Allowed Regions, Cost Budgets, Instance Types) via policies.json before infrastructure is touched.
  • Stack Blueprints: Deploy complex architectures (e.g., LAMP, K8s clusters) using Jinja2-templated blueprints.
  • Drift Detection: Detect manual changes in your cloud environment against your local state.
  • async Task Offloading: Heavy provisioning tasks can be offloaded to a background SQLite-backed worker queue.

Installation

Prerequisites

  • Python 3.9+
  • (Optional) Terraform or Pulumi installed on your system PATH.

Install via Pip

pip install cloudbrew

Intelligent Provisioning (Smart Router)

Let the Intelligent Router decide the best way to provision (Hot Cache vs Cold Build) and find the cheapest spot prices.

cloudbrew create-vm worker-node --smart --yes

Dynamic Resource Resolution

CloudBrew uses fuzzy matching to find resources. You don't need to remember exact provider resource names.

# CloudBrew resolves "bucket" to "aws_s3_bucket" or "google_storage_bucket"
cloudbrew bucket my-data-lake --region us-east-1

Deploying Stacks

Deploy multi-resource environments using blueprints.

# List available stacks
cloudbrew stacks

# Deploy a LAMP stack
cloudbrew stack deploy lamp my-web-app --env prod --region us-east-1

Autoscaling

Apply autoscaling policies to your resources using the compact syntax: min:max@metric:threshold.

# Scale 'web-worker' between 1 and 5 instances. 
# Scale up if CPU > 70%, with a 60s cooldown.
cloudbrew create --name web-worker --autoscale "1:5@cpu:70,60" --spec examples/spec.json

Offloading Tasks (Async)

Don't wait for Terraform to finish. Offload the task to a background worker.

# 1. Enqueue the task
cloudbrew create-vm heavy-db --size large --async

# 2. Run the worker (in a separate terminal)
cloudbrew offload run-worker

Drift Detection

Check if your infrastructure has drifted from the known state.

cloudbrew drift web-server-01

Policy Enforcement

CloudBrew checks policies.json before every operation.

{
  "allowed_regions": ["us-east-1", "eu-central-1"],
  "banned_instance_types": ["xlarge", "metal"],
  "max_monthly_cost": 500
}

If you try to create an xlarge instance or deploy to us-west-1, the CLI will block the operation and report a violation

Architecture

CLI Layer (Typer): Parses commands and routes them.

Logic Layer (LCF):

1. Intelligent Router: Optimizes placement.

2. Resource Resolver: Maps intent ("bucket") to implementation.

3. Policy Engine: Validates specs against rules.

Adapter Layer:

1. TerraformAdapter: Generates HCL, manages state, streams output.

2. PulumiAdapter: Uses Automation API.

3. State Layer: SQLite (cloudbrew.db) acts as the state of truth for the orchestration logic.

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

cloudbrew-1.0.0.1.tar.gz (45.6 kB view details)

Uploaded Source

Built Distribution

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

cloudbrew-1.0.0.1-py3-none-any.whl (52.7 kB view details)

Uploaded Python 3

File details

Details for the file cloudbrew-1.0.0.1.tar.gz.

File metadata

  • Download URL: cloudbrew-1.0.0.1.tar.gz
  • Upload date:
  • Size: 45.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for cloudbrew-1.0.0.1.tar.gz
Algorithm Hash digest
SHA256 e45f7d1e59b183bc8a1eac0b0cd66677dc3be78a3325a722d3dffb3ed93ec700
MD5 7bee9678d8c973341d5c53597e452b46
BLAKE2b-256 7861e110660b605c12348a9b3d40a35dce0443c0519ca13bc380214c879373ea

See more details on using hashes here.

File details

Details for the file cloudbrew-1.0.0.1-py3-none-any.whl.

File metadata

  • Download URL: cloudbrew-1.0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 52.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for cloudbrew-1.0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2063a25645c4327244058a480fb48549060e2f9e780fcff11c2ed7e6219c4662
MD5 4dbc7f8ed51608ae36913a7191fb24e6
BLAKE2b-256 84ea46e4eb40e44a7af257433318cee0e164274ca6669f4b9e5dc0a0d44a3b0a

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