Skip to main content
List the rightsizing recommendations CostGraph has computed for your tenant, and total their monthly savings. Refer to Recommendations for where recommendations come from and how to act on them. The CLI lists recommendations. It doesn’t apply them.

Requirements

The costgraph recommendations commands need a signed-in CLI session. They don’t accept API keys. Refer to Install and sign in. costgraph recs is a shorter name for the same commands.

List recommendations

The following command lists recommendations for virtual machines, largest savings first.
In a terminal, the list opens in an interactive browser grouped by action. In a script or pipe, the command prints a static table. Each row includes the resource, provider, region, current and recommended shape, and monthly savings.

Kubernetes node recommendations

Recommendations cover virtual machines by default. Add --type kubernetes_node for Kubernetes nodes.
JSON output contains the recommendations without opening the browser.

Pagination

The command returns 50 rows by default. Use --limit for up to 200 rows, --offset to skip rows, or --all to fetch every page.

Filter recommendations

costgraph recommendations list and costgraph recommendations summary accept the same filters. Separate several values with commas. The following command lists high-confidence downsizing and termination recommendations on AWS that save at least 50 US dollars a month.
--sort orders the list by savings_desc, the default, generated_at_desc, or generated_at_asc.

Total the savings

costgraph recommendations summary reports fleet totals for the same filters. The totals include savings, coverage, and the number of recommendations for each action.
Add -o json to use the totals in a report.

Command reference

Commands are shown without the costgraph prefix. Add --help for the complete flag list.

Recommendation commands

These commands require a saved session. recs is an alias for recommendations.
command
Lists rightsizing recommendations. Opens a browser in a terminal, a table in pipes, or JSON with -o json.
command
Totals monthly savings, coverage, and recommendation counts by action. Does not apply changes.

Shared filters

Both commands accept these filters. Separate multiple values with commas.
string
default:"virtual_machine"
Chooses virtual_machine or kubernetes_node.
string[]
Filter by provider and region identifiers.
string[]
Selects DOWNSIZE, TERMINATE, UPSIZE, NOOP, or NO_RECOMMENDATION.
string[]
Selects low, medium, or high confidence.
number
Sets minimum monthly savings in US dollars.
string
Filters resources by whether they still report a heartbeat.
Matches a resource name or hostname.
string[]
Filters by reason code. Shell completion lists supported codes.

List pagination and sorting

Pass these flags to costgraph recommendations list.
integer
default:"50"
Sets rows per page, up to 200.
integer
Skips rows before returning a page.
boolean
Fetches every page.
string
default:"savings_desc"
Chooses savings_desc, generated_at_desc, or generated_at_asc.