ReviewOS

stacks/ts-cloud

Implement `cost` command — current MTD spend + naive linear projection

#108
Closed glennmichael123 opened this 24 days ago · 0 comments
24 days ago

Implementation issue split out from #107.

Replace the mock-data body in packages/ts-cloud/bin/commands/cost.ts (cost command) with real implementation:

  • Query Cost Explorer for current month-to-date spend (use CostExplorerClient.getCostByService with start = first of current month, end = today + 1 day).
  • Compute naive linear projection: total / days_elapsed * days_in_month.
  • Optionally compare to last month for the Change column.

Acceptance

  • cloud cost returns real numbers from the connected AWS account.
  • --profile flag honored (same plumbing as cost:analyze).
  • Caches via the same Cost Explorer cache (#106).
  • Replaces the cli.warn('not implemented') guard introduced by #107.
  • #107 — tactical guard
  • #104 — original cost CLI scope

Sign in to comment on this issue.