Skip to content

Feature request: expose billing and usage in the CLI #2

Description

@dentiny

Hi crusoe team, I found Crusoe v1 API exposes billing and usage endpoints, but CLI v1.0.4 (which is the latest release) does not provide billing, cost, or usage commands.

Existing API endpoints include:

  • GET /v1/organizations/{organization_id}/billing/costs
  • GET /v1/organizations/{organization_id}/billing/options
  • GET /v1/organizations/{organization_id}/billing/export-productline
  • GET /v1/organizations/{organization_id}/usage
  • GET /v1/organizations/{organization_id}/usage/export

Suggested CLI interface:

crusoe billing costs \
  --start-date YYYY-MM-DD \
  --end-date YYYY-MM-DD \
  --project-id PROJECT_ID \
  --json
crusoe billing export \
  --start-date YYYY-MM-DD \
  --end-date YYYY-MM-DD \
  --output costs.csv
crusoe usage list \
  --start-date YYYY-MM-DD \
  --end-date YYYY-MM-DD \
  --project-id PROJECT_ID \
  --json
crusoe usage export \
  --start-date YYYY-MM-DD \
  --end-date YYYY-MM-DD \
  --output usage.csv

Expected dimensions:

  • date
  • project
  • region
  • resource/product type
  • billable metric
  • quantity
  • unit price
  • cost
  • reservation ID

crusoe reservations list --json exposes point-in-time reservation utilization, but it does not expose historical billable usage or costs.

It would also be helpful if the CLI inferred the organization from the authenticated profile and supported table, JSON, and CSV output.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions