Bicep Cost Estimator
Bicep Cost Estimator (bce) estimates the monthly cost of Azure infrastructure before you deploy it. It works with Bicep and ARM JSON templates and ships as a CLI, a VS Code extension, a GitHub Action, and a browser playground.
Choose Your Workflow
CLI
Use the published bce command locally, in scripts, or in CI when you want direct control over files, parameter overrides, and output formats.
curl -sL https://bicepcostestimator.net/install.sh | bash
bce estimate --file main.bicep
See Getting Started and CLI Commands.
VS Code Extension
Use the extension when you want estimates while authoring Bicep: CodeLens totals, hover details, a status bar total, and a cost breakdown view in the explorer.
code --install-extension enginpolat.bce
See VS Code Extension.
GitHub Action
Use the action when you want cost checks in pull requests or workflow gates based on the estimated monthly total.
- id: cost
uses: polatengin/washington@main
with:
file: infra/main.bicep
output-format: json
See GitHub Action.
Playground
Use the browser playground when you want to paste a self-contained template and inspect the result without installing anything locally.
See Playground.
Quick Start With The CLI
curl -sL https://bicepcostestimator.net/install.sh | bash
bce estimate --file main.bicep
Add a params file or choose a machine-readable format when you need a more realistic or automatable run:
bce estimate --file main.bicep --params-file main.bicepparam
bce estimate --file main.bicep --output json
Run via Docker instead if you do not want to install the CLI directly:
bce() {docker run --rm \-v "$PWD:/work" \-w /work \--entrypoint /app/bin/bce \ghcr.io/polatengin/washington:latest \"$@"}Add that function to
~/.bashrcor~/.zshrc, reload your shell, and then usebcelike a normal command.
What You Get
- Estimates from Bicep and ARM JSON templates
- Support for
.bicepparamfiles and repeatable--param key=valueoverrides - Output formats for terminal and automation:
table,json,csv, andmarkdown - Shared pricing behavior across the CLI, VS Code extension, GitHub Action, and browser playground
- Warning-based handling for unsupported resources so mixed templates still produce partial totals
How It Works
- Compile Bicep to ARM JSON when needed.
- Extract Azure resources, locations, and pricing-relevant properties.
- Map supported resource types to Azure Retail Prices API queries.
- Aggregate the results into line items, warnings, and a grand total.
See How Estimates Work for the full pipeline.
Good To Know
- Estimation uses the public Azure Retail Prices API. An Azure subscription sign-in is not required just to run an estimate.
- Pricing responses are cached locally for 24 hours under
~/.bicep-cost-estimator/cache. - If a resource location cannot be resolved, the estimator falls back to
eastus. - Unsupported resource types are reported as warnings instead of failing the whole run.
Available Tools
| Tool | Description |
|---|---|
| Playground | Paste standalone Bicep into the browser and get an on-demand estimate |
| CLI | Command-line interface for local and CI use, published as bce |
| VS Code Extension | Real-time cost estimates in your editor |
| GitHub Action | Cost estimates on every pull request |
Where To Go Next
- Getting Started for installation paths, first estimates, and runtime defaults
- Common Workflows for task-based recipes across the CLI, VS Code, GitHub Action, and docs browser
- CLI Commands for command and flag reference
- VS Code Extension for editor workflows and settings
- GitHub Action for CI and pull request automation
- Supported Resources for coverage details
- Troubleshooting for setup, cache, and unsupported-resource issues