laravel / laravel/cloud-cli

feat: billing and usage commands — view traffic, compute, and cost data

Open
#105 5 comments 1 reaction 0 assignees View on GitHub

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 --json output 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.