CLICommands

l4 recommendations

l4 recommendations lists pending cost-optimization recommendations and shows full detail for any given recommendation. The interactive TUI (--tui) gives you a 3-tab layout (Recommendation, Comparison, Risk & Implementation), KPI cards, and live filtering.

Subcommands

CommandPurpose
listPaginated, filterable list of recommendations
viewFull detail for one recommendation

list

l4 recommendations list [flags]

Flags

FlagDescription
--provider <id>aws, gcp, azure, k8s (auto-detected if omitted)
--service <s>Repeatable filter
--account <a>Repeatable filter
--environment <e>Repeatable filter
--tag <t>Repeatable filter
--status <s>Repeatable: available, pending, processing, optimized, rejected, unavailable
--search <q>Free-text search within current page
--sort-by <field>recommendation_id, service, environment, account, tag, monthly_savings, savings_percentage, status
--sort-orderasc or desc
--page <n> / --page-size <n>Pagination (max 100 per page)
--tuiOpen the interactive viewer

Examples

l4 recommendations list
l4 recommendations list --service RDS --status available
l4 recommendations list --sort-by monthly_savings --sort-order desc
l4 recommendations list --page 2 --page-size 10
l4 recommendations list --provider gcp --environment production
l4 recommendations list --status available --jq '.data.data.items[] | .recommendation_id'

JSON shape (relevant paths)

.data.data.total_savings              # sum across the page
.data.data.items[]                    # array of recommendation rows
.data.data.items[].recommendation_id
.data.data.items[].service
.data.data.items[].monthly_savings
.data.data.items[].savings_percentage
.data.data.items[].status
.data.data.pagination.total_pages     # for pagination loops
.data.data.pagination.has_next

For multi-page aggregations, see the flagship recipe in Recipes.

view

l4 recommendations view <id> [--tui]

Show full detail for a single recommendation: description, monthly/annual savings, comparison against current spend, implementation steps, risk and rollback notes.

l4 recommendations view REC-001
l4 recommendations view REC-001 --tui     # 3-tab interactive viewer
l4 recommendations view REC-001 --json    # full payload for scripting
l4 recommendations view REC-001 --web     # open in dashboard

In the TUI, use Tab / Shift+Tab to switch between Recommendation / Comparison / Risk panes, and the arrow keys to scroll within each tab.

Combining with xargs

To pull full detail for the top 5 highest-savings recs:

l4 recommendations list --sort-by monthly_savings --sort-order desc --page-size 5 \
  --jq '.data.data.items[].recommendation_id' \
  | xargs -I{} l4 recommendations view {} --json

See also