Skip to main content

Infrastructure Cost Intelligence CLI — safe, read-only cloud cost optimization scanner for AWS and Databricks

Project description

cloudbrain

Infrastructure Cost Intelligence CLI — a safe, read-only scanner that identifies cloud infrastructure waste and generates optimization recommendations.

What it does

  • Scans AWS and Databricks environments using read-only API access
  • Identifies idle, underutilized, and misconfigured resources
  • Estimates monthly savings potential with current vs recommended configuration
  • Prioritizes recommendations by savings impact and risk level
  • Scans clusters, SQL warehouses, jobs, Unity Catalog, and compute policies
  • Outputs reports to terminal, JSON, or CSV

Install

brew install pipx && pipx install cloudbrain-cli

Usage

Scan Databricks

cloudbrain scan --provider databricks --workspace-url "https://your-workspace.cloud.databricks.com" --token "dapi..."

Scan AWS

cloudbrain scan --provider aws --regions us-east-1

Note: AWS uses your configured credentials from ~/.aws/credentials or environment. Run aws configure to set up.

Scan multiple providers

cloudbrain scan --provider aws --provider databricks --workspace-url "https://your-workspace.cloud.databricks.com" --token "dapi..."

Export reports

After running a scan, save the report without re-scanning:

cloudbrain export json
cloudbrain export csv

Reports are saved to ~/Downloads/.

Commands

Command Description
cloudbrain scan --provider <name> Run a cost scan
cloudbrain export json Save last scan as JSON to ~/Downloads
cloudbrain export csv Save last scan as CSV to ~/Downloads
cloudbrain init Generate default config at ~/.cloudbrain/config.yaml
cloudbrain --version Show version

What it scans

Databricks

Resource Checks
Clusters Idle detection, auto-termination, autoscaling config, oversized drivers
SQL Warehouses Auto-stop config, sizing vs query rate, multi-cluster provisioning
Jobs Failure rates, expensive jobs, long-running jobs, cost per run
Unity Catalog Catalogs, schemas, Delta table optimization, external locations
Compute Policies Missing policies, weak policies, unmanaged clusters

AWS

Resource Checks
EC2 Idle instances (<5% CPU), underutilized instances, rightsizing
EBS Orphaned volumes, old unattached snapshots
S3 Missing lifecycle policies, infrequent access candidates
ELB Load balancers with no healthy targets
Elastic IPs Unassociated IPs
NAT Gateways Low-traffic gateways

Pricing methodology

Cost estimates are based on published Databricks and AWS on-demand list pricing:

Resource Rate used
Databricks All-Purpose Compute $0.55/DBU-hour (AWS Premium tier)
Databricks Jobs Compute $0.22/DBU-hour (AWS Premium tier)
SQL Warehouse DBU rate × warehouse size in DBUs
AWS EC2 On-demand hourly rate per instance type
AWS EBS Per GB-month by volume type

Estimates reflect DBU costs only and do not include underlying cloud infrastructure (EC2/VM) costs, which typically add 50-70% on top. Actual costs may differ based on committed-use discounts, reserved instances, or negotiated enterprise pricing.

Security and privacy

  • Read-only — never modifies infrastructure
  • Local execution — all processing on your machine
  • No credential storage — tokens are used in-memory only, never written to disk
  • No telemetry — no data sent to external services
  • Scan history — only scan results (findings, not credentials) are cached locally at ~/.cloudbrain/last_scan.json

Configuration

cloudbrain init

Configurable thresholds in ~/.cloudbrain/config.yaml:

Setting Default Description
observation_window_days 90 How far back to analyze
cpu_idle_percent 5 CPU % below which instance is idle
cpu_underutilized_percent 20 CPU % below which instance needs rightsizing
cluster_idle_minutes 30 Idle time before flagging a cluster
warehouse_low_query_rate 5 Queries/hour below which warehouse is oversized

Roadmap

Next release:

  • Azure support (VMs, AKS, Cosmos DB, Storage Accounts)
  • GCP support (Compute Engine, GKE, BigQuery, Cloud Storage)
  • Snowflake warehouse optimization
  • Historical cost trending and comparison

Requirements

  • Python 3.11+
  • AWS credentials (for AWS scanning)
  • Databricks Personal Access Token (for Databricks scanning)

License

MIT

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

cloudbrain_cli-0.2.0.tar.gz (43.2 kB view details)

Uploaded Source

Built Distribution

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

cloudbrain_cli-0.2.0-py3-none-any.whl (64.7 kB view details)

Uploaded Python 3

File details

Details for the file cloudbrain_cli-0.2.0.tar.gz.

File metadata

  • Download URL: cloudbrain_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 43.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for cloudbrain_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bd41aa8523e371924d5d96d9eccb3966f511adc8247c4a251cb5764e8e4c460b
MD5 1f825fb8b7d187997807184b00712589
BLAKE2b-256 0b06bdde6ab295a8bf4375d0f9a07fae208f5b5b1ffcc288e9371b0020c2d2af

See more details on using hashes here.

File details

Details for the file cloudbrain_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cloudbrain_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 64.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for cloudbrain_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b63d6e01d79f1eaf81a35c8f001194d190ce93f257b61ba36f2e90de67b02c79
MD5 0d0de5133049d16417dc5d3722bb953a
BLAKE2b-256 194d31b2d8092927d41f17ecf2bbfde4fa95a5c94b542387198d608eb48d0d89

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