feat: billing and usage commands — view traffic, compute, and cost data
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 47
- Forks
- 11
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 20
Description
Description
The Cloud CLI currently has no way to view billing, usage, or traffic information. Users must open the Cloud dashboard to check bandwidth consumption, request counts, compute hours, or estimated costs.
As the CLI already covers most operational workflows (deployments, environments, commands, domains, etc.), adding billing and usage visibility would make it a complete management tool without requiring context-switching to the browser.
Suggested commands
# Current billing period summary (compute, bandwidth, requests, storage, cost)
cloud billing:usage
# Usage breakdown per environment
cloud billing:usage --environment=production
# Usage for a specific time range
cloud billing:usage --from=2026-03-01 --to=2026-03-18
# Current billing period invoice / cost estimate
cloud billing:estimate
# List past invoices
cloud billing:invoices
# View a specific invoice
cloud billing:invoice <invoice-id>
All commands should support --json for machine-readable output (useful for monitoring scripts, alerts, and CI cost tracking).
Use cases
- Quick traffic check: After a deployment or marketing campaign, verify bandwidth/request usage without leaving the terminal
- Cost monitoring in CI: Integrate usage checks into deployment pipelines to flag unexpected cost increases
- Multi-environment comparison: Compare usage across staging vs. production
- Budget alerts: Script periodic checks with
--jsonoutput to trigger notifications when usage exceeds thresholds
Context
Related to #68 (metrics endpoints) but distinct — #68 covers real-time resource performance metrics (CPU, memory, connections), while this request covers aggregate billing and traffic data over time.
Environment
- Cloud CLI: v0.1.15
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing Cloud CLI command patterns and the related metrics work in issue #68. Define the billing:usage, billing:estimate, billing:invoices, and billing:invoice command scope, including time ranges, environments, and --json output. Done means the requested billing and usage data is available through these commands without using the dashboard.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- analytics, cli, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100