Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>CloudMetric — Cost-as-you-typeNew to Visual Studio Code? Get it now.
CloudMetric — Cost-as-you-type

CloudMetric — Cost-as-you-type

Cloudmetric

|
1 install
| (0) | Free
Real-time cloud and AI cost annotations inline in your editor
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CloudMetric — Cost-as-you-type

Real-time cloud and AI cost annotations inline in your VS Code editor. See the cost of every API call, model invocation, and cloud resource as you write code — no context switching required.

Features

  • Inline cost annotations — per-call and monthly cost estimates rendered directly in the editor
  • AI model pricing — supports OpenAI, Anthropic, and other major model providers
  • AWS resource costs — Terraform file analysis with region-aware pricing
  • Smart token estimation — estimates input/output tokens from your actual code
  • Color-coded warnings — green / yellow / red thresholds so expensive calls stand out
  • Hover details — hover over any annotation to see a full cost breakdown

Supported Languages

  • TypeScript / JavaScript (.ts, .tsx, .js, .jsx)
  • Terraform (.tf)

Getting Started

  1. Install the extension from the VS Code Marketplace
  2. Open any supported file — annotations appear automatically
  3. Optionally add a cloudmetric.config.json to your project root to customize behavior

Configuration

VS Code Settings

Setting Default Description
cloudmetric.enabled true Enable/disable annotations
cloudmetric.monthlyRequestVolume 100000 Assumed monthly calls for cost projections
cloudmetric.region us-east-1 AWS region for region-specific pricing
cloudmetric.showMonthlyEstimate true Show monthly estimate alongside per-call cost

cloudmetric.config.json

Place this file in your project root for per-project overrides:

{
  "region": "us-east-1",
  "monthlyRequestVolume": 100000,
  "tokenAssumptions": {
    "defaultInputTokens": 500,
    "defaultOutputTokens": 300,
    "charsPerToken": 4
  },
  "ignorePaths": ["node_modules", "dist", ".next", "coverage"],
  "enableTerraformAnalysis": true,
  "debounceMs": 300,
  "pricingOverrides": {}
}

Commands

Command Description
CloudMetric: Analyze Current File Manually trigger analysis on the open file
CloudMetric: Open Configuration Open the config file
CloudMetric: Show All Warnings List all cost warnings in the Problems panel
CloudMetric: Clear Annotations Remove all inline annotations

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft