# 使用 Homebrew 安装 cdktf

查看 cdktf 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:cdktf
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cdktf
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:cdktf
- **软件包管理器:** Homebrew
- **版本:** 0.21.0
- **来源摘要:** Cloud Development Kit for Terraform
- **主页:** <https://github.com/hashicorp/terraform-cdk>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cdktf (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.21.0
## 项目历史与用法

CDK for Terraform, commonly packaged as cdktf, lets users define Terraform infrastructure with familiar programming languages and then synthesize Terraform configuration.

### 项目历史

HashiCorp introduced CDK for Terraform as an experimental bridge between Terraform and the construct-based CDK programming model. The official docs now present it as a Terraform workflow with its own CLI, project configuration file, generated provider bindings, and language support.

The official repository is hashicorp/terraform-cdk, while the packaged CLI command is cdktf. The 2026 Homebrew formula packages cdktf 0.21.0.

### 采用历史

CDKTF appealed to Terraform users who wanted loops, classes, libraries, testing patterns, and IDE type support from languages such as TypeScript, Python, Java, C#, and Go, while still targeting Terraform providers and state-oriented workflows.

Its adoption is clearest in the Terraform ecosystem rather than as a replacement for Terraform language itself: teams use it when generated bindings and programming-language abstractions justify the additional build step.

### 使用方式

A CDKTF project uses cdktf.json to declare the language, app command, providers, modules, and CLI behavior. Developers run commands such as cdktf get, synth, diff, and deploy around generated Terraform artifacts.

### 为什么软件包爱好者会关心

CDKTF is a package-manager crossroads: a Homebrew CLI formula wraps a Node-distributed tool that generates bindings for Terraform providers, so versioning touches npm packaging, Terraform provider constraints, generated code, and HashiCorp's Terraform release cadence.

### 时间线

- 2020: HashiCorp announces CDK for Terraform 0.1.
- 2020s: CDKTF grows language guides, provider/module generation, and a dedicated Terraform docs section.
- 2026: Homebrew formula packages cdktf 0.21.0.

### Related projects

- CDKTF is related to Terraform CLI, Terraform providers and modules, AWS CDK, constructs, and cdk8s through the shared CDK/construct programming model.

### 来源

- <https://api.github.com/repos/hashicorp/terraform-cdk>
- <https://github.com/hashicorp/terraform-cdk>
- <https://developer.hashicorp.com/terraform/cdktf>
- <https://developer.hashicorp.com/terraform/cdktf/create-and-deploy/configuration-file>
- <https://formulae.brew.sh/api/formula/cdktf.json>


## 安全说明

infrastructure mutation or orchestration signal.

- **Geiger 风险:** orange / 中
- infrastructure mutation or orchestration signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ./cdktf.json

## Combined YAML source

View the package source record on GitHub. [combined/cdktf.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cdktf.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
