CLICommands
l4 costs
l4 costs reads cloud spend from the terminal.
Subcommands
| Command | Purpose |
|---|---|
summary | KPI overview: monthly spend, forecast, total potential savings |
breakdown | Per-service breakdown with filters, multi-dimensional grouping, pagination |
daily | Daily costs aggregated per day for a date range |
monthly | Monthly costs aggregated per month |
filters | Distinct values for every filter dimension |
summary
l4 costs summary [--provider <id>]Prints the top-line KPIs: monthly spend, forecast and total potential savings. Pass --provider to scope to one cloud (aws, gcp, azure, k8s).
l4 costs summary
l4 costs summary --provider aws
l4 costs summary --jsonbreakdown
l4 costs breakdown [flags]--tui opens the same rows in an interactive split-pane viewer, where you drill into a row and pivot grouping live. Filtering and sorting lists its keys and shows how flags passed on the command line seed its starting state.
Flags
| Flag | Description |
|---|---|
--provider <id> | aws, gcp, azure, k8s (auto-detected if omitted) |
--start <date> / --end <date> | Date range, ISO 8601 |
--preset <preset> | 30D, 6M, 12M (overrides --start/--end) |
--granularity <g> | daily or monthly |
--group-by <dim> | Repeatable: service, account_id, region, tag |
--service <s> | Repeatable filter |
--region <r> | Repeatable filter |
--account <a> | Repeatable filter |
--environment <e> | Repeatable filter |
--tag-key <k> / --tag-value <v> | Required when --group-by includes tag |
--page / --page-size | Pagination (max 100 per page) |
--sort-by <field> | cost, previous_cost, change_percentage, service, region, account_id |
--sort-by-date <date> | Sort by a specific date column (overrides --sort-by) |
--sort-order | asc or desc |
--format | table, csv, raw (default table) |
--tui | Open the interactive split-pane viewer |
--page and --page-size apply to --format table. --format csv and --format raw return the whole filtered set in one response.Examples
l4 costs breakdown
l4 costs breakdown --preset 30D
l4 costs breakdown --start 2026-01-01 --end 2026-01-31
l4 costs breakdown --group-by service --group-by region
l4 costs breakdown --service EC2 --service RDS
l4 costs breakdown --group-by tag --tag-key Environment --tag-value production
l4 costs breakdown --granularity monthly --preset 6M
l4 costs breakdown --sort-by-date 2026-01-15 --sort-order desc
l4 costs breakdown --format csv > costs.csvFilter options cross-constrain each other, matching AWS Cost Explorer behavior: selecting a service narrows the regions and accounts you can subsequently filter on.
l4 costs filters prints the current option list at any point.daily
l4 costs daily [--start <date>] [--end <date>] [--provider <id>]Without --start and --end, the range is the trailing 30 days.
l4 costs daily
l4 costs daily --start 2026-01-01 --end 2026-01-31
l4 costs daily --json | jq '.data.data_points[]'monthly
l4 costs monthly [--provider <id>]One row per month, covering all available history.
l4 costs monthly
l4 costs monthly --json | jq '.data.data_points[]'filters
l4 costs filters [dimension] [--start <date>] [--end <date>] [--provider <id>]The dimensions are services, regions, accounts, tag keys and tag values. Without an argument, filters prints every one. Pass a dimension name to print just that one.
l4 costs filters
l4 costs filters service
l4 costs filters region --start 2026-01-01 --end 2026-01-31
l4 costs filters --json | jq '.data.services[]'Related
- Filtering and sorting: these flags in use, the TUI keys,
--jqpipelines, and the SDK equivalents - Output formats: the global
--json,--jq,--templateand--quietflags l4 integrations: which--providervalues your organization actually has- Recipes: multi-step shell pipelines, mostly over
l4 recommendations /api-reference/costs: the underlying REST endpoints