Fast multi-cloud cost visibility in your terminal.
CloudCost is a CLI that shows your AWS, Azure, and GCP spending in seconds. No dashboards, no web browsers just fast cost data in your terminal.
- ✨ Multi-Cloud Support - AWS, Azure, and GCP in one command
- ⚡ Lightning Fast - 1-hour local cache makes repeat queries instant (10x faster)
- 🎨 Beautiful Terminal UI - Progress bars, colors, and clear formatting
- 🔒 Secure - Uses your existing cloud CLI credentials
- 📊 Tag Grouping - Group costs by team, environment, or any tag
- 📅 Date Ranges - Current month, last month, or any YYYY-MM
- 💾 JSON Output - Pipe to jq or other tools
Download pre-built binary (recommended):
# Linux (AMD64)
curl -L https://github.com/JacobDavidAlcock/CloudCost/releases/latest/download/cloudcost-linux-amd64 -o cloudcost
chmod +x cloudcost
sudo mv cloudcost /usr/local/bin/
# macOS (Apple Silicon)
curl -L https://github.com/JacobDavidAlcock/CloudCost/releases/latest/download/cloudcost-darwin-arm64 -o cloudcost
chmod +x cloudcost
sudo mv cloudcost /usr/local/bin/
# macOS (Intel)
curl -L https://github.com/JacobDavidAlcock/CloudCost/releases/latest/download/cloudcost-darwin-amd64 -o cloudcost
chmod +x cloudcost
sudo mv cloudcost /usr/local/bin/
# Windows (PowerShell)
Invoke-WebRequest -Uri "https://github.com/JacobDavidAlcock/CloudCost/releases/latest/download/cloudcost-windows-amd64.exe" -OutFile "cloudcost.exe"Or build from source:
git clone https://github.com/JacobDavidAlcock/cloudcost.git
cd cloudcost
go build ./cmd/cloudcost# AWS costs (default)
cloudcost report --cloud aws
# Multi-cloud aggregated view
cloudcost report --cloud all
# Group by tags
cloudcost report --cloud aws --group-by team
# Last month's costs
cloudcost report --cloud azure --month last-month
# JSON output
cloudcost report --cloud gcp --output jsonCloudCost uses your existing AWS credentials (~/.aws/credentials or environment variables).
# Check authentication
cloudcost auth aws
# List available profiles
cloudcost auth aws --list-profiles
# Use specific profile
cloudcost report --cloud aws --profile productionRequirements:
- AWS CLI configured with valid credentials
- Cost Explorer API access (enabled by default)
CloudCost uses Azure CLI credentials.
# 1. Login to Azure CLI
az login
# 2. Set your subscription ID
export AZURE_SUBSCRIPTION_ID="your-subscription-id"
# 3. Verify authentication
cloudcost auth azure
# 4. Fetch costs
cloudcost report --cloud azureRequirements:
- Azure CLI installed and authenticated
- Cost Management Reader role or higher
AZURE_SUBSCRIPTION_IDenvironment variable set
CloudCost requires BigQuery billing export (one-time setup).
# 1. Authenticate with gcloud
gcloud auth application-default login
# 2. Set project ID
export GOOGLE_CLOUD_PROJECT="your-project-id"
# 3. Enable BigQuery billing export
gcloud billing export create \
--dataset-id=billing_export \
--location=US
# 4. Wait 24 hours for data to populate
# 5. Verify authentication
cloudcost auth gcp
# 6. Fetch costs
cloudcost report --cloud gcpRequirements:
- gcloud CLI installed and authenticated
- BigQuery billing export enabled
GOOGLE_CLOUD_PROJECTenvironment variable set- 24 hours after export setup for data to populate
# Check AWS auth
cloudcost auth aws
# Check Azure auth
cloudcost auth azure
# Check GCP auth
cloudcost auth gcp
# List AWS profiles
cloudcost auth aws --list-profiles# Single cloud
cloudcost report --cloud aws
cloudcost report --cloud azure
cloudcost report --cloud gcp
# Multi-cloud aggregated
cloudcost report --cloud all
# Date ranges
cloudcost report --cloud aws --month current
cloudcost report --cloud aws --month last-month
cloudcost report --cloud aws --month 2024-10
# Tag grouping
cloudcost report --cloud aws --group-by team
cloudcost report --cloud aws --group-by environment
cloudcost report --cloud gcp --group-by project
# Output formats
cloudcost report --cloud aws --output table # default
cloudcost report --cloud aws --output json
# AWS profiles
cloudcost report --cloud aws --profile production
# Bypass cache
cloudcost report --cloud aws --no-cache# Show version
cloudcost --version
# Show help
cloudcost --help
cloudcost report --help
cloudcost auth --helpCloudCost caches API responses for 1 hour in ~/.cloudcost/cache/ to:
- Reduce API costs
- Speed up repeat queries (10x faster: 2s → 0.2s)
- Enable offline viewing of recent data
# Use cache (default)
cloudcost report --cloud aws
# Bypass cache for fresh data
cloudcost report --cloud aws --no-cacheCache is automatically invalidated after 1 hour.
cloudcost report --cloud aws --group-by teamOutput:
AWS Costs (November 2025)
Total: $12,450.00
By Team:
Team: Platform $6,200.00
Team: Data $4,100.00
Team: Mobile $2,150.00
cloudcost report --cloud all --month last-monthOutput:
Multi-Cloud Costs (October 2025)
Total: $45,230.00
By Cloud Provider:
AWS $32,100.00 ███████████████████░ 71.0%
Azure $10,050.00 █████░░░░░░░░░░░░░░░ 22.2%
GCP $3,080.00 █░░░░░░░░░░░░░░░░░░░ 6.8%
Warnings:
Azure: (not configured)
GCP: (not configured)
# Get total AWS costs
cloudcost report --cloud aws --output json | jq '.Total'
# List services over $100
cloudcost report --cloud aws --output json | \
jq '.Services | to_entries | map(select(.value > 100)) | from_entries'- Run
aws configureto set up credentials - Check
~/.aws/credentialsfile exists - Verify IAM permissions include Cost Explorer access
# Get your subscription ID
az account list --query "[].{Name:name, ID:id}" -o table
# Set environment variable
export AZURE_SUBSCRIPTION_ID="<your-id>"# Enable billing export
gcloud billing export create --dataset-id=billing_export --location=US
# Check status
gcloud billing export list
# Note: Takes 24 hours for data to populate after setup# Clear cache manually
rm -rf ~/.cloudcost/cache
# Or bypass cache
cloudcost report --cloud aws --no-cachecloudcost/
├── cmd/
│ └── cloudcost/
│ └── main.go # CLI entrypoint
├── internal/
│ ├── auth/
│ │ ├── aws.go # AWS authentication
│ │ ├── azure.go # Azure authentication
│ │ └── gcp.go # GCP authentication
│ ├── cache/
│ │ └── cache.go # File-based caching (1hr TTL)
│ ├── providers/
│ │ ├── aws/
│ │ │ └── costs.go # AWS Cost Explorer API
│ │ ├── azure/
│ │ │ └── costs.go # Azure Cost Management API
│ │ ├── gcp/
│ │ │ └── costs.go # GCP BigQuery billing export
│ │ └── multicloud/
│ │ └── aggregate.go # Multi-cloud aggregation
│ └── display/
│ └── table.go # Terminal UI rendering
├── go.mod
├── go.sum
└── README.md
- Config file support (
~/.cloudcost/config.yaml) - Homebrew/Chocolatey packages
- Test coverage
- Historical cost trends
- Cost comparison (this month vs last)
- Budget alerts
- Team dashboards
- Slack/email notifications
- Cost optimization recommendations
- Persistent storage (90+ days)
CloudCost uses official cloud provider APIs:
- AWS: Cost Explorer API
- Azure: Cost Management API
- GCP: BigQuery billing export
All credentials use your existing cloud CLI authentication. No data is sent to external servers—everything runs locally on your machine.
Q: How do I "log out"?
A: CloudCost doesn't store credentials. It uses your existing cloud CLI credentials. To "log out," use your cloud provider's CLI (e.g., aws configure, az logout, gcloud auth revoke).
Q: Why does GCP require BigQuery? A: GCP doesn't have a Cost Explorer-like REST API. BigQuery billing export is the official way to programmatically access GCP billing data.
Q: How much does it cost to use CloudCost? A: CloudCost is free to use under the Elastic License 2.0. You only pay for your cloud provider's API costs (typically $0.01-0.10/month).
Q: Why is my data 24 hours old? A: AWS Cost Explorer and Azure Cost Management update once per day. This is a limitation of the cloud providers, not CloudCost.
Q: Can I use this in CI/CD?
A: Yes! Use --output json to pipe data to other tools. CloudCost works great in automation pipelines.
Pull requests are welcome. Open an issue first for major changes.
Elastic License 2.0 - Free to use, modify, and distribute. You cannot provide CloudCost as a hosted/managed service to third parties. See LICENSE for full details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
