Overview
Thecost command fetches real cost data using your configured cloud credentials:
- AWS: Uses Cost Explorer API with your AWS profile/credentials
- GCP: Uses Cloud Billing API (coming soon)
- Azure: Uses Cost Management API (coming soon)
- Cloudflare: Uses Analytics API (coming soon)
Usage
clanker cost without a subcommand defaults to showing the cost summary.
Global flags
Filter by provider:
aws, gcp, azure, cloudflare, allStart date in YYYY-MM-DD format (default: first day of current month)
End date in YYYY-MM-DD format (default: today)
Output format:
table or jsonLimit number of results
AWS profile to use (default: from
AWS_PROFILE env)Subcommands
summary
Display a summary of costs across all configured providers.- Total cost
- Per-provider breakdown
- Top services
- Forecast
detail
Show detailed cost breakdown by service.trend
Display cost trends over time.forecast
Show cost forecast for upcoming periods.anomalies
Detect cost anomalies and unusual spending patterns.tags
Analyze costs by resource tags.Filter by specific tag key
export
Export cost data to CSV or JSON file.Output file path
Group by:
provider, service, or tagllm
Use AI to analyze costs and provide insights.Examples
Related resources
Cost analysis guide
Learn cost optimization strategies
Cost optimization
Best practices for reducing costs
Monitoring resources
Track resource usage and costs
Multi-environment
Manage costs across environments