# 使用 Homebrew, Nix 安装 terracognita

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

## 安装

```sh
sudo av install brew:terracognita
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install terracognita
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#terracognita
```

  证据: nixpkgs package indexes: pkgs/by-name/te/terracognita/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:terracognita
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/terracognita>
- **版本:** 0.8.4
- **来源摘要:** Reads from existing Cloud Providers and generates Terraform code
- **主页:** <https://github.com/cycloidio/terracognita>
- **仓库:** <https://github.com/cycloidio/terracognita>
- **许可证:** MIT
- **源码归档:** <https://github.com/cycloidio/terracognita/archive/refs/tags/v0.8.4.tar.gz>
- **最后更新:** 2026-07-26T00:50:35+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- terracognita (cli)
- terracognita (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, monterey, sonoma, ventura, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.8.4
- 管理器更新时间: 2026-07-26
- 本地数据: OK
- 上游仓库: https://github.com/cycloidio/terracognita
- 检测到的最新版本: v0.8.4 (当前)
## 项目历史与用法

TerraCognita is Cycloid's reverse-Terraform tool: it reads existing cloud infrastructure and generates Terraform HCL and/or Terraform state. Its history tracks the practical DevOps problem of bringing already-existing AWS, Google Cloud, AzureRM, and vSphere resources under infrastructure-as-code management.

### 项目历史

The repository was created in February 2019. In the README, Cycloid explains that infrastructure as code was part of the company's practice and that TerraCognita was built to help customers convert existing cloud infrastructure into Terraform code automatically, relying on community Terraform providers.

Early releases expanded the importer beyond its initial AWS-oriented base. Release notes show v0.3.0 adding multiple Google resources, v0.4.0 adding AzureRM support and targeted import, and v0.6.0 adding AWS profile/config support, session-token authentication, interpolation controls, HCL2 work, and Homebrew support.

Later development focused on keeping pace with provider APIs and larger resource catalogs. The changelog documents broad Azure additions, Terraform 1.1.9 and provider updates in the 0.7.x line, vSphere support and many GCP/AWS resources in v0.8.0, and AzureRM fixes and additions through v0.8.4.

### 采用历史

The README documents binary releases, source builds, AUR packages, Homebrew installation, and Docker usage through the `cycloid/terracognita` image. It also describes InfraImport inside Cycloid as the visual representation of TerraCognita, making the CLI both a standalone package and part of Cycloid's platform workflow.

### 使用方式

The main CLI form is `terracognita [TERRAFORM_PROVIDER] [--flags]`, where users choose a provider such as `aws`, pass provider-specific flags, and emit Terraform HCL, modules, and/or state files. The README documents include/exclude filters by Terraform resource name, module generation, Docker execution with cloud credentials passed through the environment, and follow-up `terraform init` and `terraform plan` checks.

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

For infrastructure package nerds, TerraCognita is notable because it packages a moving target: it embeds assumptions about Terraform, provider versions, cloud SDK behavior, generated HCL, and state output. Package managers expose it as a single CLI, but maintainers care about the bundled provider matrix and how quickly it tracks Terraform ecosystem churn.

### 时间线

- 2019: GitHub repository created.
- 2019: v0.1.6 release added version reporting, CI/CD, prebuilt binaries, and automated GitHub/Docker releases.
- 2019: v0.2.0 moved TFState output to Terraform 0.12 format.
- 2020: v0.4.0 added AzureRM provider support.
- 2020: v0.6.0 added AWS profile/config support, session-token authentication, HCL2-related fixes, and Homebrew support.
- 2022: v0.8.0 added vSphere provider support and expanded AWS/GCP/Azure resource coverage.
- 2023: v0.8.4 added AzureRM resources and fixes for generated HCL maps and cyclic dependencies.

### Related projects

- The README lists TerraCognita alongside Cycloid's InfraMap, which reads Terraform state or HCL to generate provider-specific graphs, and TerraCost, a Terraform-oriented cloud cost estimation CLI.
- It is adjacent to Terraform import workflows and tools that inventory existing cloud accounts before migrating to infrastructure as code.

### 来源

- <https://api.github.com/repos/cycloidio/terracognita>
- <https://api.github.com/repos/cycloidio/terracognita/releases?per_page=100>
- <https://github.com/cycloidio/terracognita>
- <https://raw.githubusercontent.com/cycloidio/terracognita/master/CHANGELOG.md>
- <https://raw.githubusercontent.com/cycloidio/terracognita/master/README.md>
- source_facts.package-manager


## 安全说明

infrastructure mutation or orchestration signal.

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** terracognita
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Nix - terracognita: normalized package name match | nixpkgs package indexes: pkgs/by-name/te/terracognita/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Cloud CLI packages](https://pkg.so/zh-hans/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [terraformer](https://pkg.so/zh-hans/brew/terraformer/) - Shares pkgdb curated category or tags: cli, cloud, cloud-infrastructure, import, infrastructure-as-code.
- [terraform-local](https://pkg.so/zh-hans/brew/terraform-local/) - Shares pkgdb curated category or tags: aws, cli, cloud-infrastructure, infrastructure-as-code, terraform.
- [cf-terraforming](https://pkg.so/zh-hans/brew/cf-terraforming/) - Shares pkgdb curated category or tags: cli, cloud-infrastructure, import, infrastructure-as-code, terraform.
- [cf2tf](https://pkg.so/zh-hans/brew/cf2tf/) - Shares pkgdb curated category or tags: aws, cli, cloud-infrastructure, infrastructure-as-code, terraform.
- [driftctl](https://pkg.so/zh-hans/brew/driftctl/) - Shares pkgdb curated category or tags: aws, azure, cli, cloud-infrastructure, infrastructure-as-code.
- [yor](https://pkg.so/zh-hans/brew/yor/) - Shares pkgdb curated category or tags: cli, cloud, cloud-infrastructure, infrastructure-as-code, terraform.
- [awscli](https://pkg.so/zh-hans/brew/awscli/) - Shares pkgdb curated category or tags: aws, cli, cloud, cloud-infrastructure.
- [azure-cli](https://pkg.so/zh-hans/brew/azure-cli/) - Shares pkgdb curated category or tags: azure, cli, cloud, cloud-infrastructure.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
