Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/bgdnvk/clanker/llms.txt

Use this file to discover all available pages before exploring further.

View and analyze cost data directly from cloud provider APIs.

Overview

The cost 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 [subcommand] [flags]
Running clanker cost without a subcommand defaults to showing the cost summary.

Global flags

--provider
string
default:"all"
Filter by provider: aws, gcp, azure, cloudflare, all
--start
string
Start date in YYYY-MM-DD format (default: first day of current month)
--end
string
End date in YYYY-MM-DD format (default: today)
--format
string
default:"table"
Output format: table or json
--top
number
default:"10"
Limit number of results
--profile
string
AWS profile to use (default: from AWS_PROFILE env)

Subcommands

summary

Display a summary of costs across all configured providers.
clanker cost summary
clanker cost summary --provider aws
clanker cost summary --start 2024-01-01 --end 2024-01-31
Shows:
  • Total cost
  • Per-provider breakdown
  • Top services
  • Forecast

detail

Show detailed cost breakdown by service.
clanker cost detail
clanker cost detail --provider aws --top 20

trend

Display cost trends over time.
clanker cost trend
clanker cost trend --start 2024-01-01

forecast

Show cost forecast for upcoming periods.
clanker cost forecast
clanker cost forecast --provider aws

anomalies

Detect cost anomalies and unusual spending patterns.
clanker cost anomalies

tags

Analyze costs by resource tags.
clanker cost tags
clanker cost tags --key Environment
Flags:
--key
string
Filter by specific tag key

export

Export cost data to CSV or JSON file.
clanker cost export --output costs.csv
clanker cost export --output costs.json --format json
clanker cost export --output costs.csv --group-by service
Flags:
--output
string
required
Output file path
--group-by
string
default:"provider"
Group by: provider, service, or tag

llm

Use AI to analyze costs and provide insights.
clanker cost llm

Examples

# Show cost summary for all providers
clanker cost

# AWS costs only
clanker cost --provider aws

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