costgraph prefix. Add --help for the complete flag list.
A session comes from costgraph auth login. A key needs the scopes listed with its command. See Credentials for session precedence.
Authentication
Run each command with thecostgraph prefix. See Install for examples and flags.
Reports the configured credential without contacting CostGraph. It does not verify scopes or access.
Tenants
Choose which tenant your saved session uses. See Install for examples and flags.API keys
Run each command with thecostgraph prefix. See Api keys for examples and flags.
Lists permissions supported by the deployment. Does not inspect an existing key. No sign-in required.
Creates one key after browser approval. Returns
raw_api_key once. Does not change the saved CLI login.Cost queries
Run each command with thecostgraph prefix. costs is an alias for cost. See Query costs for examples and flags.
Shows spend, period comparison, and provider totals. Requires a session. Bare
cost uses month-to-date without prompting.Terraform estimates
Run each command with thecostgraph prefix. See Terraform and ci for examples and flags.
Combines CostGraph and Infracost estimates. No CostGraph credential needed without
--plan. With --plan, existing-resource lookups need focus:read.Prints environment variables for using CostGraph prices with Infracost. No existing credential required.
Pull request comments
Both commands need a GitHub token with permission to comment on the pull request. See Terraform and ci for examples and flags.Posts or updates the Terraform estimate comment. No dry-run option.
--plan lookups need focus:read.Posts or updates CI cost. Requires a session or key with
focus:read. Use --dry-run to preview.Virtual tags
Alltags commands require a saved session. tag is an alias for tags. See Virtual tags for examples and flags.
Lists keys and rules. Use
--key for one key, --wide for full predicates, or --pick to inspect a rule.Lists billing fields and coverage. Use
--all to include fields below the usability threshold.Virtual tag previews
CLI 0.11.0 can preview rules but cannot save them. See Virtual tags for examples and flags.Recommendations
These commands require a saved session.recs is an alias for recommendations. See Recommendations for examples and flags.
Lists rightsizing recommendations. Opens a browser in a terminal, a table in pipes, or JSON with
-o json.Totals monthly savings, coverage, and recommendation counts by action. Does not apply changes.
Read configuration
Run each command with thecostgraph prefix. See Configuration for examples and flags.
Write configuration
These commands change the local configuration file. See Configuration for examples and flags.Shell completion
Completion commands print scripts. Follow each command’s--help to install its output. See Configuration for examples and flags.
Version and help
Run these commands from any directory. See Overview for examples and flags.Global flags
These flags apply across command groups. See Overview for examples and flags.Command groups
Run a group without a subcommand to discover its children.cost comment, cost ci, and cost ci comment group the GitHub comment commands.
Every cost subcommand inherits --period, --month, --start, --end, and --no-interactive. Period flags affect spend queries. They do not affect Terraform estimates or the CI --since window.
Configuration commands read or write local settings. Commands can also send usage telemetry unless you disable it.