
Infracost
CLI在部署前估算 Terraform、Terragrunt、CloudFormation 与 AWS CDK 变更的云资源费用,并按 FinOps 策略做检查,可接入终端、编辑器、AI agent 与 CI。需登录 Infracost 账号,有免费额度。
Cloud cost intelligence for engineers, AI coding agents, and CI/CD.
Infracost shows cloud cost estimates and FinOps best practices for Terraform, Terragrunt, CloudFormation, and AWS CDK — before changes are deployed. See costs in your terminal, your editor, your AI coding agent, or right in pull requests.
The Infracost Dev toolkit
Infracost meets engineers wherever they work with infrastructure code — the terminal, their editor, their AI coding agent, and their CI pipeline. Every entry point talks to the same engine, the same pricing data, and the same FinOps policies, so a check you set up once shows up everywhere.
Get started
1. Install the CLI
macOS (Homebrew):
brew install infracost
Linux:
curl -fsSL https://raw.githubusercontent.com/infracost/cli/master/scripts/install.sh | sh
Windows (Chocolatey):
choco install infracost
Or download the latest release directly from GitHub Releases.
2. Run setup
infracost setup
The interactive setup walks you through authenticating, connecting your editor, configuring AI agent skills, and wiring up CI/CD. It's the fastest way to get every part of the Infracost toolkit working for your team.
Pick the entry points your team needs:
Infracost CLI
infracost/cli is the core of everything. Point it at a Terraform, Terragrunt, CloudFormation, or AWS CDK project to get a full cost breakdown and FinOps recommendations. The interactive setup wires up your editor, AI agent, and CI in one go.
Follow the quick start to install and authenticate, then:
infracost scan
For a deeper dive into a specific scan — full resource-level breakdowns, cost drivers, and policy details — use the infracost inspect commands.
AI coding agents
infracost/agent-skills plugs Infracost into Claude Code, Cursor, and other AI coding agents so they reason about cloud costs and your FinOps policies as they generate infrastructure code. Three skills ship today:
iac-generation— keeps generated IaC compliant with your tagging, region, and budget policiesscan— analyzes an existing project for cost and policy violationsprice-lookup— answers "how much is anm7i.xlargeinus-east-1?" with no existing code needed
IDE extensions
See cost lenses, inline hints, hover breakdowns, and FinOps diagnostics as you edit .tf, .hcl, CloudFormation, and AWS CDK files.
| Editor | Repo |
|---|---|
| VS Code, Cursor, Windsurf | infracost/vscode-infracost |
| JetBrains (IntelliJ, GoLand, PyCharm, WebStorm, Rider…) | infracost/jetbrains-infracost |
| Neovim | infracost/infracost.nvim |
| Zed | infracost/zed-infracost |
All of them are powered by the Infracost Language Server — a standard LSP server, so any editor that speaks LSP can integrate with Infracost.
CI/CD
Post cost diffs and policy checks directly on pull requests as part of your existing workflow, use the CI/CD integrations to set this up.
Infracost Cloud
Infracost Cloud is the SaaS dashboard that ties everything together. Team leads, managers, and FinOps practitioners can define tagging policies and guardrails once, and have them enforced consistently across the CLI, the editor extensions, the agent skills, and CI — plus get visibility into how spending is shifting across every project and PR.
Supported clouds and resources
Infracost supports over 1,100 resources across AWS, Azure, and Google Cloud, and can estimate usage-based resources such as S3 and Lambda.
About this repo
This repository is the front door to the Infracost project and the best place to follow it — star and watch to stay in the loop on releases across the whole ecosystem.
As part of the Infracost 2.0 release, the codebase has been refactored into the focused repositories linked above; some pieces may consolidate back here over time. Issues and discussions for the project as a whole still live here unless a repo-specific tracker is a better fit.
Community
Join our community Slack channel to learn more about cost estimation, Infracost, and to connect with other users and contributors.
If you run into any issues or have feedback, please open a thread in GitHub Discussions.
Thanks to everyone who has contributed — bug reports, code, feedback, and ideas all welcome.
License
相關資源

Prowler
CLI对 AWS、Azure、GCP、Kubernetes、GitHub、M365 等环境做安全基线与合规检查,内置 CIS、NIST、PCI-DSS、SOC2 等框架,可以生成报告,也能打开本地看板。需要先配置对应云账号的凭证。
prowler-cloud/prowler15.4k
Terraform
CLIHashiCorp 出品的基础设施即代码工具,用声明式配置管理多云与 SaaS 资源,先 plan 预览变更再 apply 执行,provider 覆盖主流云厂商。采用 BSL 1.1 许可。
hashicorp/terraform50.4k
OpenTofu
CLI开源的基础设施即代码工具,Terraform 的社区分支:用声明式配置描述云资源,先 plan 生成执行计划再 apply 变更,并按依赖图并行创建资源。社区治理,MPL-2.0 许可。
opentofu/opentofu31k
Terraform
PluginHashiCorp 官方 Terraform 插件:用 Docker 运行 Terraform MCP Server,对接 Terraform Registry 与 HCP Terraform API,查询 Provider 与模块文档并辅助编写 IaC。需 Docker,可选 TFE_TOKEN。
anthropics/claude-plugins-official48.8k
AWS IaC MCP Server
MCPAWS 官方:校验 CloudFormation 模板的语法与安全合规,分析部署失败原因,检索 CloudFormation 与 CDK 文档、代码示例和最佳实践。取代已弃用的 Cloud Control API 服务器,需要 AWS 凭证。
awslabs/mcp10k
Agent Toolkit for AWS
PluginAWS 官方正式发布的 agent 工具包与插件市场:提供 aws-core、aws-agents、aws-data-analytics 等插件,打包 AWS MCP Server 与经过评测的技能,覆盖 IaC、Serverless、容器与账单。调用 AWS API 需配置凭证。
aws/agent-toolkit-for-aws3.7k