Skip to content

Conversation

@joshrotenberg
Copy link
Collaborator

Summary

Adds a new export subcommand that combines generate + wait + download into a single operation for simpler cost report retrieval.

Usage

# Export monthly costs to file
redisctl cloud cost-report export \
  --start-date 2025-01-01 \
  --end-date 2025-01-31 \
  --file january-costs.csv

# Export as JSON
redisctl cloud cost-report export \
  --start-date 2025-01-01 \
  --end-date 2025-01-31 \
  --format json \
  --file january-costs.json

# With filters
redisctl cloud cost-report export \
  --start-date 2025-01-01 \
  --end-date 2025-01-31 \
  --tag team:platform \
  --subscription-type pro \
  --file team-costs.csv

Features

  • All filter options from generate (subscription, database, region, tags, subscription-type)
  • Configurable timeout (default 300s)
  • Progress indicator during generation and download
  • Supports both CSV and JSON output formats
  • Outputs to file or stdout

Changes

  • crates/redisctl/src/cli/cloud.rs: Added Export variant to CloudCostReportCommands
  • crates/redisctl/src/commands/cloud/cost_report.rs: Implemented export_cost_report function
  • Updated docs to recommend export as the primary workflow

Testing

Tested end-to-end:

$ ./target/debug/redisctl cloud cost-report export --start-date 2025-01-20 --end-date 2025-01-23 --format json --file test.json
Cost report exported to 'test.json' (167893 bytes)

Closes #592

Adds a new 'export' subcommand that combines generate + wait + download
into a single operation for simpler cost report retrieval.

Usage:
  redisctl cloud cost-report export \
    --start-date 2025-01-01 \
    --end-date 2025-01-31 \
    --file january-costs.csv

Features:
- All filter options from generate (subscription, database, region, tags)
- Configurable timeout (default 300s)
- Progress indicator during generation and download
- Supports both CSV and JSON output formats

Also updates documentation to recommend export as the primary workflow.

Closes #592
@joshrotenberg joshrotenberg merged commit c1925cd into main Jan 23, 2026
22 checks passed
@joshrotenberg joshrotenberg deleted the feat/cost-report-export branch January 23, 2026 23:23
@joshrotenberg joshrotenberg mentioned this pull request Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add one-shot cost-report export command

2 participants